Giter VIP home page Giter VIP logo

shreyjain203 / wikipedia-continual-learning-rag Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 27 KB

This repository implements a self-updating RAG (Retrograde Autoregressive Generation) model. It leverages Wikipedia for factual grounding and can fine-tune itself when information is unavailable. This allows the model to continually learn and adapt, offering a dynamic and informative response.

Python 100.00%
retrieval-augmented-generation fine-tuning fine-tuning-llm large-language-models

wikipedia-continual-learning-rag's Introduction

Wikipedia-Continual-Learning-RAG

Description

This project utilizes data extracted from Wikipedia to build a Retriever-Aware Generation (RAG) model. The data extraction is handled by get_data.py, which downloads data from Wikipedia and saves it as a text file. The extracted data is then preprocessed into vectors using data_preprocessing.py. The project utilizes memory.py for ConversationBufferMemory, prompt.py for generating proper prompts, and pipeline.py for creating and linking the model pipeline. Finally, everything is integrated into main.py, where the RAG model is built. When a user asks a question, the model provides an answer. If the model is unable to answer, it uses get_data.py to fetch more information and fine-tunes itself before providing an appropriate answer.

Implementation Details

1. TheBloke/Llama-2-13B-chat-GPTQ Model (LLM)

This implementation utilizes TheBloke as the Large Language Model to generate human-like, coherent responses based on the retrieved documents.

2. SentenceTransformers (Langchain(Chroma) Model)

SentenceTransformers is used to create embeddings for the sentences, enabling efficient and semantic similarity search among them. Chroma pretrained model was used as it had the best performance.

3. langchain (Data Ingestion, Vectorization, and Storage)

Langchain is employed for ingesting and vectorizing the dataset and for storing the vectorized representations of the data.

Installation

  1. Clone the repository: git clone https://github.com/shreyjain203/Wikipedia-Continual-Learning-RAG.git
  2. Install the required packages: pip install -r requirements.txt

Usage

Run main.py to build the RAG model and interact with it.

Contributors

  • Shrey Jain (Me)

wikipedia-continual-learning-rag's People

Contributors

shreyjain203 avatar

Watchers

Kostas Georgiou avatar  avatar

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.