This project is an Agentic RAG Chatbot that combines file-grounded Q&A with durable memory and intelligent query routing. It demonstrates an AI-first product feature capable of:
- File-grounded Q&A (RAG): Answering questions based on uploaded documents with citations.
- Durable Memory: Storing high-signal facts about the user and the organization to personalize future interactions.
- Intelligent Routing: Dynamically deciding whether to search documents, lookup memory, or answer generally.
- Ingestion: parses and chunks PDF documents.
- Retrieval: Semantic search using embeddings to find relevant context.
- Grounded Answers: Generates responses strictly based on the retrieved context with citations.
The bot extracts and stores key information to:
USER_MEMORY.md: User-specific preferences and facts (e.g., "User is a Data Scientist").COMPANY_MEMORY.md: Organizational knowledge (e.g., "Project X deadline is Friday").
A routing layer determines the intent of the user's query:
- Search: For questions requiring external documentation.
- Memory: For questions about the user or past context.
- General: For chit-chat or general knowledge.
- Python 3.13+
- uv package manager
- Google API Key or Groq API Key
# clone the repo
git clone https://github.com/neehanthreddym/agentic-rag-chatbot.git
cd agentic-rag-chatbot
# create virtual environment & install dependencies
uv venv
uv pip install -r requirements.txt
# configure API keys
cp .env.example .env
# edit .env and add your GOOGLE_API_KEYStreamlit Web Interface
make chat
# Opens http://localhost:8501Upload a PDF in the sidebar, then ask questions. The bot will use memory and documents to answer.
CLI / Testing
# Run the end-to-end sanity check
make sanitySee ARCHITECTURE.md for a detailed breakdown of the ingestion, retrieval, and memory modules.