DocDec · grounded answers from your own documents

Your RAG invents. DocDec cites — or says it doesn't know.

A plain vector-RAG returns the nearest chunk for every question, including the ones your documents don't answer — so it makes things up. DocDec answers only when a document grounds it, cites the exact source, and otherwise abstains: "not in your documents." See it side by side below, on a public benchmark, measured — failures kept.

grounded · cites its source · abstains runs on your hardware — documents never leave measured on SQuAD 2.0 · loading…
See itThe numbersHow it works Why it mattersSecurityAdoptionHonest limits

See it — the same question through both

Pick a real question from the benchmark corpus (Wikipedia articles on the Normans, Oxygen, and complexity theory). The baseline vector-RAG and DocDec both run live, right here in your browser. The coloured tag says what happens.

—

Or ask your own

Type anything. The loaded documents are three Wikipedia articles — the Normans, Oxygen and computational complexity theory — so ask about those, or ask about something else and watch it refuse. DocDec runs live in your browser: it answers with the paragraph it found and the words that matched, or says "not in your documents."

in the documents: not in them: try to fool it:

—

The numbers — measured, not asserted

DocDec vs a real vector-RAG (a local nomic-embed index, cosine top-1) over the — evaluation questions of the public SQuAD 2.0 corpus — half answerable, half deliberately unanswerable. This is a public demonstration benchmark, not a customer result; your documents would be your own. No figure here is hand-typed — each is what the run produced.

on the eval questionsDocDec (grounded)vector-RAG (top-1)

—

And on questions your documents simply don't cover

The table above is the hard test: SQuAD's unanswerable questions are written to look answerable. The everyday case is easier, and we measured it too — real questions people wrote about other subjects (other Wikipedia articles), put to the same documents, with the same settings:

—
questions on other subjects that DocDec refused
—
"look-alike" unanswerable questions it refused (the table above)
—
of either that a vector-RAG refuses — it can't

Two things here are true by architecture, not by tuning: the vector-RAG abstains on 0% of unanswerable questions (it can't — top-1 always returns a chunk), and every DocDec answer carries a citation. The rest — recall, precision, how often DocDec catches an unanswerable question — is measured above and discussed honestly in the limits.

Don't trust us — re-run it yourself

One click downloads the raw benchmark — the 130 paragraphs and 1,200 questions as plain text, plus the embedding vectors — and your browser recomputes everything from scratch with the same code: it splits the words, re-chooses DocDec's settings on the practice questions (so you can see we didn't cherry-pick them), then re-scores DocDec and the vector-RAG on the evaluation questions. Every number above is checked against what your machine gets. Nothing is uploaded. GitHub re-runs the same check on every change to this page.

≈6 MB download · a few seconds · runs in the background

How it works — traced from a real run

a question(may be unanswerable) vector-RAG embed · cosine · take nearest chunkALWAYS returns one — even when wrong answers anyway → invents on thequestions the documents don't cover DocDec score distinctive terms vs each doc;gate: strong + unambiguous match? yes → answer + CITE the paragraph no → ABSTAIN: "not in your documents"

The grounding is a plain, auditable function over your documents' distinctive terms — you can read exactly why it answered or refused, and the citation points at the paragraph that decided it. It also applies a relevance check: it abstains when the best paragraph isn't actually relevant to the question (not just sharing words), using a local-embedding signal — on your hardware, nothing sent out. Structure still picks and cites the answer; the check only vetoes a weak match. (The production engine deepens the routing privately; the behaviours — grounds, cites, abstains — are the same.)

Why it matters — for each role

For the person asking

An answer you can trust because it shows its source — and a straight "that's not in your documents" instead of a confident invention. The failure mode of RAG (a fluent wrong answer) is the one that costs you.

For Compliance / Risk

Every answer is auditable: it cites the exact paragraph, or it abstains. Grounded-or-silent is the property a regulator, a lawyer, or an auditor actually asks for — and the one a nearest-chunk retriever can't give.

For IT / Security

Sovereign. The documents and the index stay on your hardware; nothing is sent to a vendor cloud per query. The grounding runs on CPU — no per-question API bill.

For the data owner

Point it at your corpus; it answers from that, cites it, and refuses what isn't there. Replace a disappointing RAG at the retrieval seam without re-platforming.

Security & compliance, answered straight

QuestionAnswer
Where do our documents go?Nowhere. Ingestion and answering run on your own hardware. This demo page itself loads a public corpus and runs entirely in your browser — no server call.
Can it invent an answer?On a question your documents don't support, DocDec is built to abstain rather than return a nearest chunk. How often it catches that on an adversarial set is measured above and in the limits — stated straight, not promised away.
Is every answer traceable?Yes — each answer cites the source paragraph and the terms that resolved it. An abstention says why.
What does it cost to run?The grounding runs on CPU on your own box — no per-query cloud call. (Commercials are a conversation, not a web page.)

Adoption — how you'd roll it out

1 · Try your corpus

Point DocDec at a slice of your own documents and run your real questions — including the ones you know aren't covered, to watch it abstain.

2 · Sit it beside your RAG

Run the same questions through your current retriever and through DocDec; compare hallucinations, citations, and what each refuses. The before/after is the decision.

3 · Replace the seam

Swap DocDec in at the retrieval/answer boundary. It stays on your hardware; the answers come back grounded and cited.

Honest limits — the part a sales page usually hides

Grounding is a trade, and this benchmark shows it honestly — the numbers above are measured, not chosen. On SQuAD 2.0's answerable questions DocDec's recall sits below the vector-RAG's: a router that refuses weak matches answers fewer questions than one that always guesses. In exchange it answers with markedly higher precision, cites every answer, and — the point — abstains on a large share of the questions the documents don't cover, where the RAG hallucinates on every single one. (An earlier version of this page abstained on far fewer; a local-embedding relevance check more than tripled that, and the numbers above are the improved result.)

And it is not a magic no-hallucination box. SQuAD 2.0's "unanswerable" questions are adversarial — written to look answerable from a specific paragraph — so a transparent term-grounding router is fooled on many of them (the exact rate is in the table above, not spun). On questions about other subjects — the common real case — it is a different story, and now a measured one: asked — real questions from other Wikipedia articles, the full DocDec refused —. (Real questions written by people about other topics; a different kind of off-topic question could do worse — we'd measure on yours.) The in-browser free box, which has only the structural part, refuses — of the same questions; before 16 November it was tuned like the benchmark and refused only — — we found that, fixed it, and kept the before-number here. The honest summary: DocDec moves you from "always answers, often wrong" to "answers with a citation, or admits it doesn't know," and the measured abstention strengthens as the routing deepens in the production engine. Those numbers are a public-corpus demo, not a promise about your documents — we'd measure on yours.