Tutorial · Research Workflows
How to Build a Cited AI Research Agent
A source-first workflow for turning open-web information into accountable AI answers.
Written by Aaron Grainger
Independent Content Strategist & Product-Marketing Writer · Published Sep 30, 2025
- Primary audience
- Research, intelligence, and editorial teams
- Also useful for
- AI application developers
- Tone
- Educational
- Reading time
- 4 min
- Published
- Sep 30, 2025
Direct answer
A cited research agent is built by making the evidence, not the prose, the primary artefact. Decompose the question, run an explicit query set, select sources against stated criteria, extract each claim with its supporting excerpt, and only then synthesise — using nothing that was not extracted. The output should report coverage and list what it could not establish, because an answer that cannot fail is an answer that cannot be trusted.
Research planning
Start by writing the question down and deciding what an acceptable answer looks like. Which claim types are in scope, what source types count as evidence, and how old a source may be. These are product decisions, not model decisions, and encoding them up front is what makes the rest of the pipeline inspectable.
Query decomposition
Break the question into sub-questions that can each be answered by a single passage. "Is this platform suitable for our team?" is not answerable; "Does it document SSO?", "Does it publish rate limits?", and "Does it offer EU data residency?" are. Keep the decomposition visible in the output — it is half the explanation of how the answer was produced.
Source discovery and selection
Run several phrasings per sub-question, then select rather than accept. Selection criteria should be written, not implicit: source type, recency, whether the source is primary for this claim, and whether a page plausibly contains the needed fact at all. Record rejected candidates with their rejection reason.
Retrieval and extraction
Retrieve and normalize each selected page, then extract the claim and the sentence or two that support it. If the passage is not there, record not-found. This is the single most important discipline in the whole workflow: the extractor must be allowed to come back empty.
- 01Question
- 02Sub-questions
- 03Query set
- 04Selection
- 05Retrieval
- 06Claim extraction
- 07Evaluation
- 08Synthesis
- 09Cited answer
Evaluation before synthesis
Between extraction and synthesis, assess the evidence set. Are there independent sources for material claims? Do any sources contradict one another? Is the oldest source within the acceptable age for its claim type? This step is where an honest agent decides it does not have enough to answer.
Prompt template for synthesis
You are composing an answer from a fixed evidence set. Rules:1. Use only the claims provided below. Do not add facts from memory.2. Every sentence stating a fact must reference a claim id.3. If claims conflict, present both and name the conflict.4. Anything the evidence does not establish goes in "unsupported".5. Do not smooth over gaps with general knowledge. QUESTION: {{question}}SUB-QUESTIONS: {{sub_questions}}EVIDENCE:{{#each claims}}[{{id}}] {{text}} source: {{source_url}} (retrieved {{retrieved_at}}) excerpt: "{{excerpt}}"{{/each}} Return JSON matching the answer schema.Structured output
{ "question": "Does the platform document EU data residency?", "answer": [ { "sentence": "EU processing is documented as available on enterprise plans.", "claim_ids": ["c1"], "confidence": "supported" } ], "claims": [ { "id": "c1", "text": "EU processing available on request for enterprise plans", "source_url": "https://example.com/docs/data-residency", "retrieved_at": "2026-09-14T10:12:00Z", "excerpt": "EU processing is available on request for enterprise plans." } ], "conflicts": [], "unsupported": ["Whether EU residency covers backups was not established."], "coverage": { "intended": 9, "reached": 7, "rejected": 2 }}Research-quality checklist
- Every fact-stating sentence references at least one extracted claim
- Every claim carries a URL, a retrieval time, and an excerpt
- Material claims have independent support, deduplicated by content
- Vendor statements are labelled as vendor statements
- Conflicts are shown rather than resolved
- Unreached sources reduce reported coverage instead of disappearing
- The oldest source used is within the acceptable age for its claim type
- A reviewer can verify any single claim in under thirty seconds
Citation quality and provenance
A citation is functional when a reader can confirm the claim quickly. That usually means the sentence level, a stored excerpt, and a retrieval timestamp. It also means noticing when a source no longer contains the excerpt you relied on — a check worth running before reusing an old answer.
Limitations to design around
- Unreliable sources. Authority is claim-specific. A vendor is authoritative about its own documentation and not about a competitor's behaviour.
- Stale pages. A page can be reachable and current-looking while describing a superseded state. Retrieval time is not publication time.
- Conflicting information. Disagreement between credible sources is information; automated resolution usually just picks the most confident wording.
- Inaccessible pages. Paywalls, consent walls, and blocks reduce coverage. Say so rather than answering around them.
- Hallucination at the seams. Most invented content in a cited system appears in transitions between claims. Constrain synthesis tightly and review the connective sentences.
What a good research agent should refuse to claim
- That something does not exist, when it only failed to appear in this query set
- That a vendor's marketing statement is an established capability
- That agreement between syndicated copies constitutes independent corroboration
- That a number is current when the page's age is unknown
- That it read a source it could not retrieve
- That a conclusion is settled when its sources conflict
- That its coverage was complete when parts of the plan failed
Questions that keep coming up
Practical takeaway
- Synthesis should be constrained to extracted claims, not free to elaborate.
- Store the excerpt, not just the URL — verification cost decides whether citations are real.
- Conflicts between credible sources should be preserved, not resolved.
- Report sources intended versus sources reached on every run.
- The agent needs an explicit vocabulary for what it cannot establish.
Related content
Technical guide · 6 min
How AI Agents Browse the Web Reliably
A practical guide to discovery, retrieval, clean context, structured extraction, and source traceability.
Technical guide · 2 min
How to Build Better AI Outputs With Source Metadata
What to carry alongside content, and what it lets your product say.
Strategic guide · 4 min
How to Measure AI-Answer Visibility
A practical, skeptical framework for tracking whether your product appears in AI-generated answers.
Workflow playbook · 6 min
Build a cited AI research assistant
Answer open questions from current public sources, with every claim linked to the passage that supports it.
Version history
Current: 1.0 · Published
- 1.0Sep 30, 2025First published.
Was this useful?
Sourceframe is an independent product concept created for research, product-design, and technical-content exploration. It is not an operating company, and nothing here describes a live commercial service. All examples, schemas, and code are illustrative unless a page says otherwise. No client data, customer outcomes, performance results, or partnerships are described anywhere on this site.