Overview › Agent type
Retrieval
Fetching knowledge the model lacks: RAG, search over docs, knowledge bases, customer systems.
Specific to retrieval
- 8.a.i
Choose the retriever by corpus size and question type
On a bounded corpus (up to about 100K documents), grep and file reads over the raw text beat an embedding retriever: the agent narrows into documents it has found.
- 8.a.ii
Surface information the source holds but the agent cannot read
Find information a connected source holds that the agent never reads, and expose it.
- 8.b.i
Tune the search tool: snippets, enough results, retries, reformulation, filters, source quality
Make the search tool return what the model needs to choose what to open (a snippet per result, not just titles; five or more results; a full-document reader beside truncated search), retry failed searches, and reformulate when a query returns little (start broad, then narrow; use the corpus's own terms) rather than retrying it verbatim.
- 9.a.ii
Verify citations claim by claim for factual support
Extract claim-citation pairs deterministically, then check each: the link resolves, the source is relevant, and the source actually supports the claim.
General optimizations with evidence from retrieval
- 5.c.ii
Sub-agent architectures with clean contexts
Hand a context-heavy side task (code search, reading many files, documents or logs) to a sub-agent that starts with a fresh context and only the tools it needs, and have it return a short result or file references so the parent's context stays small.
- 6.b.ii
LLM map-reduce
Give each piece of a large or untrusted input its own tool-less model call that sees only that piece and must answer in a fixed schema, then combine the answers in code or in a reducer that never sees the raw text.
- 7.a.ii
Prompt chaining with gate checks
Split a task that decomposes cleanly into fixed steps into a chain of model calls, one goal per call, with a gate between steps: a schema check, an assertion, or a run against the real system, and an LLM check only for subjective criteria.
- 7.d.ii
Inversion of control
Give the agent the goal, the tools and the acceptance checks and let it choose the sequence of steps, instead of coding a fixed workflow; the goal, permissions, budget and evaluation stay outside the agent.
- 7.d.iii
ReAct loop
Run the agent as a loop: the model reasons, calls a tool, reads the result and picks the next step, until it answers or hits a cap.