When a model looks things up, what does it find?
Before an assistant answers from your documents or the web, a search picks a few pages and hands them over. The model answers from those pages. A page that uses other words can be missed, and an old page that looks the same can be handed over instead.
A question about a made-up town, answered from its handbook of 16 pages:
What the search hands to the model
All five questions, asked this way
Right page handed over
Out of the five questions, asked this way.
Right answer
The chance, averaged over the five questions.
Found, then outvoted
Handed over, but the model answered from another page.
Search first, then answer
When an assistant answers from your files or the web, a search runs first. It scores every page against your question and hands the top few to the model.
The model answers from what it gets
The model reads only the pages it was handed. If the right page was left out, it still answers, from whatever it did get.
More pages cut both ways
Handing over more pages makes it likelier the right one is among them. Past a point, the extra near-matches start to pull answers off course.
The trap
An answer with a source looks checked. But the source is whatever the search found: an old timetable, a page that shares a few words, or the right page outvoted by its neighbours.
Open Under the hood to see how each page is scored and how the model picks among the pages it gets.
- a word counts for more when few pages use it (rare words point to the right page)
- a word repeated in a page counts more, but less than twice as much
- a long page is marked down a little, so a short page matching the same words wins
Real systems search by keywords like this, by meaning with embeddings (numbers that place similar text close together), or both. Searching by meaning would have matched "earliest coach" to "first bus" here. Neither kind can tell an old page from a current one by the words alone. Here the meaning search is a short hand-written list of matching words, and the model answers from a single page. Real systems cut documents into passages, search millions of them, often rerank the top ones with a second model, and hand the model every page it gets, so it can combine them or say none of them answers.
Why knowing this helps you
The answer can only be as good as the pages the search hands over, and you can shape what it finds.
Use the words the documents use
If the handbook says "bus", ask about the bus. Names, codes and exact terms from the source help a keyword search find the right page.
Clear out old versions
Keep outdated copies out of the folders an assistant searches. An old page that matches well can win over the current one.
Check the page it quotes
Open the source it cites and find the sentence it used. If the page is old or off topic, the answer is too.
Point it at the right place
When you know where the answer is, name the document or paste the passage. That skips the search and its mistakes.
Checked on 2026-10-06 against Anthropic's Contextual Retrieval post (hybrid search, and 20 passages beating 5 or 10), Jin et al. (2024) on answer quality as passages are added, and BM25's length normalisation (Robertson and Zaragoza, 2009).
Where this goes next
Next: shrinking a model
Under the hood starts with the numbers a model is made of: round each one to fewer allowed values, and see what it costs.
Then: fitting in memory
What decides whether a model runs on your machine: its size, its precision and how long the conversation gets.
Every score, rank and chance on this page comes from a C engine compiled to WebAssembly. The handbook and its town are made up; the search is real BM25, run in your browser over 16 short pages.