AtlasRAG is not just a chatbot β it's an evaluation-augmented Knowledge Intelligence System that solves the biggest problem in enterprise GenAI: Reliability.
Every response is audited in real-time by an internal LLM-as-a-Judge evaluation engine that scores for Faithfulness (no hallucinations) and Relevance (actually useful answers) before it ever reaches the user.
Most RAG systems blindly trust their LLM output. AtlasRAG doesn't.
| Feature | Standard RAG β | AtlasRAG β |
|---|---|---|
| Search Type | Vector Only | Hybrid (Vector + BM25 Keyword) |
| Accuracy | Prone to Hallucinations | Every Answer Scored Before It's Shown |
| Evaluation | None (Blind Trust) | LLM-as-a-Judge (Real-Time Audit) |
| Privacy | Cloud Vector DB | In-Memory Vector Store (Data Never Leaves) |
| Cost | High (OpenAI GPT-4) | Optimized (Gemini 2.5 Flash) |
| Dependencies | Heavy SDK chains (LangChain, ChromaDB, gRPC) | Lightweight Direct APIs (zero framework overhead) |
Every response is mathematically scored before being presented to the user.
- Faithfulness Score β Checks if the answer is grounded strictly in the retrieved documents.
- Relevance Score β Verifies if the answer actually addresses the user's query.
Combines the best of both retrieval paradigms for maximum accuracy:
- Vector Search (NumPy In-Memory Store) β Semantic understanding and conceptual matching.
- Keyword Search (Rank-BM25) β Exact matching of domain-specific jargon and technical terms.
- User-Controlled Chunking β Adjust chunk sizes (500β2000 tokens) via the UI to optimize for precision or context.
- Live Ingestion β Upload PDF documents directly through the sidebar. The system handles chunking, embedding, and indexing in real-time.
- In-Memory Processing β Knowledge is indexed in RAM for blazing-fast retrieval.
- Chat History β Automatically saves your conversation context.
- Export & Clear β Download your full chat history as JSON or clear it with a single click.
Flow: PDFs are ingested into a vector store β User queries trigger a Hybrid Search (Vector + BM25) β The LLM generates an answer β An Evaluation Judge audits the response for faithfulness and relevance β Only then is the answer shown to the user.
| Component | Technology | Why? |
|---|---|---|
| LLM (Inference) | Gemini 2.5 Flash | Latest high-speed model for reasoning & generation |
| LLM (Judge) | Gemini 2.5 Flash | Same high-tier model used for unbiased self-evaluation |
| Embeddings | Sentence-Transformers (all-MiniLM-L6-v2) | Fast, lightweight, local β no API quota needed |
| Vector Store | Custom In-Memory (NumPy) | Pure-Python cosine similarity β zero dependency crashes |
| Search Algorithm | BM25 + Vector | Hybrid retrieval for maximum recall |
| PDF Parsing | pypdf | Robust PDF text extraction |
| Frontend | Streamlit | Interactive UI with real-time metric dashboards |
- Python 3.10+
- A Google AI Studio API key (free tier works)
git clone https://github.com/R-Roy03/AtlasRAG.git
cd AtlasRAGpython -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
GOOGLE_API_KEY="your_google_api_key_here"streamlit run app.pyThe app will open in your browser at http://localhost:8501 π
- Launch the application with
streamlit run app.py. - Upload PDFs β Drag and drop your documents into the sidebar.
- Build Knowledge Base β Click "Update Knowledge Base" to trigger chunking and embedding.
- Ask Questions β Chat naturally. AtlasRAG retrieves context and generates grounded answers.
- Review Scores β Every response includes Faithfulness and Relevance scores so you know you can trust it.
Query: "Explain Kirchhoff's Current Law (KCL) with an example."
AtlasRAG Response:
"Kirchhoff's Current Law (KCL) states that the algebraic sum of the currents meeting at a junction in an electric circuit is equal to zero. Example: In a junction with entering currents Iβ, Iβ and leaving currents Iβ, Iβ: Iβ + Iβ = Iβ + Iβ."
| Metric | Score | Status |
|---|---|---|
| Faithfulness | 100% | β Grounded in source documents |
| Relevance | 100% | β Directly answers the query |
AtlasRAG/
βββ app.py # Main Streamlit application
βββ .streamlit/config.toml # Dark theme configuration
β
βββ ingestion/ # Document processing pipeline
β βββ loader.py # PDF loader (pypdf) + Document class
β βββ chunker.py # Recursive text splitter
β βββ vector_store.py # Pure-Python vector store (NumPy + Sentence-Transformers)
β
βββ retrieval/ # Search & retrieval engines
β βββ hybrid_search.py # Hybrid Vector + BM25 retriever
β
βββ inference/ # LLM generation
β βββ generator.py # Gemini 2.5 Flash (REST API)
β
βββ evaluation/ # Quality assurance
β βββ metrics.py # LLM-as-a-Judge evaluator
β
βββ assets/ # Static assets
β βββ atlas_icon.svg # App icon
β
βββ .github/workflows/
β βββ main.yml # CI/CD pipeline
β
βββ test_retrieval.py # Test suite
βββ requirements.txt # Dependencies
βββ LICENSE # MIT License
This project uses a lightweight dependency stack with direct API calls β no heavy SDK chains that break across versions. Simply run:
pip install -r requirements.txtAll dependencies will be restored to working versions.
This project is licensed under the MIT License β see the LICENSE file for details.
