Skip to content
AI-Native PM

Retrieval: let the product look things up before it answers

Chapter 2 of 8 in Context & Memory · 15 min

Your research assistant product handles competitive questions well enough that the sales team starts relying on it. Then a rep asks what a rival charges for its enterprise tier, pastes the answer into a proposal, and the prospect corrects it in the meeting, because the rival cut that price months ago. The product answered from the model's training data, which ends sometime last year, and nothing in the answer suggested that the number could be out of date. Your team fixes it without a smarter model or a stricter prompt: you add one lookup step, a tool call that fetches the rival's current pricing page before the model writes anything, and the same model that quoted the old price now quotes the current one.

In Why hallucinations are context failures, not model failures we argued that most wrong answers happen because the right facts never reached the request the product sent to the model. This chapter covers the standard fix: a retrieval step that lets the product look things up before it answers. There are two ways to build that step, and choosing between them is a product decision, not an engineering detail.

Retrieval is a product decision about when the product looks facts up in your sources instead of answering from the model's training data.

Two architectures: search first, or hand the model a search tool

One-shot retrieval searches before the model runs. Your code takes the user's question, runs it as a query against your documents, and pastes the best matches into the request (the diagram calls this step STUFF). The model then answers once from what it was given. This is the classic pipeline the industry calls RAG, short for retrieval-augmented generation: retrieve first, then generate, in that fixed order, with the model playing no part in the search.

In agentic retrieval, the model runs the search itself. Your product sends the model a search tool with the request, and the model controls when to call it: it can call the tool, get the results back as new input, and search again with a better query when the first results miss. It repeats this loop of searching and reading results until it has results it can answer from or reaches a step limit you set. Engineering write-ups from the teams behind agentic research products describe this pattern: the first query is a rough guess, and the follow-up queries, rewritten once the first results come back, are the ones that find the answer.

Compare the two halves of the diagram. In one-shot retrieval, your code runs the search and the model works with whatever the search found. In agentic retrieval, the model runs the search, your code provides the tool and enforces the step limit, and you pay for every search and model call in the loop.

The tradeoffs you own: cost, predictability, and stakes

One-shot costs less and is more predictable, and agentic can handle more kinds of questions, so treat the choice between them as a roadmap decision.

  • One-shot is cheap, fast, and predictable. Every answer costs one search plus one model call, the response time stays about the same from question to question, and because the retrieved passages are logged next to every answer, checking whether the answer used them is straightforward.
  • Agentic handles the questions one-shot handles badly. A single fixed query cannot work through a vague question ("are we exposed to the new EU rules?") or a multi-hop question (one whose answer needs a second search that depends on what the first search found), but a model that can search again after the first results come back can work through both. The price is several searches and model calls per answer, and less predictability, since two runs of the same question can run different searches and end up at different passages.
  • A workable decision rule: match the architecture to the question type and the stakes. Direct questions whose answer sits in one findable document get one-shot. Vague, comparative, or multi-hop questions get agentic, and so does any question where a wrong answer costs enough to justify paying for follow-up searches. Many products run both, with one-shot as the default and agentic reserved for the questions that need follow-up searches.

When agentic retrieval fans out into many searches, the cost multiplies the same way it does when you run a fleet of agents: you pay for the tokens of every extra search. Economics: what a fleet costs and when it pays works through that multiplication in full.

When not to retrieve

Do not add retrieval to every product by default, because in three cases it is better to skip it entirely.

  • The facts fit in the prompt. If your whole shipping policy is two pages long, paste it into every request and stop there. Give the model the facts it wasn't trained on covers this simplest form of grounding (basing the answer on facts you supply), and on material that fits in the prompt, no search does better.
  • The knowledge never changes. Definitions, stable standards, and settled methods are well covered in training data, so test whether the model already handles them reliably on its own before you add a lookup step in front of them.
  • The feature has to respond instantly. Autocomplete in an email assistant or live suggestions in a meeting tool cannot wait for a search to run and return, and if a lookup doubles response time, the users who give up waiting can cost you more than the accuracy gains you.

Retrieval fails in three ways users can see

Once you ship a retrieval step, you have shipped a feature, and like any feature it can fail. That matters for your roadmap, because each way it fails needs its own detection and its own fix, and each one looks different to the user.

A retrieval step is a product feature with its own failure modes, not a checklist item you finish before launch.

  • Found nothing. The search returns no useful passage, and the model either answers from training data anyway, which brings back the stale-pricing failure that retrieval was meant to prevent, or declines to answer, which the user experiences as an unhelpful product. Detect it with the empty-result rate: the share of searches that return nothing useful.
  • Found the wrong thing. The search returns a real document that does not answer the question, the way a support bot pulls the retired policy instead of the current one, and the model writes a confident answer from it. This is the most dangerous of the three, because the answer cites a real document and looks more trustworthy than an unsupported guess. Detect it by comparing answers to their logged passages and flagging claims the passages do not contain.
  • Found too much. The search returns pages of near-matches, the useful passage is buried among them, and answers get slower, vaguer, and more expensive. Detect it by watching for result-count bloat: the number of passages and tokens per answer rising while accuracy stays flat.

Try it now

In this drill you collect the evidence behind every retrieval decision in this part, using your own documents and your everyday tools.

Get your questions. Write down ten real questions your users ask, or ten questions about a documentation set you have on hand. Mix direct lookups with at least a couple of vague or multi-hop questions.

Run the model with no retrieval. Ask all ten questions and save the answers.

Run one-shot retrieval. Upload the same documents to your provider's file-search feature, which runs one-shot retrieval for you, and ask the ten questions again. The Retrieval Stack Sheet lists the current tool names and pricing.

Run agentic retrieval. Ask the ten questions a third time with a hosted search tool the model calls itself, over the same documents where your tooling allows it, or over the live web where it does not.

Score all thirty answers. Mark each one found-right, found-wrong, or did-not-look, and note beside each question which architecture it actually needed. That column is the first draft of your retrieval roadmap.

Scale it down: run three questions against one document and score the nine answers the same way.

Chapter Summary

  • A retrieval step lets the product look facts up before it answers, instead of relying on the model's training data, which is months or years old.
  • One-shot retrieval searches first and hands the results to the model, which answers once. This is the classic RAG pipeline.
  • In agentic retrieval you hand the model a search tool, and the model calls it, takes the results as new input, and searches again with a better query when the first search misses.
  • One-shot is cheap, fast, predictable, and easy to evaluate. Agentic handles vague and multi-hop questions at more cost and less predictability.
  • Match the architecture to the question type and the stakes, and consider one-shot as the default, with agentic reserved for the questions that need follow-up searches.
  • Skip retrieval when the facts fit in the prompt, when the knowledge never changes, or when the feature cannot wait for a search to run.
  • Retrieval is a feature with three failure modes users can see: found nothing, found the wrong thing, and found too much. The wrong-thing failures are the dangerous ones because they look like good answers.
  • One-shot versus agentic is a choice about who runs the search. The next choice is what kind of search to run, and you make it in The search stack: match the retrieval method to the question.

Sources

  • Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems 33.
  • Anthropic engineering blog (2025). How we built our multi-agent research system.
  • OpenAI file search documentation and Anthropic tool use documentation (last verified July 2026).