Skip to content
Start free

Audit a three-claim summary

An AI summarized ticket sales in three sentences. Check each claim for grain, blanks and repeats, and rewrite the summary.

9 min

Free course. Your Maestro, an AI, .

Before you inspect any single category or average in an AI's report, think back to Module 4: what total do you need to establish and reconcile first so you can tell whether rows were dropped or counted twice?

Up to this point, you have diagnosed one calculation flaw at a time. In everyday work, you usually ask a broad question about a table and receive a short paragraph backed by several lines of code. When the underlying table has an export repeat or a blank cell, that single data issue can distort multiple sentences at once, while individual lines of code add their own mistakes.

A box office team exported an 8-row ticket table called lines and asked an AI to summarize last week's sales. The AI answered in three sentences:

"We sold 8 orders, with an average order of $42.50. Jazz brought in $200 and Poetry $90."

To audit a multi-claim answer systematically, run each claim through the same six checks before you rewrite a single number:

  1. Grain

    Check what one row in the table represents versus what the sentence claims to count or average. Identify which column uniquely labels a row (line_id) and which column groups rows into the unit named in the question (order_id).

  2. Divisor

    When a claim reports an average, check what mean() divided by. Averaging the raw table divides by the number of rows; averaging per order requires summing by order_id first and dividing by the count of orders.

  3. Denominator

    When a claim reports a share or rate, name the exact group in the denominator and check whether filtering or missing values shrank that base.

  4. Blanks and exclusions

    Inspect which columns contain None or NaN values and how each function treats them. By default, groupby() silently drops rows where the grouping column is blank unless you pass dropna=False.

  5. Repeats

    Check whether the unique row identifier repeats (duplicated(subset="line_id")). Distinguish duplicate copies of the same record from separate items in the same order that share a price.

  6. Reconcile the total

    Compare the raw table sum against the deduplicated sum, and verify that every category breakdown adds up to that cleaned total with nothing left out.

Here is how the checklist applies to Claim 1 ("We sold 8 orders"):

  • Grain and repeats: Each row in lines records one seat line (line_id L1 through L7) inside a customer order (order_id O1 through O5). Order O1 has two rows (L1 and L2, both Jazz at $40), and order O4 has two rows (L5 and L6, both Poetry at $30). Because those rows have distinct line_id values, they are legitimate separate seats bought on the same order. Meanwhile, line_id L3 (in order O2, Jazz at $60) appears twice in the 8-row export. If you want to verify why L1 and L2 are kept while the second L3 is dropped, ask your Maestro to compare the two columns.
  • Verdict and cause: False. The AI ran len(lines), which counted all 8 seat-line rows, including the repeated L3 row, instead of counting distinct orders.
  • Recomputed number: After deduplicating on line_id with lines.drop_duplicates(subset="line_id"), the table holds 7 valid seat lines across 5 distinct orders (clean["order_id"].nunique()).

Fixing Claim 1 in prose leaves the other two sentences broken because their code still ran on the raw lines table:

  • Claim 2 ("an average order of $42.50"): Check what lines["amount"].mean() averaged, what divisor it used, and how the repeated L3 row affected the . Then compute the average at the order grain on the deduplicated table.
  • Claim 3 ("Jazz brought in $200 and Poetry $90"): Check what lines.groupby("event")["amount"].sum() included and what it dropped. Seat line L7 (order O5, $50) has None in the event column, which represents unassigned ticket revenue that belongs in your report so the breakdown passes against total sales.

Try it

Run the exercise below to inspect the AI's output, remove the repeated line_id, and recompute the order count, the average per order, and the revenue by event (keeping blanks).

Your turn

Run the AI's code. Find the repeated line, count orders, compute the average per order without the repeat, and the revenue by event keeping blanks. You're done when your rewritten numbers reconcile to the true total.

Before you write your revised summary below, verify that your numbers agree across both groupings: the sum of your five order totals and the sum of your event breakdown (including the unassigned None row) should both equal clean["amount"].sum().

Try auditing Claims 2 and 3 on your own first. Hints after an attempt are fine, though using a hint records your work on this page as assisted. If you are stuck after your first attempt, ask your Maestro for a hint on the claim you are checking.

Check yourself: For Claim 2 ("average order of $42.50") and Claim 3 ("Jazz brought in $200 and Poetry $90"), state your verdict, what caused the error, and the recomputed numbers. Then write the corrected three-sentence summary that reconciles to the true sales total.

Check yourself: For Claim 2 ("average order of $42.50") and Claim 3 ("Jazz brought in $200 and Poetry $90"), state your verdict, what caused the error, and the recomputed numbers. Then write the corrected three-sentence summary that reconciles to the true sales total.

Ctrl+Enter or ⌘+Enter sends it.

Answer it yourself