Giter Site home page Giter Site logo

qa_rag_osllms's Introduction

Explore Open source LLM model + RAG for QA task.

Scraping data from a public website:

  • Notebook scrapper.ipynb contains the recursive web-scraping code to extract available and public web content given a site URL.
  • It supports web pages and pdf
  • It starts with a link, and extracts the page text as well as metadata like URL, domain, language a year from the URL, date, and a list of hyperlinks.
  • These hyperlinks are added to the queue to be processed.
  • You can find a dataset scraped here.

Firt Rag appoach

  • Check notebook
  • Load a Mistral 7B model with quantization config.
  • Compare base model answers vs a simple RAG version.
  • As documents for RAG use the dataset created (text from Web and Pdfs) using public data extracted from https://www.thoughtworks.com, check the other notebook to see the scrapper.
Comments from this first approach:
  • Checking the sample generated at the end of the notebook, you can see that the RAG version reduces some hallucinations compared with the base mistral model.
  • Also reduce the verbosity in the answer.
  • The retriever strategy is very basic, it affects a lot the results. The base model seems to be trained with data until 2022, so it fails for questions that involve more recent content, like the Rag topics, it supports the benefits of having a RAG strategy. But this should be compared with a fine-tuning approach.
  • There is a bug in the model prediction because the batch call does not work, it is not using the extra GPU correctly.
  • I am using LangChain, what about Llamaindex ?

qa_rag_osllms's People

Contributors

dacasals avatar

Watchers

 avatar

Forkers

oceantangwei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.