Anchorgrounded RAG with verified citations
Retrieval · LLM evaluation · shipped
A retrieval system over vLLM's documentation that refuses to answer when it cannot cite a source. Every claim is traced to the span it cites, and claims naming a CLI flag are checked against vLLM's actual source tree.
0.00
recall@3, hybrid with reranking, 52 questions
1/496
claims citing a span that does not support them
0%
agreement, free check against paid judge
0
symbols in the oracle, 433 CLI flags
0
sustained throughput, quantized, 2.74 s P99
- Corpus. vLLM cloned at a pinned commit. Docs, README and public docstrings parsed, every document tagged with version and commit so staleness stays detectable.
- Chunking. Two strategies written to the database at once so they can be queried identically: a 512-token sliding window, and a structure-aware splitter that never splits a fenced code block.
- Index. bge-small-en-v1.5 embeddings into pgvector with an HNSW index, Postgres full-text vector in the same row, so hybrid search is one SQL statement.
- Retrieve. Dense and sparse top-k fused by reciprocal rank fusion, then reranked by a bge-reranker-base cross-encoder over the shortlist.
- Ground. Claims split from the answer, scored against the cited span, checkable names routed to the symbol oracle, then the abstention policy applied.
- Serve. Qwen2.5-3B under 4-bit AWQ quantization through vLLM, load-tested with k6 to saturation at 12.5 req/s with zero failures across 1,080 requests.
A measurement bug, not a model bug. The first results table folded two failure modes into one column and reported a 37% hallucination rate. Split apart, claims citing a contradicting span versus claims citing nothing, the strict rate is 1 in 496. Three of the four worst bugs in this project were in the measurement, and each would have produced a plausible number that was wrong.
Where vLLM's documentation actually lives. Engine arguments are documented as attribute docstrings, which ast.get_docstring cannot see because they belong to no function or class. That is 532 field descriptions in vllm/config/ alone, missing from both the doc sources and a naive docstring pass.