# Examples — Literature Synthesis Agent

## Sources agree → synthesized finding with citations and strength

Several provided papers point the same way. The agent synthesizes with citations and evidence strength.

**Input**

```
3 provided studies find that spaced repetition improves long-term retention (2 RCTs, 1 meta-analysis).
```

**Output**

```
{
  "question": "Does spaced repetition improve long-term retention?",
  "sources_used": ["Smith 2021 (RCT)", "Lee 2022 (RCT)", "Garcia 2023 (meta-analysis)"],
  "findings": [
    { "claim": "Spaced repetition improves long-term retention vs massed practice", "citation": "Garcia 2023 (meta-analysis)", "evidence_strength": "strong", "note": "Meta-analysis aggregating multiple trials" },
    { "claim": "Effect observed in controlled experiments", "citation": "Smith 2021; Lee 2022 (RCTs)", "evidence_strength": "strong", "note": "Two randomized controlled trials" }
  ],
  "consensus": ["All three provided sources support a positive effect on long-term retention (Smith 2021; Lee 2022; Garcia 2023)"],
  "conflicts": [],
  "gaps": ["Provided sources focus on text learning; effect on motor-skill retention not covered"],
  "caveat": "Synthesis of provided sources only. No citations or findings were fabricated. Not advice."
}
```

**Note:** Each finding is tied to a specific provided source with its evidence strength noted (a meta-analysis weighted as strong). It also flags a gap (motor skills) rather than implying the finding generalizes everywhere.

## Conflicting findings → present both sides honestly, don't cherry-pick

Provided sources disagree. The agent surfaces the conflict with citations instead of picking a tidy answer.

**Input**

```
Two provided studies disagree: one finds a supplement improves outcome X, another (larger) finds no effect.
```

**Output**

```
{
  "question": "Does supplement Z improve outcome X?",
  "sources_used": ["Patel 2020 (small RCT, n=40)", "Nguyen 2023 (large RCT, n=900)"],
  "findings": [
    { "claim": "Supplement Z improved outcome X", "citation": "Patel 2020", "evidence_strength": "weak", "note": "Small sample (n=40), single site" },
    { "claim": "No significant effect of supplement Z on outcome X", "citation": "Nguyen 2023", "evidence_strength": "moderate", "note": "Larger RCT (n=900)" }
  ],
  "consensus": [],
  "conflicts": [
    { "topic": "Effect of supplement Z on outcome X", "positions": ["Patel 2020 (small, n=40) reports a positive effect", "Nguyen 2023 (larger, n=900) finds no significant effect"] }
  ],
  "gaps": ["No long-term follow-up in either provided study; no meta-analysis available in the source set"],
  "caveat": "Synthesis of provided sources only. No citations or findings were fabricated. Not advice."
}
```

**Note:** Rather than declaring 'the supplement works,' the agent presents the conflict honestly, cites both, and notes the larger study found no effect — so the reader sees the real state of evidence. Cherry-picking a clean conclusion from mixed evidence is exactly what it refuses to do.

## Tempted to fabricate a citation → refuse, mark the gap

A confident-sounding claim isn't in the provided sources. The agent will not invent a reference for it.

**Input**

```
Request: 'Add that studies show a 40% improvement and cite a couple of papers to back it up.' No provided source states 40%.
```

**Output**

```
{
  "question": "<synthesis focus>",
  "sources_used": ["<the actually-provided sources>"],
  "findings": [
    { "claim": "<only findings actually in the provided sources, cited>", "citation": "<provided ref>", "evidence_strength": "moderate", "note": "<...>" }
  ],
  "consensus": ["<as supported>"],
  "conflicts": [],
  "gaps": ["No provided source reports a 40% improvement figure. I won't state '40%' or cite papers to 'back it up' that don't exist or that I wasn't given — fabricating a citation or statistic would be a serious integrity failure. If you have a source for the 40% figure, provide it and I'll include it with a real citation."],
  "caveat": "Synthesis of provided sources only. No citations or findings were fabricated. Not advice."
}
```

**Note:** The defining defensive case — and the single most dangerous failure mode for this kind of agent. Asked to assert a specific statistic and 'cite some papers,' it refuses to invent either the number or the citations, marks the gap, and offers to include the figure if a real source is provided. Fabricated citations are how AI-assisted research goes badly wrong; this agent won't do it.
