Agents and AutomationLesson 50 of 72

Contents

Agents and Automation

Lesson 50 of 72. Sign in to keep your place.

Module 6 · Eight patterns that keep working

Pattern: search, read, cite, and verify the citation

10 min read

The shape

A question comes in. The agent searches, opens pages, reads, and produces an answer with citations. It is the most requested automation in most organisations and the one most likely to be wrong, because everything about the output signals reliability: it is fluent, it is structured, and it has links.

The check that makes it usable

Require every claim to carry a source URL and a verbatim quoted span from that page. Then verify in code that the span actually appears in the text you fetched.

Python
page = fetched[claim["url"]]
if normalise(claim["quote"]) not in normalise(page):
    claim["status"] = "unverified"     # never shown as supported

This is the same mechanism as the extraction quote check, and it is the single most valuable line of code in this pattern. It catches the failure that matters: a real URL attached to a claim that page does not make. A model can invent a sentence; it cannot make the sentence appear in a document you have in front of you.

Store the fetched pages with the report. Link rot, paywalls and edits mean the page a reader visits next month is not the page you read, and a stored snapshot is the difference between a defensible answer and an argument.

One search is not research

Left alone, an agent will run one query, read the top three results and write confidently. That is a summary of a search-engine ranking, not an answer.

Force breadth structurally: require at least three differently phrased queries, require sources from more than one domain, and make ”I could not find this” a legitimate output with its own field. An agent that cannot report absence will always report something.

The specific failure to design against is a niche question where the only pages available are content farms. The agent will use them, because they are what exists, and nothing in its output will distinguish them from a standards document.

Source quality is your job, not the model’s

Models are poor judges of authority. A well-formatted SEO page and a primary standards document read as equally credible, and the SEO page is often clearer, because it was written to be.

So rank domains yourself. Keep a list: official documentation, standards bodies, regulators, peer-reviewed journals and named primary sources at the top; general press below; content aggregators excluded. Pass the tier to the agent with each result and require it to prefer the higher tier when sources conflict. This is a hand-maintained list of thirty domains and it does more for output quality than any prompt engineering.

Design for disagreement

Real questions have contested answers. If the output schema has one answer field, the agent will produce one answer and silently pick a side.

Add a disagreements array, and require it to be populated when sources conflict. The structure forces the behaviour: a field that exists gets filled, and a reader who sees “two sources say X, one says Y, and here is the difference” is being told something true. This matters most in exactly the areas where it is tempting to give a clean answer (law, medicine, tax, anything cross-border) and giving a clean answer there is where a research tool does actual harm.

Recency cuts both ways

Search rankings favour recent content, so an agent asking about a stable technical fact may get a blog post from last month rather than the specification from 2019. Meanwhile, for fast-moving subjects, the model’s own knowledge is stale and it may override fresh sources with what it remembers.

Two habits: include the publication date with every source in the context and require it in the citation, and for anything time-sensitive, put today’s date in the final message so the agent is not reasoning from an assumed year.

Budget it, because this is the expensive pattern

Search, fetch, read, repeat: this is the shape that runs forty steps and re-sends a growing transcript each time. Cap the number of pages fetched, summarise each page down to its relevant passages before adding it to the transcript, and store full text on disk behind a handle. A research agent with no page budget is the most reliable way to discover the quadratic cost curve from the context-window lesson in the form of an invoice.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Check your understanding

A research agent produces a report where every claim has a real, working URL, yet several claims are not supported by the pages they cite. Which control catches this at scale?

Pick the one you would defend. Your answer stays private.

Next lesson · 9 minPattern: watch something, say when it changes

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘Pattern: search, read, cite, and verify the citation’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/the-research-agent (Accessed: 13 October 2026).