genai / README.md
gauravprasadgp's picture
initial commit
d132e19
|
raw
history blame
1.48 kB

Modular RAG

A hybrid approach to implement RAG inspired by Advance RAG. Usually implemeted with modules acting as plug and play.

Documentation

Generator:

Core component of RAG, responsible for transforming the retrieved information into natural and human sense.

Retriever:

The word "R" in RAG, serving the purpose of retrieving the top K element from knowledge base.

ReRank:

As the name suggest a model used to re-rank the relevant documents. It indexes the documents based on the similariy score between question and the retrieved documents post vector search.

Run Locally

Clone the project

  git clone https://github.com/gauravprasadgp/modular-rag

Go to the project directory

  cd modular-rag

Install dependencies

pip install -r requirements.txt

Run postgres locally

cd pgvector
docker compose -d up

Start the server

  python main.py

API Reference

Upload file to create embedding

  POST /create
Parameter Type Description
file file Required. File to upload

Get answer from user query

  POST /answer
Parameter Type Description
query string Required. user query

License

MIT