On 40 test questions, one model got 118 of 120 answers right with whole sections loaded by topic and 115 with the 5 most similar chunks (54 from the metric definitions alone, which hold no document answers); told not to fill gaps, it filled none of the 8 gap questions, 3 runs each, in any setup
The earlier parts of this study gave a model short texts whole: a documentation bundle, a policy page, a note. Here the fictional bank's knowledge sits in 4 documents: product terms, fee rules and service procedures, plus the governed metric definitions, 34 sections in all. Claude Sonnet 5.5 answered 12 fact questions, 10 procedure questions, 10 metric questions and 8 questions no document answers, 3 times each, with the context chosen three ways: the chunks closest to the question by embedding similarity, the whole sections tagged with the topics the model picked first, or the metric definitions alone.
The definitions-alone setup is a floor, not a contender: the definitions hold no document answers, so it can score only on metric and gap questions. Given only the definitions, it got all 30 metric answers right and declined all 66 document questions instead of guessing. Similarity search missed the definition one metric question needed, and the model declined it all 3 times; whole sections held the evidence for every answerable question. No answer in any setup was wrong. The grader called 4 procedure answers incomplete, and every count on this page keeps those verdicts. Read after the results, each of those answers states the steps the grader called missing in the procedure's own words (see How it was checked).
Key figures per setup
Classify, then whole sections118 of 120right, whole sections loaded by topic: facts 36 of 36, procedures 28 of 30, metrics 30 of 30, gap questions declined 24 of 24. Answers declined on answerable questions: 0; gap-fills 0. About 430 words of context per question (from 91 to 850).
Similarity-first chunks115 of 120right, the 5 most similar chunks: facts 36 of 36, procedures 28 of 30, metrics 27 of 30, gap questions declined 24 of 24. Answers declined on answerable questions: 3; gap-fills 0. About 400 words of context per question (from 365 to 429).
Governed definitions alone54 of 120right, the governed definitions alone: facts 0 of 36, procedures 0 of 30, metrics 30 of 30, gap questions declined 24 of 24. Answers declined on answerable questions: 66; gap-fills 0. About 400 words of context per question.
Main limitation A small corpus I wrote with the questions, knowing the three designs: 5 chunks were a seventh of all 35, so similarity search held every needed passage for 31 of the 32 answerable questions and both retrieval designs sat near the ceiling. Every request said not to fill gaps, and one model was tested.
Right answers, per way of giving the model context
The two retrieval designs differ by +2.5 points over all 40 questions (95% interval 0.0 to +7.5): the 3 metric answers the chunks could not support. On the 22 document questions they are level. The definitions alone score on metric and gap questions only.
Share of the 120 answers right (40 questions, 3 runs each). A gap question is right when the answer says the context does not cover it.
Show the data
Outcomes by setup and kind of question, from results-retrieval.json. Incomplete is the grader's verdict; see How it was checked.
Setup and kind
Answers
Right
Incomplete
Declined
Wrong
Gap filled
Classify, then whole sections, fact from a document
36
36
0
0
0
Classify, then whole sections, procedure from a document
30
28
2
0
0
Classify, then whole sections, metric definition
30
30
0
0
0
Classify, then whole sections, gap (no document answers it)
24
24
0
0
0
0
Similarity-first chunks, fact from a document
36
36
0
0
0
Similarity-first chunks, procedure from a document
30
28
2
0
0
Similarity-first chunks, metric definition
30
27
0
3
0
Similarity-first chunks, gap (no document answers it)
24
24
0
0
0
0
Governed definitions alone, fact from a document
36
0
0
36
0
Governed definitions alone, procedure from a document
30
0
0
30
0
Governed definitions alone, metric definition
30
30
0
0
0
Governed definitions alone, gap (no document answers it)
24
24
0
0
0
0
Answerable questions whose every needed passage sits in the top chunks, from the stored vectors with no model call. The design used 5.
The one answerable question where the chunks missed the passage it needs, run 1 of 3. The other runs went the same way. Answers are quoted as the model wrote them.
Question: A card purchase is initiated on 31 July 2026 and posts on 1 August 2026. In which month does it count toward gross card spend? Answer July or August.
The closest chunks by cosine similarity; the first 5 were the context.
Rank
Chunk
Document and section
Similarity
1
MET-c06
Metric definitions, MD-05 Closing ledger balance and Periods and row identifiers
0.764
2
PRC-c01
Service procedures and escalation, intro and Disputing a card purchase
0.733
3
TERMS-c05
Business account and card terms, Card status and Statements and Transfers between accounts
0.711
4
FEE-c02
Fee rules, When fees are charged and Monthly service fee
0.710
5
MET-c03
Metric definitions, MD-02 Refunded amount and MD-03 Net card spend
0.689
6
MET-c01
Metric definitions, intro and MD-01 Gross card spend (holds the definition)
0.682
Similarity-first chunks
None of the 5 closest chunks holds the definition of gross card spend; the one that does ranked 6th. The model said the context does not give the definition and declined, as it was told to.
The context does not say whether gross card spend is attributed by purchase date or by posting date. It only shows that metric rows in card_spend_daily are filtered by spend_date and that periods are half-open (July 2026 is 2026-07-01 to 2026-08-01), but the definition of MD-01 and of spend_date is not provided, so the month cannot be determined.
Classify, then whole sections
The model first picked one topic, metrics, which loaded all 7 sections of the metric definitions, the definition among them. It answered August, the key.
Gross card spend (MD-01) counts purchases by the posted_at date, not the initiation date. A purchase posting on 1 August 2026 falls in the August period (2026-08-01 to 2026-09-01), not July, whose period ends before 2026-08-01.
What was predicted, and what held
Six predictions were written into the design before any model call. All six held, which was largely expected: predictions 2 and 3 were close to safe bets (prediction 3 labelled so after the results). Prediction 6, on routing, was the informative one: it tested whether the model's own topic picks loaded the passages each answer needed.
(1) With the definitions alone, specific answers to the 66 document answers would be at most 10%: there were 0. Held.
(2) With the definitions alone, at least 90% of the 30 metric answers would be right: all 30 were. Held, and declared close to a safe bet in advance, since the definitions were given whole.
(3) In each retrieval design, at least 80% of the 66 document answers would be right: 64 with chunks and 64 with sections (97.0% each). Held, and close to a safe bet (a label added after the results): before any model call the 5 chunks were known to hold every needed passage for all answerable questions but one (a metric question, the one in the worked example), and the section tags were written knowing the questions.
(4) Incomplete procedures would be at most 20% of the 30 procedure answers in each retrieval design, with at least as many for chunks as for sections: 2 and 2. Held, the second half by a tie, and every one of those verdicts is a grader miss (see How it was checked).
(5) Gap-fills would be at most 10% of the 24 gap answers in each design: 0 in every design. Held. With 8 gap questions, a count of zero still allows a rate up to 36.9% of questions (95% exact binomial bound, added after the results).
(6) With sections loaded by topic, the loaded text would hold every needed passage in at least 90% of the answers to the answerable questions: 96 of 96. Held.
The counts are the frozen protocol's, computed from the data: 32 answerable questions (22 document and 10 metric), 31 of them held by the chunks, so 96 answers.
What a team should check before choosing how a model finds its documents
Measure whether retrieval finds the passage, before measuring answers. Write questions whose supporting passages are known, then count how often the top chunks hold them. Here that needs no model call: the top chunk held the evidence for 18 of 32 answerable questions, the top 3 for 29 and the top 5 for 31. That count predicted the one question the chunks lost.
If the documents have sections, try loading whole sections by topic. Tagging each section with a few topics and letting the model pick one or two held every needed passage in all 96 answers to answerable questions here, with about the same words of context on average. It keeps a numbered procedure in one piece. It depends on the tags: a section with a missing tag is invisible to it.
Tell the model what to do when the context falls short, and check that it does. Every request said to answer only from the context and say what is missing. Across the 141 answers whose context lacked the evidence, the model gave no specific answer. This test cannot say how often it would fill gaps without that instruction.
Do not expect governed definitions to answer policy questions. With the definitions alone, the model got every metric question right and declined all 66 document answers. A metrics layer and a document library answer different questions; an assistant needs a route to each.
Check a model grader with code. Anchor words per rubric step caught every procedure the grader marked incomplete wrongly here.
Limits
I wrote the 4 documents and the 40 questions together, knowing the three designs. Some choices make the designs differ on purpose: sibling facts side by side, numbered procedures a chunk can cut, gap questions next to covered topics. The documents agree with each other and have one version of each rule; a real library has old versions and documents that disagree.
The corpus is small: 34 sections, 35 chunks. 5 chunks were a seventh of it, so similarity search had few competitors for its places, and both retrieval designs sat near the ceiling. The difference between them is 3 answers to one question.
Metric questions are answered from one topic, metrics, which loads the whole definitions document, so the sections design wins them by construction: the whole gap of 118 to 115 is the 3 answers to the question in the worked example. The topic picker also sees topic descriptions I wrote, which the chunks design does not get.
One tested model, 3 runs per question and design, one embedding model, one chunk size and one number of chunks. The topic tags (13 topics) and the topic-picking prompt are mine; other choices would move either design.
The instruction not to fill gaps was in every request, so the gap-fill counts measure the model with that instruction.
Few gap questions: 8. Zero gap-fills over them leaves a wide bound (see the predictions).
The procedure grader is one model, checked against anchor words; where the two disagreed, the anchors were right (see How it was checked), and other grader errors are not measured.
Context size differs by design: the sections design loaded from 91 to 850 words, the chunks design a steady 365 to 429. On a larger library a topic could load far more text than a model should read.
How it was checked
The value comes last, a protocol change made after the pilot and before the scored run. The answer schema asks for the steps and the sentence before the value, so the value follows the working. No pilot answer is scored.
The grader against the anchor words. The grader and the anchor words agreed on 286 of 294 step judgements. All 8 disagreements are one way, the grader calling a step missing that the answer states, in 4 answers to the same question, 2 in each retrieval design: every incomplete verdict on the page. Computed after the results, the steps called missing are stated in those answers as A declined request can be raised as a complaint, starting at level 1. and An approved reversal posts as a credit within 5 business days., the procedure's own sentences; re-scored with the anchors, no procedure answer in any design is incomplete. The results keep the grader's verdicts, as declared.
Details the grader called unsupported. It listed 6 details in 5 procedure answers as not in the reference text. Checked after the results: 3 are section labels, 2 are figures that appear word for word in the documents, and 1 restates a fee rule sentence. None is a gap-fill.
Ids set after the results. The section and chunk ids of the account and card terms document start with TERMS, set by a declared protocol change after the run. Nothing scored changed.
Every answer replays with no model call: the sections and chunks are rebuilt from the documents and compared with the frozen ones, the rankings are recomputed from the stored vectors, and every answer is scored again.
Use this at your company
To run the same test on your own documents, paste this into your AI assistant and give it a copy of the documents and the questions staff actually ask.
This method comes from Diogo Travassos's study "Retrieval over documents" (https://diogotravassos.dev/agent-ready-data-marts/document-retrieval.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.
Help me test how an AI assistant should find the passages it answers from in our policy and procedure documents, and whether it fills gaps with plausible answers when the passage is missing.
Method:
1. Collect the documents, split into their sections, and the metric definitions we govern. Tag each section with one to three topics from a short list.
2. Write 40 or more questions before any run, with the answer and the exact passages that support it: facts with one number, procedures with their required steps, metric questions, and questions no document answers.
3. Build three contexts per question: the top chunks by embedding similarity (an open embedding model run locally is enough), the whole sections tagged with the topics the model picks for the question, and the metric definitions alone.
4. Before any model call, count how often each context holds every supporting passage. This shows what retrieval can find before you pay for answers.
5. Ask the model each question three times per context, in a fixed answer format with a field that says whether the context covers the question. Tell it to answer only from the context and say what is missing.
6. Score facts and metrics against the answer exactly. Score procedures against a rubric of required steps, with a second model as grader and a word check on each step as a cross-check.
Data you need: the documents, the metric definitions, and a list of real staff questions to model the test questions on.
Checks before trusting the result:
- Freeze the documents, questions, tags and rubrics before any model sees them, and write down which choices favour which design.
- Count a gap-fill only when the answer is specific and the context lacked the supporting passage.
- Where the grader and the word check disagree, read the answers before trusting either.
- Report method failures and re-runs separately; never drop them silently.
Report back: right answers, incomplete procedures and gap-fills per design, with intervals from resampling the questions; how often each context held the evidence; the words of context per design; and the limits: who wrote the questions, how large the library is, one model.
In your report, say which study you followed and link it: https://diogotravassos.dev/agent-ready-data-marts/document-retrieval.html
40 questions in retrieval-questions.json: 12 facts with one number, 10 procedures with a rubric of required steps, 10 metric questions answerable from the definitions alone, and 8 gap questions that no document answers. Each answerable question lists the exact passages that support its key. The documents, questions, tags and rubrics were frozen before any model saw them.
The three designs
Similarity-first chunks. Each document is cut into chunks of whole sentences, at most 80 words, each starting with the last sentence of the one before: 35 chunks. Chunks and questions are embedded with an open embedding model run locally on CPU (bge-small-en-v1.5, 384 numbers per text); the vectors sit in a DuckDB table, and the 5 chunks with the highest cosine similarity are the context. The vectors are stored in retrieval-embeddings.json, so ranking needs no model; embed_retrieval.py recomputes them.
Classify, then whole sections. The tested model picks one or two of 13 topics for the question in its own request; every section tagged with a picked topic loads whole, in document order.
Governed definitions alone. The metric definitions, whole.
The request is the same in every design except the context. The chunk size and number were set before any ranking was computed.
Model, runs and scoring
Claude Sonnet 5.5, effort medium, thinking limited to between tool calls with no tools offered, a 1,500-token output ceiling (300 for picking topics) and a response schema: covered, steps, answer, value. 3 runs per question and design: 360 answers and 120 topic picks, with no method failure and no re-run.
Facts and metrics are right when the answer is specific and its value equals the key. Gap questions are right when the answer is not specific. Procedures are graded by an independent model that is not the tested model, against the reference sections and the rubric: right with every step and no contradiction, incomplete with a step missing, wrong with a contradiction. Anchor words per step are the mechanical cross-check.
A gap-fill is a specific answer when the context lacked a supporting passage, checked by exact text match on the context.
Shares are means of per-question shares of runs, with a percentile bootstrap over questions (10,000 resamples, seed 7, 95% intervals), paired for differences between designs.
Files
The design and the frozen protocol were committed before the pilot; the protocol pins the documents, questions, tags, vectors, code and every chunk, definitions and topic request. The protocol change made after the pilot records the new answer schema. The results are in results-retrieval.json and the figures computed after the results in results-retrieval-after.json. Replay needs no model call. The grader is not named, so the grading cannot be re-run from the download alone.
python3 -B replay_retrieval.py --check # rebuild sections, chunks and rankings, score every answer with no model call
python3 -B analysis_retrieval.py --check # rebuild the readings made after the results
python3 -B render_retrieval.py --check # rebuild this page and check it is unchanged
Ranking needs the pinned DuckDB; recomputing the vectors needs the pinned embedding library in requirements-embeddings.lock.