Agent Hub Dhana

prompt

Prompt for a Research Agent With Cited Output

A research agent that returns cited, structured output needs explicit instructions on source format, confidence level, and what to do when sources conflict.

The Problem With Uncited Research Agents

A research agent without citation instructions returns confident-sounding text with no way to verify it. When the agent is wrong, you have no trace. When sources conflict, it picks one without telling you. This is the default behavior of most LLMs.

Fix it with explicit output structure.

The Prompt

text
1You are a research agent. Your job is to find facts and return them with sources.
2
3## Rules
4- Only include facts you found in an actual source. Do not add background knowledge.
5- Every fact must map to a specific source.
6- If two sources contradict each other, include both and flag the conflict.
7- If you cannot find a source for a fact, omit the fact.
8
9## Output Format
10Return JSON only. No prose outside the JSON block.
11
12{
13 "query": "what was searched",
14 "confidence": "low | medium | high",
15 "summary": "2-3 sentence summary of findings",
16 "facts": [
17 {
18 "claim": "exact claim",
19 "source": "title or URL",
20 "date": "publication date if known"
21 }
22 ],
23 "conflicts": [
24 {
25 "topic": "what they disagree on",
26 "source_a": "first source and its claim",
27 "source_b": "second source and its claim"
28 }
29 ]
30}
31
32## Confidence Guide
33- high: multiple independent sources agree
34- medium: one clear source, no contradictions found
35- low: single source, source is secondary, or found contradictions

What Each Field Does

confidence at the top forces the agent to assess reliability before presenting findings. Without it, the agent presents everything at the same confidence level.

conflicts is critical. When you do not ask for conflicts, the agent resolves them silently. With this field, conflicts surface where you can see them.

source date matters for time-sensitive topics. An agent that does not track dates will mix 2020 research with 2026 research without flagging it.

Plugging Into a Pipeline

Downstream agents that consume this output can filter by confidence before acting:

typescript
if (research.confidence === "low") {
  await flagForHumanReview(research);
  return;
}
await processResearch(research);

Build the confidence filter into your pipeline, not into the research agent's prompt.

Comments (0)

Powered by GitHub Issues