A hybrid approach to implement RAG inspired by Advance RAG. Usually implemeted with modules acting as plug and play.
Core component of RAG, responsible for transforming the retrieved information into natural and human sense.
The word "R" in RAG, serving the purpose of retrieving the top K element from knowledge base.
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.
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
POST /create
Parameter | Type | Description |
---|---|---|
file |
file |
Required. File to upload |
POST /answer
Parameter | Type | Description |
---|---|---|
query |
string |
Required. user query |