This project is the base for a hand-made framework to build retrieval-augmented assistants.
It’s designed as a modular foundation: documents are ingested, searched, and reasoned over by agents that orchestrate specialized tools. The structure makes it easy to extend with new retrieval methods, models, or task-specific logic.
⚡ This is just the starting point: the codebase doubles as a lightweight, hand-crafted framework for building custom agentic workflows around documents and retrieval.
-
Ingests documents
- Scans a
data/folder for PDFs. - Extracts page-level text using
PyMuPDF. - Creates a searchable collection with ChromaDB.
- Scans a
-
Retrieves relevant content
- Queries the vector store with natural-language questions.
- Surfaces the most relevant document passages, with metadata (source and page number).
-
Generates responses
- Uses Google Gemini models to reason over retrieved passages.
- Produces concise, context-grounded answers.
-
Coordinates reasoning with agents
- An Orchestrator agent decides how to break down a query.
- Specialized tools (retrieval, response generation, etc.) handle subtasks.
- Agents maintain a short-term memory of queries and tool outputs, enabling iterative refinement.
- Document parsing: PyMuPDF
- Vector DB: ChromaDB
- LLM API: Google Gemini
- Configuration:
.envfor API keys - Framework: Agent + Tool abstraction using Pydantic models
python main.pyExample Query:
Compare FDA and WHO approaches to risk management for medical devicesExample Flow:
- Orchestrator agent receives the query.
- Delegates retrieval to the RAG tool.
- Retrieves relevant pages from FDA and WHO docs.
- Passes results to the Response tool.
- Outputs a concise, well-grounded comparison.