Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intelligent Enterprise Retrieval System (RAG)

High-Performance Async Pipeline | LlamaIndex + ChromaDB + FastAPI

This repository contains a production-grade Retrieval-Augmented Generation (RAG) system built to handle 10,000+ unstructured enterprise documents with sub-100ms retrieval latency.


Project Objective

Traditional LLMs suffer from hallucinations and lack of private context. This project solves that by building a context-aware answering engine that uses semantic search instead of keyword matching, optimized for high-concurrency enterprise environments.

Technical Architecture

  1. Data Ingestion: Large-scale PDF processing via SimpleDirectoryReader.
  2. Context-Aware Chunking: Utilized SentenceSplitter (Size: 1024, Overlap: 200) to maintain semantic integrity across documents.
  3. Persistent Vector Store: Integrated ChromaDB for efficient, disk-based vector indexing.
  4. Async API Layer: Built with FastAPI (async/await) to ensure non-blocking I/O during high traffic.

Key Contributions & Optimizations

  • Scalability: Optimized indexing logic to handle 10,000+ PDFs without memory degradation.
  • Latency Reduction: Achieved <100ms retrieval by implementing persistent storage and lazy-loading of the Query Engine.
  • Hybrid Strategy: Combined OpenAI text-embedding-3-small for precision with GPT-3.5-Turbo for grounded reasoning.
  • Production-Ready: Fully Dockerized with automated environment setup for seamless deployment.

Performance Benchmarks

Metric Result
Retrieval Latency ~85ms (Avg)
Document Capacity 10,000+ Enterprise Docs
Concurrency 50+ Parallel Requests (Async)
Accuracy Reduced Hallucination (Strict Grounding)

Tech Stack

  • Framework: LlamaIndex
  • API: FastAPI (Asynchronous)
  • Vector DB: ChromaDB
  • LLM/Embeddings: OpenAI API
  • DevOps: Docker & Docker Compose
  • Environment: Python 3.10+

How to Run

  1. Clone the repo.
  2. Add your OPENAI_API_KEY to .env.
  3. Run docker-compose up --build.
  4. Access the Async API at http://localhost:8000/docs.

Note: The overlapping window strategy (200 token overlap) was crucial in solving retrieval gaps for queries spanning multiple paragraphs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages