This project is a multo agent RAG system built using LangGraph, Gemini, and FAISS.
The system processes PDF documents, creates vector embeddings, retrieves relevant content using semantic search, and generates responses grounded in the retrieved document context. Responses include source references to the supporting documents and pages.
- PDF document ingestion
- Document chunking and embedding generation
- FAISS-based semantic search
- Question answering over uploaded documents
- Source attribution with document and page references
- LangGraph workflow orchestration
- Query intent classification
- Retrieval quality evaluation
- Streamlit-based user interface
Performs input validation and basic safety checks before processing requests.
Classifies query intent and generates retrieval queries when required. Also determines retrieval depth based on the query type.
Searches the FAISS vector store, retrieves relevant document chunks, collects source metadata, and calculates retrieval metrics.
Generates answers using Gemini based on the retrieved document context.
Performs grounding checks using retrieval metrics, source coverage, and answer-context overlap before returning the final response.
- Python
- Gemini
- LangGraph
- LangChain
- FAISS
- Gemini Embeddings (
gemini-embedding-001)
- Streamlit
project/
│
├── agents/
├── core/
├── ingestion/
├── prompts/
├── schemas/
├── workflow/
├── data/
├── vector_store/
└── app_ui.py
pip install -r requirements.txtCreate a .env file:
GEMINI_API_KEY=YOUR_API_KEYPlace PDF files inside the data/ directory.
python ingestion/ingestion_pipeline.pystreamlit run app_ui.pyUser Question
↓
Guardrail Agent
↓
Research Agent
↓
Retrieval Agent
↓
Response Agent
↓
Validation Agent
↓
Final Response + Sources