Author: Adam Silva GitHub: https://github.com/adaumsilva/
Specialization: AI Engineering, RAG Architectures, and MLOps.
NexusRAG is a production-grade Retrieval-Augmented Generation (RAG) system designed to transform static corporate documentation into an actionable, intelligent knowledge base. Unlike basic RAG implementations, NexusRAG utilizes Agentic workflows, Hybrid Search, and Re-ranking to ensure enterprise-level accuracy and reliability.
- Agentic Reasoning: Powered by LangGraph, the system evaluates user intent to decide whether to query the internal knowledge base or provide a general response.
- Hybrid Retrieval Pipeline: Combines Vector Search (Semantic) with BM25 (Keyword) to capture both deep context and specific industry terminology.
- Advanced Re-ranking: Implements a Cross-Encoder stage to re-score retrieved documents, significantly reducing the risk of hallucinations.
- Production-Ready API: Built with FastAPI (Asynchronous), featuring Pydantic validation and comprehensive logging.
- Multi-Format Ingestion: Seamlessly processes PDF and Markdown files with optimized recursive character chunking.
The following flow describes the request-response lifecycle:
- User Query: Input received via the FastAPI endpoint.
- Agentic Router: The LLM determines if external context is required.
- Hybrid Retriever: Parallel execution of Vector and Keyword searches.
- Cross-Encoder: Top results are re-ranked for relevance.
- Augmented Generation: The LLM generates a response strictly based on the re-ranked context.
- Orchestration: LangChain / LangGraph
- Models: OpenAI GPT-4 / Anthropic Claude 3.5
- Vector Database: ChromaDB
- API Framework: FastAPI
- Document Processing: PyPDF, LangChain Community Loaders
- Quality Assurance: Pytest
- Python 3.10 or higher
- OpenAI or Anthropic API Key
-
Clone the repository:
git clone [https://github.com/adaumsilva/NexusRAG.git](https://github.com/adaumsilva/NexusRAG.git) cd NexusRAG -
Set up the virtual environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
-
Environment Variables: Create a .env file in the root directory:
OPENAI_API_KEY=your_key_here DATABASE_URL=./data/chroma_db
Start the FastAPI server:
uvicorn app.main:app --reload