Skip to content
All projects

arXiv Research RAG

arXiv Research RAG screenshot

Overview

arXiv Research RAG is a research-focused retrieval-augmented generation engine built to answer questions strictly grounded in indexed academic literature, with a principled refusal system that aborts generation when evidence is insufficient.

Highlights

  • Hybrid Retrieval Pipeline

    Dense vector search (Chroma DB + Gemini embeddings) blended with sparse BM25 (SQLite FTS5 inverted index) via Reciprocal Rank Fusion (RRF), then cross-encoder reranked by a local Sentence-Transformers ms-marco model.

  • Zero-Hallucination Refusal Ladder

    A two-rung confidence gate aborts LLM generation when the top reranker score falls below a calibrated 70% threshold, returning a structured refusal at $0 API cost.

  • Semantic Cache

    Embedding-based query deduplication with cosine similarity — cache hits return in milliseconds with zero LLM calls, even for paraphrased queries.

  • MCP Live Fallback

    When the local 2,500-paper corpus lacks coverage, the Model Context Protocol client queries arXiv and Semantic Scholar live, generates a grounded answer, and auto-ingests the new papers into Chroma DB in the background.

  • Parent-Child Chunking

    Child chunks are retrieved, but full parent-window context is passed to the LLM, improving answer completeness without inflating index size.

  • Knowledge Graph

    Co-citation and co-authorship graph stored in a disk-backed JSON registry for paper network exploration.

Built with

  • Python
  • FastAPI / Uvicorn
  • Chroma DB
  • SQLite FTS5
  • Gemini Embeddings
  • Sentence-Transformers
  • MCP
  • arXiv API
  • RAG
  • BM25 + RRF
  • Semantic Cache
  • PM2