RAG ENGINE Wikipedia · agentic retrieval

Backend settings

100K articles in production · benchmarked on 1M · hybrid retrieval · multi-hop agent

Ask Wikipedia.
Get a cited answer.

Hybrid HNSW + BM25 retrieval, cross-encoder reranking, and a hand-rolled multi-hop agent that extracts bridge entities, checks its own work — and refuses to answer when the evidence isn't there.

Tip: ask the same question again — the semantic cache answers in ~1 ms without touching the pipeline.
0
articles (prod)
0
articles (benchmark)
0
retrieval p50
0
search QPS
0
multi-hop gain
0
cost / query
Answer retrieving…
Agent trace
    Latency budget
    embed retrieve bridge hop 2 generate
    Wire protocol — SSE demo
    Server-sent events appear here as they stream.
    Retrieved passages top-k
    Under the hood

    One query, seven stages, no black boxes

    No frameworks in the hot path — the loop, the fusion, the abstention logic are all explicit code.

    semantic cache · cosine ≥ 0.97 → skip the entire pipeline (~1 ms) reflect · ≤3 hops Query POST /query Embed bge-small · 384d Dense — HNSW faiss · ef=64 · 0.39ms Sparse — BM25 bm25s · lexical match RRF rank fusion Rerank bge-reranker-base Agent loop bridge · cite · abstain Answer SSE + citations
    bge-small-en-v1.5 · 384d FAISS HNSW M=32 ef=64 bm25s reciprocal rank fusion bge-reranker-base gpt-4o-mini FastAPI · SSE Redis semantic cache
    Receipts

    Real numbers, reproducible runs

    Seed 42 · official pytrec_eval scoring · every figure below is a measured result, not a target.
    Benchmarked on 1M articles (8.8M vectors) · production serves top 100K articles on a €7.49/mo Hetzner CX33.

    HotpotQA · exact match
    0
    0.29
    0.49
    single-shotmulti-hop
    +20 EM points
    n=100 · gpt-4o-mini · F1 0.45 → 0.60
    Cost per query
    0
    8× under the $0.005 target
    4,160 tokens in · 41 out
    tracked per request, thread-local
    Retrieval latency
    0 ms p50
    98.6% recall@10
    HNSW ef=64 · benchmarked at 8.8M vectors
    300× faster than exact search
    Search throughput
    0
    QPS at p99 0.74 ms
    8 threads · M4 Pro
    FAISS releases the GIL
    BEIR datasetCorpusQueries nDCG@10Recall@10MRR
    SciFact5,183 docs300 0.72530.85290.6917
    NFCorpus3,633 docs323 0.33110.16090.5383
    ArguAna8,674 docs1,406 0.28260.61660.1793
    pipeline: bge-small-en-v1.5 dense + bm25s → reciprocal rank fusion → bge-reranker-base cross-encoder · scored with pytrec_eval · SciFact beats the BM25 baseline (0.665); ArguAna's counter-argument structure is a known dense-retrieval failure mode — reported, not hidden.
    0 / 100fabricated citations — every cited ID verified against the retrieved set
    4 / 5out-of-corpus questions correctly refused instead of guessed
    12 / 100answers self-corrected by the reflection pass before being returned
    $ bash scripts/reproduce_eval.sh # seed 42 · BEIR + HotpotQA + cost, end to end