Sohel2309/enterprise-rag
Enterprise RAG Platform
Production-grade retrieval-augmented generation system with hybrid retrieval, intelligent reranking, and conversation memory.


Overview
Enterprise RAG Platform combines BM25 sparse + BGE dense embeddings with Cohere reranking to deliver accurate, context-aware answers. Features conversation memory, real-time document upload, and automated RAGAS evaluation.
๐ Key Results
๐๏ธ Architecture
Retrieval Pipeline:
- BM25 (sparse) + BGE-large embeddings (dense) with RRF fusion
- Cohere cross-encoder reranking (top-60 โ top-10)
- DeBERTa-v3 NLI hallucination detection per-chunk
Generation:
- Groq
openai/gpt-oss-120bwith 3-turn conversation memory - Automatic session management + real-time document ingestion
๐ Tech Stack
FastAPI ยท Streamlit ยท FAISS ยท BGE Embeddings ยท Cohere Reranking ยท Groq LLM ยท RAGAS Evaluation ยท HuggingFace Spaces
โก Quick Start
# Install
pip install -r requirements.txt
# Run locally
uvicorn api.rag_api:app --reload --port 8000 # Terminal 1
streamlit run ui/streamlit_app.py # Terminal 2
# Visit http://localhost:8501๐ Project Structure
Enterprise-RAG/
โโโ api/ # FastAPI backend
โโโ ingestion/ # PDF/DOCX parsing + 5 chunking strategies
โโโ retrieval/ # BM25 + FAISS + Cohere reranking
โโโ generation/ # Groq LLM client
โโโ evaluation/ # RAGAS + hallucination detection
โโโ ui/ # Streamlit dashboard (3 tabs)
โโโ data/
โโโ processed/ # Pre-indexed chunks (FAISS + BM25)๐ฏ Features
โ Hybrid retrieval (BM25 + dense embeddings)
โ Intelligent reranking with Cohere
โ Multi-turn conversation memory
โ Real-time PDF/DOCX upload
โ Automated hallucination detection
โ Interactive evaluation dashboard
๐ Benchmark
Fixed-size chunking outperformed sentence-based by 17% on context precision. Evaluated on 50 ArXiv papers with 355 QA pairs.
๐ Evaluation Methodology & Limitations
The metrics in Key Results are produced by an LLM-as-judge evaluation, not a human-labeled benchmark. The judge model is openai/gpt-oss-120b, run against a held-out set of QA pairs using the exact same retrieval configuration as production (hybrid retrieval + Cohere reranking). The current reported run evaluated 45 valid samples.
Two limitations worth stating plainly:
- Self-judging bias: the same model (
openai/gpt-oss-120b) is used for both answer generation and evaluation scoring. LLM judges are known to show some self-preference bias, so these scores should be read as internal, project-level evidence of pipeline quality โ not as an external or industry benchmark. - Sample size: 45 samples is directional evidence appropriate for a project of this scope, not a statistically rigorous evaluation.
These numbers are useful for demonstrating that retrieval and generation quality were measured and iterated on, not just assumed to work.
๐ Links
- Live Demo: https://sohel2309-enterprise-rag.hf.space
- Code: https://github.com/Sohel2309/Enterprise-RAG
MIT License | Last Updated: June 2026
