Verifying AI Output

How to check AI answers by splitting them into claims and verifying numbers, facts, code and citations against sources outside the model.

12 minLesson 2 of 7
On this page
  1. How to check a reply
  2. Example: checking a budget summary
  3. Checking each type of claim
  4. Deciding how much to check
  5. Ways a check fails
  6. How to make replies easier to check
  7. What to practise next

Verifying AI output means checking what a model produced against something outside the model before you rely on it. It matters because a model writes wrong statements in the same confident tone as right ones, so the wording of a reply never tells you which parts to trust.

Without a check, small errors travel. A model that adds up a budget incorrectly will still present the total cleanly, and you may paste it into a document that other people then use.

How to check a reply

Rereading a reply is not a check, and neither is asking the model whether it is sure (Why Models Hallucinate explains why that does not help). A real check compares the reply with something that does not come from the model: your original data, a calculation you run yourself, an official document, or a test that passes or fails.

The routine has two steps. First, split the reply into claims, where a claim is anything that could be true or false, such as a number, a name, a date, or "this function handles empty input". Second, check each claim in the way that suits its type: recompute numbers, look facts up in a primary source, run code, and open citations and read them.

Example: checking a budget summary

The reply below summarizes a small budget. Read it once and see whether anything looks wrong.

The reply to checkIllustrative example. Real replies vary.
You
Summarize my monthly budget. Rent 950, groceries 312, transport 86, phone 45. Take-home pay 2,600.
Model
Here's your month at a glance. Rent is your largest expense at 950, which is 36.5% of your take-home pay. Total spending comes to 1,383, leaving you 1,217. Groceries are about 25% of your spending. One easy win: if you got transport down to 70, you would save 192 a year.

Nothing looks wrong, which is the point of the example. The reply contains six claims, and the tracer checks them one at a time.

Six claims from a budget summaryUse the arrows or ← → keys
  1. claims
    claimcheckresult
    1rent is the largest expense
    2rent is 36.5% of pay
    3total spending is 1,383
    41,217 is left from pay
    5groceries are about 25%
    6transport at 70 saves 192 a year
    checked
    0
    wrong
    0

    1The table has one row for each claim in the reply. Most of them are numbers, so the check is to recompute them.

  2. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay
    3total spending is 1,383
    41,217 is left from pay
    5groceries are about 25%
    6transport at 70 saves 192 a year
    checked
    1
    wrong
    0

    2Claim 1: 950 is larger than 312, 86 and 45, so rent is the largest expense. This claim is correct.

  3. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383
    41,217 is left from pay
    5groceries are about 25%
    6transport at 70 saves 192 a year
    checked
    2
    wrong
    0

    3Claim 2: 950 ÷ 2,600 = 0.365, which is 36.5%. This claim is correct.

  4. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383sum = 1,393wrong
    41,217 is left from pay
    5groceries are about 25%
    6transport at 70 saves 192 a year
    checked
    3
    wrong
    1

    4Claim 3: 950 + 312 + 86 + 45 = 1,393, not 1,383. The reply made an addition error and stated the result with full confidence.

  5. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383sum = 1,393wrong
    41,217 is left from pay2,600 − 1,393 = 1,207wrong
    5groceries are about 25%
    6transport at 70 saves 192 a year
    checked
    4
    wrong
    2

    5Claim 4: 2,600 − 1,393 = 1,207. The reply's 1,217 equals 2,600 − 1,383, so the wrong total produced a second wrong claim.

  6. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383sum = 1,393wrong
    41,217 is left from pay2,600 − 1,393 = 1,207wrong
    5groceries are about 25%312 / 1,393 = 22.4%wrong
    6transport at 70 saves 192 a year
    checked
    5
    wrong
    3

    6Claim 5: 312 ÷ 1,393 is 22.4%, and even with the reply's wrong total it would be 22.6%. The reply's "about 25%" is closer to a guess than a calculation, and it does not match the real share.

  7. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383sum = 1,393wrong
    41,217 is left from pay2,600 − 1,393 = 1,207wrong
    5groceries are about 25%312 / 1,393 = 22.4%wrong
    6transport at 70 saves 192 a year16 × 12 = 192correct
    checked
    6
    wrong
    3

    7Claim 6: (86 − 70) × 12 = 16 × 12 = 192, so this claim is correct. Advice built on numbers needs the same check as the numbers themselves.

  8. claims
    claimcheckresult
    1rent is the largest expense950 is the maxcorrect
    2rent is 36.5% of pay950 / 2,600 = 36.5%correct
    3total spending is 1,383sum = 1,393wrong
    41,217 is left from pay2,600 − 1,393 = 1,207wrong
    5groceries are about 25%312 / 1,393 = 22.4%wrong
    6transport at 70 saves 192 a year16 × 12 = 192correct
    checked
    6
    wrong
    3

    8Three of the six claims are wrong, and two of those come from the same addition error. Checking all six took a few minutes.

1 / 8

Checking each type of claim

Numbers

Models produce numbers the same way they produce words, one piece at a time, so even simple arithmetic is sometimes wrong. When a number matters, recompute it from the inputs instead of rereading the reply. For more than a few values, a short script is better than a calculator because you can rerun it when the inputs change.

Recompute the budget claims
const spending = { rent: 950, groceries: 312, transport: 86, phone: 45 };
const pay = 2600;
 
const total = Object.values(spending).reduce((sum, x) => sum + x, 0);
console.log("total:", total); // 1393
for (const [name, amount] of Object.entries(spending)) {
  console.log(name, ((100 * amount) / total).toFixed(1) + "%");
}
// rent 68.2%, groceries 22.4%, transport 6.2%, phone 3.2%
console.log("left over:", pay - total); // 1207
spending = {"rent": 950, "groceries": 312, "transport": 86, "phone": 45}
pay = 2600
 
total = sum(spending.values())
print("total:", total)  # 1393
for name, amount in spending.items():
    print(name, f"{100 * amount / total:.1f}%")
# rent 68.2%, groceries 22.4%, transport 6.2%, phone 3.2%
print("left over:", pay - total)  # 1207

Facts

Names, dates, versions, laws, prices and quotes need a primary source, such as the official documentation, the original report or the text of the law. A web page that repeats the claim may have copied the same mistake. For software, check the documentation for the version you use, because a function from an older version or from a different library is a common wrong answer.

Code

Run the code, then try inputs the example did not cover: an empty input, a single item, duplicates, negative values and very large values. Code that passes the one example in the reply can still fail on these. Coding With AI shows how to turn those cases into tests.

Citations

A citation makes three claims at once: that the source exists, that it says what the reply says it says, and that it is about the same thing as your question. You check them in that order. First open the source. A dead link, or a paper you cannot find by its title, is a strong sign the model invented it. Then search the page for the number or phrase. A source that is on topic but does not contain the claim does not support it. Finally read the text around the passage, because a real quote can mean the opposite in context or describe a different year, country or product.

Summaries of a document you provided

When you paste a document and ask for a summary, the facts in the reply should all come from your text, so the check is a comparison with that text. Look for two kinds of error. The first is a detail that is not in the document at all, such as a date or a reason the model filled in because it sounded plausible. The second is a detail that is in the document but changed, such as a "may" turned into a "will", a number moved to the wrong item, or a condition left out. Ask the model to quote the sentence behind each point, then search the document for that sentence.

Deciding how much to check

You cannot check everything with the same effort, and you do not need to. Ten name ideas for a newsletter need no checking, because a bad one costs you nothing. A figure you will send to your manager, a medication dose, a legal deadline or code that will run in production does need it. The question to ask is who notices if this is wrong and what it costs them. Check first where the answer is that someone else notices, late, and at a high cost.

Ways a check fails

How to make replies easier to check

Make the reply easy to check before you read it. Ask for exact quotes, page or section numbers, and the working or code behind any calculation. A quote takes seconds to find in a source, while a paraphrase or a bare number gives you nothing to compare against. Then pick the claims that would hurt most if wrong and check those first, recomputing numbers yourself and opening every citation you intend to rely on.

Try it: Plan the checks

An assistant wrote this for a team update. List each claim, say how you would check it, and decide which you would check first.

Show a sample answer

The three sentences contain five claims:

  1. 1,240 in May and 1,550 in June. Compare both with your analytics dashboard.
  2. A 20% increase. Recompute it: (1,550 − 1,240) ÷ 1,240 = 310 ÷ 1,240 = 25%, so the figure is wrong.
  3. Most of the growth came from referrals. Check sign-ups by source. This is a claim about cause, and the assistant may have guessed it from the launch date.
  4. The program launched on June 3. Check the release notes.
  5. The guide's quote. Find "well above typical" in the guide and confirm it covers the same kind of product and the same measure.

Check the percentage first, because it takes ten seconds and the rest of the update builds on it. Check the cause claim next, since it will decide what the team does.

Quick check

A reply says "your three invoices total 4,215". What is the right check?

A cited article exists and is on topic, but the quoted sentence is not in it. What should you conclude?

Which output most needs checking before use?

What to practise next

Take the last long AI reply you relied on, split it into claims, and check the two that would cause the most harm if they were wrong. Then read Writing a Good Brief to learn how to ask for work that is easier to check.