Agentic RAG
Orchestrates a robust retrieval-augmented generation pipeline with query rewriting, semantic search, reranking, Gemini-powered generation, evidence verification, and selective web fallback.
This project delivers a production-ready agentic Retrieval-Augmented Generation (RAG) system, exposed through the Model Context Protocol (MCP) for seamless integration with clients like Cursor. It intelligently processes user questions by first rewriting them for optimal retrieval, then performing semantic search using Qdrant and BGE-small embeddings, followed by cross-encoder reranking for precise evidence selection. The system leverages Gemini for generating grounded answers, rigorously verifies claims against the retrieved evidence, and even performs a repair pass if verification fails. For questions requiring recent information or when local evidence is scarce, it intelligently falls back to live web search via Bright Data, ensuring comprehensive and accurate responses.