A simple Retrieval-Augmented Generation (RAG) API for asking questions about uploaded documents. Uses FastAPI, Google Gemini and Chroma vector database.
- Upload multiple files (PDF, DOCX, TXT, JPG , PNG, CSV, DB)
- Contexts are generated with overlap
- Ask questions
- Relevant context and question will be sent to the LLM(Gemini)
- Get answers with exact source and context
- Once you reload the page , the messages are gone. No way to retrieve them back.
- The Gemini free limit may cause a temporary intervention.
pip install -r requirements.txt
For development(locally): fastapi dev main.py
- Upload all the files at once at the very beginning.
- Ask questions.
GEMINI_API_KEY=your_gemini_api_key
This must be present in your environment variables.
1. ('/') -> returns index.html
2. ('/query') -> returns query.html
3. ('/api/query') -> makes a POST request to the backend with user's questions and
gets the response in return
- 'files' directory contains the sample files.
- 'uploads' directory stores the uploaded documents.

