Back to directory

rag-doc-qa

A reference implementation of production-style retrieval-augmented generation for document question answering, combining hybrid retrieval, citation grounding and a streaming chat API.

rag-doc-qa

rag-doc-qa goes beyond a vector-search-and-prompt demo with hybrid retrieval that fuses sparse BM25 and dense embeddings through reciprocal rank fusion, citation grounding that ties every answer token to a verifiable source span, and a streaming FastAPI service built to survive around 1,000 concurrent users.

Ingestion supports PDF, DOCX, HTML, Markdown, Notion exports, plain text and Confluence pages, with recursive character-and-token chunking and per-format heading awareness. Retrieval can use a hosted embedding model or a local model, with an optional cross-encoder reranking step, and evaluation measures context precision and recall, faithfulness and answer relevancy across embedding models and chunk sizes.

Vector storage is pluggable between Chroma for local development and pgvector for production Postgres deployments behind the same interface. The service exposes ingest, query, serve, evaluate and bench commands through a CLI, structured JSON logging, OpenTelemetry hooks and three YAML configuration profiles for base, local and production use.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.