hRAG

hRAG

Self-hosted hybrid RAG on a small Hetzner cluster with transparent benchmarks

Freemium

Gallery

About hRAG

hRAG is a self-hosted hybrid retrieval augmented generation platform that runs on a surprisingly modest infrastructure footprint. The entire system sits on a five-node Kubernetes cluster at Hetzner for around 116 euros per month, which puts production-grade RAG within reach for teams that don't want to pay enterprise pricing or hand their documents to a third-party vendor. It combines BM25 lexical search with vector embeddings, fuses the results using configurable weighting, and passes them through a cross-encoder reranker before generating an answer. Every response includes numbered citations pointing back to the specific source chunks that informed it, so users can verify claims against the original documents.

The retrieval layer lives entirely in PostgreSQL. BM25 indexing runs inside the database and resolves in about 88 milliseconds across two million chunks. Vector search slots into the same query path with a configurable weighting ratio, defaulting to 0.3 for vector contributions. This fusion approach means you can tune how much lexical matching versus semantic similarity contributes to results. Row-level security handles multi-tenant isolation if you're running the system for more than one project or customer, keeping document sets completely separated at the database level. The cross-encoder reranker is optional because it adds noticeable latency, around 16 seconds on 2 vCPUs, but it improves precision significantly when that tradeoff makes sense for your use case.

What sets hRAG apart is its commitment to transparent benchmarking. The team publishes everything, including negative results, in a public GitHub repository. The system ranked ninth overall on the EnterpriseRAG-Bench with a 44.74 score, breaking down to 52.6 on correctness, 54.38 on completeness, and 69.65 on document recall. That recall number outperforms both Azure at 64.25 and Vertex AI Search at 61.76 on the same benchmark. You can reproduce these results yourself against the same 512,000-document synthetic corpus, which is rare in a space where most vendors hand-wave their evaluation methodology or cherry-pick favorable test sets. The benchmark runs are committed to the repository so anyone can audit the methodology.

Under the hood, four microservices handle ingest, embedding, reranking, and answer generation. The embedder model has 118 million parameters and runs on the cluster alongside everything else. Unified PostgreSQL handles vectors, BM25 indices, text storage, tenant data, and usage tracking in a single database rather than scattering state across multiple systems. Answers cost fractions of a cent per query at the inference layer, so the main expense is the infrastructure itself. The architecture is designed to let you run the whole stack without external dependencies beyond the LLM you choose for generation, giving you full control over where your documents live and how they're processed.

The grounding mechanisms go beyond just adding citations. Streaming citations arrive before answer generation begins, meaning the system identifies relevant sources before it starts composing a response rather than retrofitting citations after the fact. When the documents don't contain information relevant to a query, the system refuses to answer rather than hallucinating plausible-sounding content. This is a deliberate design choice that trades completeness for accuracy, aimed at organizations that would rather hear nothing than hear something wrong.

hRAG is aimed at organizations that need retrieval over private documents but don't want vendor lock-in or cloud-hosted data. If you've tried bolting a language model onto your corpus and watched it confidently cite sources that don't exist, this is the kind of tooling that keeps answers grounded. Healthcare companies, legal teams, enterprise knowledge bases, and anyone dealing with sensitive documents that can't leave their infrastructure would find the self-hosted model valuable. The multi-tenant capability makes it viable for SaaS applications where you need to provide document search to multiple customers without data leakage between them.

Access works on a freemium model. There's a free public playground with a 512,000-document corpus where you can test queries without creating an account. A paid private sandbox lets you upload your own documents, up to ten documents and twenty pages each, with a daily token budget for queries. Google and GitHub authentication gates the private tier. For teams that want full control, the entire project is MIT-licensed and the documentation covers self-hosted deployment on your own infrastructure. The emphasis on reproducibility means that if you want to run it yourself, all the benchmark data, configuration examples, and deployment scripts are public.

Key Features

  • BM25 plus vector hybrid retrieval
  • Cross-encoder reranking with citations
  • PostgreSQL-native indexing and search
  • Multi-tenant row-level security
  • Public benchmark reproduction
  • Self-hostable Kubernetes deployment

Pros & Cons

What we like

  • Entire stack runs on affordable Hetzner infrastructure
  • Transparent benchmarking with published negative results
  • Grounded answers with numbered source citations
  • No vendor lock-in for document storage

Room for improvement

  • Cross-encoder reranking adds significant latency
  • Requires Kubernetes knowledge to self-host
  • Private sandbox limits document count and size
  • Younger project with a smaller community

Frequently Asked Questions

What is hRAG?
hRAG is a self-hosted hybrid retrieval augmented generation system that combines BM25 lexical search with vector embeddings, reranks results with a cross-encoder, and generates answers with numbered citations. It runs on a five-node Kubernetes cluster and costs around 116 euros per month on Hetzner.
How does hRAG handle accuracy?
The system fuses BM25 and vector retrieval results, then passes them through a cross-encoder reranker to improve precision. Answers include numbered citations linking to source chunks, and the system refuses to answer when documents don't contain relevant information.
Is hRAG free to use?
There's a free public playground with a 512,000-document corpus for testing. Paid private sandboxes let you upload your own documents with daily token budgets. Self-hosting is also an option using the public codebase.
Who is hRAG for?
Organizations that need retrieval over private documents without vendor lock-in or cloud-hosted data. It's also useful for teams that want to benchmark and reproduce RAG performance transparently.

Best For

Running private document retrieval without cloud vendorsBuilding grounded Q&A over enterprise knowledge basesBenchmarking RAG performance with reproducible testsDeploying multi-tenant retrieval for SaaS products

Featured in

Alternatives to hRAG

Reviews (0)

No reviews yet

Be the first to share your experience with hRAG

Sign in to write a review

Badge builder

Add hRAG to your website

Choose a badge style and size, preview it here, then copy the generated HTML. Badge images are self-contained SVGs and do not require an external script.

hRAG badge preview
<a href="https://toolindex.net/tools/hrag?ref=badge" target="_blank" rel="noopener">
  <img src="https://toolindex.net/badge/hrag/medium.svg" alt="hRAG - Listed on Tool Index" width="180" height="50" />
</a>

How to use the badge

  1. 1. Pick the style, size, and theme that fit your layout.
  2. 2. Copy the generated HTML from the code block.
  3. 3. Paste it into your footer, homepage, or press page.

Standard badge available

The standard listing badge is available now. Score and circle badges are limited to tools currently ranked in the top 10 of a category.

Badge clicks return visitors to this profile with a referral tag so the source remains identifiable.