Recipe: Validate a claim
The task
Someone hands you a factual claim — a number in an email, a line in a news summary, something a user just asserted — and you need to know whether it’s actually true before you repeat it.
Tool used: validate_claim. One call.
Copy-paste prompt
Fact-check this claim with Pipeworx's validate_claim tool. Tell me the verdict, the
actual value it found, and where that value came from. If it can't be verified,
say so plainly instead of guessing:
"<paste the claim here>"
What a good answer looks like
Every validate_claim call returns one of five verdicts — confirmed, approximately_correct, refuted, inconclusive, unsupported — plus enough of a trail to check the tool’s work rather than just take its word for it:
{
"claim": "Microsoft's most recent annual revenue was about $332 billion",
"verdict": "confirmed",
"reasoning": "MICROSOFT CORP revenue for period ending 2026-06-30 was $331.84B (concept: RevenueFromContractWithCustomerExcludingAssessedTax). Claim asserted $332.00B (0.0% off; tolerance 5%). Verdict: confirmed.",
"actual": {
"value": 331839000000,
"unit": "USD",
"period": "2026-06-30",
"concept": "RevenueFromContractWithCustomerExcludingAssessedTax"
},
"delta": { "abs": -161000000, "pct": 0.0005, "direction": "asserted_higher" },
"sources_used": ["edgar", "sec-xbrl"]
}
A trustworthy answer, whichever verdict it lands on, has:
- a
reasoningsentence that names the actual figure and period it compared against, in plain language — not just the verdict word - either an
actualblock (company-financial fast path — SEC EDGAR + XBRL) or agroundedblock (everything else — routed to whichever live source answers the underlying question, withevidencequoted verbatim) — never neither - a named
sources_usedentry (edgar/sec-xbrl, or whatever pack the grounded router picked) - for
refutedandapproximately_correct, adeltawith percent-off and direction, so you can judge materiality yourself instead of trusting the label
A plausible-sounding failure looks like a normal, confident response with an empty evidence trail — verdict unsupported or inconclusive, sources_used: [], no actual/grounded block. Don’t read unsupported as “the claim is false” — it means Pipeworx found nothing to check the claim against, which is a different (and more honest) answer than refuted. Read the reasoning field before repeating any verdict.
Step-by-step tool calls
1. Company-financial claims — the fast path
Claims about a public US company’s revenue, net income, or cash go through structured SEC EDGAR + XBRL, with exact percent-delta math:
validate_claim({ claim: "Microsoft's most recent annual revenue was about $332 billion" })
// → verdict: "confirmed" — actual.value $331.84B, delta 0.05%
The false version of the same claim:
validate_claim({ claim: "Microsoft's most recent annual revenue was about $280 billion" })
// → verdict: "refuted" — actual.value $331.84B (period 2026-06-30, from the FY2026 10-K),
// delta 15.6%, direction "actual_higher"
Between exact and clearly wrong sits approximately_correct — within tolerance (5% by default, capped there even when the wording says “about” or “roughly”):
validate_claim({ claim: "Microsoft's most recent annual revenue was approximately $325 billion" })
// → verdict: "approximately_correct" — 2.1% off, tolerance 5%
2. Everything else — the grounded fallthrough
Any other factual claim — macro statistics, rates, drug data, records — is routed automatically to whichever live source answers the underlying question, then judged against the retrieved evidence:
validate_claim({ claim: "The US unemployment rate in June 2026 was 4.2%" })
// → verdict: "confirmed", sources_used: ["econdata"]
// grounded.evidence: {"date":"2026-06-01","month":"June","rate":4.2}
validate_claim({ claim: "The US unemployment rate in June 2026 was 7.5%" })
// → verdict: "refuted" — grounded fact is 4.2%, reasoning notes
// "a difference of 3.3 percentage points"
3. When nothing can verify it
Not every claim has a live source behind it. validate_claim says so instead of guessing — that’s the correct answer, not a failure of the tool:
validate_claim({ claim: "Ozempic interacts dangerously with grapefruit juice" })
// → verdict: "unsupported", sources_used: []
// reasoning: "Drug interaction claim, not a company financial metric.
// No Pipeworx source could ground it either (not_in_source)."
Pipeworx has no drug-drug/drug-food interaction tool (see the drug safety profile recipe’s own caveat on this) — validate_claim correctly refuses here rather than inventing a verdict.
4. Tightening tolerance for hallucination detection
Pass tolerance_pct to override the wording-implied default — useful when you’re grading an LLM’s own output and any material drift should count against it:
validate_claim({
claim: "Microsoft's most recent annual revenue was approximately $325 billion",
tolerance_pct: 1
})
// → verdict: "refuted" (2.1% off > 1% tolerance) — the same claim graded
// approximately_correct at the default 5%
Citation pattern
Cite the company’s full XBRL facts collection, which is a registered resource:
Microsoft Corp’s most recent annual revenue (EDGAR facts) was $331.84B, confirming the claim within 0.05%.
The actual.concept field in the response (e.g. RevenueFromContractWithCustomerExcludingAssessedTax) names which XBRL line item was compared — narrow to it yourself when reading the facts resource rather than treating a concept-specific sub-path as its own citable link.
Caveats
- Two domains, one tool. v1 covers company-financial claims (revenue/net income/cash for SEC-reporting US companies) through structured XBRL, and falls through to a single-source grounded check for everything else. It doesn’t synthesize across multiple sources to adjudicate a claim — it grounds against the one source the router picks.
- A
refutedverdict on a claim naming a specific past fiscal year is worth a second look. Period selection matches by calendar year of the reported period-end, not by fiscal-year label. For a company that has since filed a later quarterly report whose period-end happens to fall in the same calendar year as an earlier fiscal-year-end, the comparison can land on the quarterly figure instead of the annual one. Checkactual.periodandactual.conceptagainst what you expected before repeating a surprising refutation. groundedclaims trust one routed source — the one named insources_used. For corroboration across multiple sources, run the domain recipe directly (e.g. drug safety profile) and compare yourself.- Tolerance is capped at 5% for company-financial claims regardless of wording — a headline number 8% off is material even hedged with “about.”
inconclusivemeans the grounded fact didn’t bear on the claim, not that the claim is unverifiable — usually a sign the underlying question was too narrow or the claim needs a specific period/entity.