Authorization-first RAG,
not a chatbot demo.
PostgreSQL owns identity, corpus and generations. Qdrant is a derived index. Every answer is claim-bound to evidence or it abstains.
Diagnostic evidence only — not a release qualification. Not certified HSE advice.
Architecture
Authority
PostgreSQL is authoritative for tenants, ACLs, revisions, approvals, sealed generations, and spend. Qdrant collections are per-generation and reauthorized before any text is exposed.
Retrieval matrix
Frozen comparison: dense · dense+rerank · hybrid · hybrid+rerank × simple · agentic. Only the declared factor changes. Budgets: 40 candidates, 8 evidence blocks, 6,000 tokens.
Models
Embedding text-embedding-3-large 3072-dim + BM25 sparse. Generation gpt-5.6-luna. Rerank diagnostic: Cohere rerank-v4.0-pro. Qualifying profile pins local BGE — Cohere never silently substitutes.
Release gate
Deterministic grounding gate: claim-level citations with document / revision / content_sha256, or fail-closed abstention (insufficient · unauthorized · unsafe_evidence).
Top numbers
Source: docs/evaluation/2026-08-13-current-rag-benchmark.md + 2026-08-04-live-rag-triad-results.md. Three separate runs — do not blend.
Retrieval — 5 reviewed queries, 29 candidates/tenant
| Config | Recall@10 | nDCG@10 | MRR@10 |
|---|---|---|---|
| Dense baseline | 0.40 | 0.2524 | 0.20 |
| Cohere rerank-v4.0-pro | 1.00 | 0.6893 | 0.5917 |
| Target | ≥0.85 | — | ≥0.70 |
Recall passes · MRR fails — relevant revision present but not ranked early enough. 15 search units, $0.00, mean rerank 3041ms.
Historical end-to-end with Luna judge — 20 obs, rerank off
| Retrieval | Orch | Faithfulness | Relevance | Unsupported |
|---|---|---|---|---|
| Dense | Simple | 0.966 | 0.828 | 1 |
| Dense | Agentic | 0.990 | 0.760 | 0 |
| Hybrid | Simple | 0.978 | 0.830 | 1 |
| Hybrid | Agentic | 0.968 | 0.768 | 1 |
| Pooled | 0.9755 | 0.7965 | 3 | |
Context recall pooled 0.05. 3 unsupported claims = hard-gate failure despite high mean faithfulness. Acme relevance 0.944 vs Aurora 0.575.
Live reliability — 40 obs, 8 cells, no judge
| Cell | Cited | Mean | p95 |
|---|---|---|---|
| Hybrid · Simple | 5/5 | 7.69s | 8.43s |
| Dense · Simple | 5/5 | 7.87s | 10.44s |
| Hybrid · Agentic | 5/5 | 10.75s | 12.07s |
| Dense+rerank · Agentic | 5/5 | 17.41s | 19.34s |
| Hybrid+rerank · Agentic | 5/5 | 16.54s | 19.16s |
| Overall | 39/40 | 11.61s | 18.97s |
40/40 HTTP 200. One fail-closed unsafe_evidence abstention. Overall p95 18.97s fails 15s target even serial. Hybrid+Simple is the demo default — not a release winner.
Cost — that 40-obs matrix
Cumulative app spend $0.895818 actual / $0.946458 guarded. Per-answer ~5,086 input tokens — evidence repeats every query.
How quality is checked
- Frozen corpus / queries / dims / prompts / budgets — vary one factor only (
release_benchmark.py). - RAGChecker claim-P/R/F1 + RAGAS / ARES layers; retrieval scored separately from pipeline.
- Luna judge for faithfulness + relevance + unsupported count; citation precision 1.00 required.
- Safety is a hard gate — one unauthorized or unsupported release fails the run.
- Not yet measured: current claim-F1, unanswerable abstention, ACL/PII/injection safety, cold/warm cache, concurrency-10, signed 120-case corpus.
Run it locally
uv sync --all-groups cp .env.example .env make compose-up uv run rag-agno serve --host 127.0.0.1 --port 8000 # Evidence Desk (loopback only): uv run rag-agno evidence-desk # -> http://127.0.0.1:4173
Loopback only by contract. No public API, no browser-held bearer keys. Full gate: make check.