Skip to content
adaumsilvaPublic

About

NexusRAG is an agentic, production-grade RAG system featuring hybrid search, cross-encoder re-ranking, and a FastAPI-powered knowledge retrieval pipeline for enterprise documentation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

NexusRAG: Enterprise Knowledge Agent

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.


Key Features

  • 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.

System Architecture

The following flow describes the request-response lifecycle:

  1. User Query: Input received via the FastAPI endpoint.
  2. Agentic Router: The LLM determines if external context is required.
  3. Hybrid Retriever: Parallel execution of Vector and Keyword searches.
  4. Cross-Encoder: Top results are re-ranked for relevance.
  5. Augmented Generation: The LLM generates a response strictly based on the re-ranked context.

Tech Stack

  • 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

Getting Started

Prerequisites

  • Python 3.10 or higher
  • OpenAI or Anthropic API Key

Installation

  1. Clone the repository:

    git clone [https://github.com/adaumsilva/NexusRAG.git](https://github.com/adaumsilva/NexusRAG.git)
    cd NexusRAG
  2. Set up the virtual environment:

    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\activate
    pip install -r requirements.txt
  3. Environment Variables: Create a .env file in the root directory:

    OPENAI_API_KEY=your_key_here
    DATABASE_URL=./data/chroma_db

Running the Application

Start the FastAPI server:

uvicorn app.main:app --reload

About

NexusRAG is an agentic, production-grade RAG system featuring hybrid search, cross-encoder re-ranking, and a FastAPI-powered knowledge retrieval pipeline for enterprise documentation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages