ResearchLens – Production RAG System
Production-oriented Retrieval-Augmented Generation system for research papers and technical docs. Combines hybrid retrieval (Dense + BM25 + RRF), cross-encoder reranking, evidence gating, and claim-level citation verification to minimize hallucination.
Standard LLM-based QA suffers from hallucination, poor exact-terminology retrieval, noisy context, unsupported claims, and no ability to abstain on false-premise questions. A simple embed-and-retrieve pipeline gives no control over these failure modes.
Designed a multi-stage pipeline: (1) Parallel dense (semantic) + BM25 (lexical) retrieval, (2) Reciprocal Rank Fusion to merge rankings, (3) Cross-encoder reranking for precision, (4) Context filtering to drop low-confidence passages, (5) Evidence gate that forces abstention when context is insufficient, (6) Grounded LLM generation, and (7) Claim-level citation verification post-generation. Evaluation pipeline measures Recall@5, MRR, groundedness, and citation accuracy independently.
- →Retrieval Recall@5 of 1.000 — relevant evidence present in top-5 for all evaluated queries
- →MRR of 0.942 — relevant evidence consistently ranked near the top
- →Groundedness / Faithfulness of 94.2% under claim-level evaluation
- →Citation Accuracy of 100% — every cited passage actually supports its claim
- →False Premise Rejection of 100% — system abstains on unsupported or misleading questions
- →Mean end-to-end latency of 365 ms across the full pipeline
- 01Hybrid retrieval (dense + BM25 + RRF) outperforms either strategy alone, especially for technical terminology and acronyms
- 02A second-stage cross-encoder reranker is critical for precision — bi-encoder retrieval optimises recall, not precision
- 03Evidence gating (abstaining when context is weak) is more important for production reliability than raw generation quality
- 04Claim-level citation verification catches cases where a citation exists but does not actually support the specific claim made