Skip to content

chain-of-verification

chain-of-verification reduces hallucinations by explicitly breaking out the verification step: generate a response, extract individual claims, verify each claim independently, then revise with corrections.

  • Factual question answering where accuracy is critical
  • Research summaries that will be cited
  • Any task where the LLM might confidently hallucinate specific facts
  • Legal, medical, or technical domains with high accuracy requirements
agents/my-cov/
├── AGENT.md ← pattern: chain-of-verification, config
├── verify.md ← extract verifiable claims
├── check.md ← verify each claim
└── revise.md ← revise with corrections
---
name: fact-checker
description: Answers questions with verified facts.
version: "1.0.0"
pattern: chain-of-verification
call:
model:
role: thinker
---
Answer the question comprehensively. Include specific facts, dates, names, and statistics where relevant.
Call finish with key="done" and your answer as value.
You have a generated response. Extract all verifiable factual claims.
For each claim, output it as a question that can be independently verified.
Format: one question per line, numbered.
Example: "The Eiffel Tower was built in 1889" → "Was the Eiffel Tower built in 1889?"
Call finish with key="done" and the numbered list of verification questions as value.
---
call:
uses:
- search-web
---
You have a list of factual claims to verify, expressed as questions.
For each question:
1. Search for authoritative sources
2. Mark the claim as VERIFIED, INCORRECT (with the correct fact), or UNVERIFIABLE
Format your response as a numbered list matching the input questions.
Call finish with key="done" and the verification results as value.
You have the original response and a set of fact-check results.
If all claims are VERIFIED, return the original response unchanged.
Otherwise, revise the response to correct all INCORRECT claims.
Remove or qualify UNVERIFIABLE claims.
Call finish with key="done" and the fact-checked response as value.
Terminal window
tama add chain-of-verification my-agent
AGENT.md body → generate response with factual claims
verify.md → extract claims as verifiable questions
check.md → look up each claim (uses search-web if available)
revise.md → correct errors, qualify unknowns