Summarize a data table into five findings.
Done by an agent. Checked twice.
Five findings from a public jobs table, each number recomputed from named cells a reader can look up.
Real files in
- about_this_table.md
A short note on the table's publisher, unit, rows and columns. 8 lines, 733 bytes. - jobs_by_industry.csv
BLS Current Employment Statistics: employees on nonfarm payrolls, in thousands, seasonally adjusted. Trimmed to ten series (the ids are in the file) and eight months from December 2019 to December 2024. Downloaded 2026-12-01. Values unchanged.. 11 lines, 956 bytes.
A mix of real public documents and sample data. Each file says which.
Three steps
- 1.Read the table and its notes
- 2.Choose five findings
- 3.Write the findings
Claude Sonnet 5.5, 35 seconds. No web. It never saw the check.
Checked twice
- Passed: 5 findings are given, drawn from 5 different rows of the table, with no two resting on the same cells
- Passed: 10 of 10 cited cells exist in the table and hold the value quoted for them
- Passed: 5 of 5 numbers equal the number recomputed from the cited cells
- Passed: 3 of 5 findings report a fall, so the summary is not only good news
- Passed: 15 of 15 figures written in the statements are a cited cell value, the computed number or a date
- Passed: findings.md carries 5 of 5 statements word for word and names 10 of 10 cited cells
- Passed: 5 of 5 findings carry their number, 1 to 5 in order, in findings.csv and in findings.md
- Passed: 10 of 10 values on the From lines of findings.md equal the cell they are written beside
Second review by Claude Opus 5.5: pass.
Then we broke a copy of the output 6 ways on purpose. The check caught 6.
1. Total nonfarm payroll employment changed by -21867 thousand between 2020-02 (152293) and 2020-04 (130426). From: Total nonfarm: CES0000000001@2020-02 = 152293; CES0000000001@2020-04 = 130426 2. Leisure and hospitality employment changed by -48.4% from 16889 thousand in 2020-02 to 8719 thousand in 2020-04. From: Leisure and hospitality: CES7000000001@2020-02 = 16889; CES7000000001@2020-04 = 8719 3. Manufacturing employment changed by -50 thousand between 2020-02 (12743) and 2024-12 (12693), so it has not regained its pre-pandemic level. From: Manufacturing: CES3000000001@2020-02 = 12743; CES3000000001@2024-12 = 12693 4. Health care and social assistance employment changed by 10.3% from 20771.0 thousand in 2020-02 to 22901.4 thousand in 2024-12. From: Health care and social assistance: CES6562000001@2020-02 = 20771.0; CES6562000001@2024-12 = 22901.4 5. Government employment changed by 672 thousand between 2020-02 (22857) and 2024-12 (23529). From: Government: CES9000000001@2020-02 = 22857; CES9000000001@2024-12 = 23529
How this was run
An AI agent on Claude Sonnet 5.5 was given a folder with the files below and a three-step flow, and nothing else. It had no web access and never saw the check. The check was written before the run and made stricter after it. It works the answer out again from the input files. Then Claude Opus 5.5 reviewed the result against the inputs. Some input files are real public documents and some are sample data written by Atris. Each file says which.
Run 1 of 1 on 1 December 2026. The agent took 35 seconds.
What the second review verified
- Total nonfarm: 130426 (CES0000000001@2020-04) − 152293 (@2020-02) = −21867, which matches finding 1
- Leisure and hospitality: (8719 − 16889) / 16889 × 100 = −48.38, rounded to −48.4%, which matches finding 2
- Health care: (22901.4 − 20771.0) / 20771.0 × 100 = 10.26, rounded to 10.3%; Manufacturing: 12693 − 12743 = −50; Government: 23529 − 22857 = 672. All 10 cited cell values match input/jobs_by_industry.csv
- There are 5 different rows, no two findings share cells and 3 are falls. Every figure in a statement is a cell value, the result or a date, and units stay in thousands. findings.md has its unit line, all 5 statements word for word and a From: line naming both cells under each. check.py passes all 6 checks
What this run does not show
- The check traces every number to a cell of the table. It cannot tell whether these five are the findings a manager most needs.
- The table holds eight chosen months of ten public job series. A finding can only compare those months and may miss what happened between them.
- The notes file that explains the table was written by Atris. It is not itself a public source.
Would the check catch a wrong answer?
A check that cannot fail proves nothing. After the run we took a copy of the output, broke it one small way at a time and ran the check again. It caught 6 of 6. The check was made stricter after the first try at this, and the same untouched output was graded again.
Open every file
flow.md · the three steps the agent followed
# Summarize a data table into five findings function: data for: the analyst who briefs a manager on what a table of numbers shows goal: The manager gets five findings worth repeating with every number in them traced to named cells of the table. ## 1. Read the table and its notes Read the csv table in input/ and the notes file beside it. A cell is named by the value in the first column of its row, an @ sign and the column name, like ROW-ID@2020-04. Use the notes for units and for what the rows mean. If the notes do not say something, do not assume it. ## 2. Choose five findings Look across the whole table before choosing. Each finding rests on exactly one number of one kind: - `cell`: a value straight from one cell (cell_a). Leave cell_b blank. - `difference`: the value of cell_b minus the value of cell_a. - `percent_change`: cell_b minus cell_a, divided by cell_a, times 100, with one decimal. Rules for the set of five: - The findings draw on at least three different rows. - No two findings use the same cells. - If the table holds falls as well as rises, at least one finding is a fall. - Choose what a manager most needs to know: the biggest moves, what recovered, what did not. ## 3. Write the findings Write output/findings.csv with columns finding,statement,kind,cell_a,value_a,cell_b,value_b,number. finding is 1 to 5. value_a and value_b are copied from the cells. number is the result, negative for a fall. statement is one plain sentence. Every figure in a statement must be the finding's number, one of its two cell values or a date. Write figures in the table's own unit. Do not convert them (no millions when the table is in thousands) and do not add any other figure. Write output/findings.md for the manager: a first line saying what the table is and its unit, then the five statements numbered 1 to 5, copied exactly from findings.csv. Under each statement put a line starting `From:` that names the cells used with their values, so a reader can find them in the table. ## Done looks like - Five findings, drawn from at least three rows of the table, with at least one fall. - Every number recomputes from the named cells and every figure in a statement is one of those numbers. - findings.md carries the same five statements with the cells each one rests on.
input/about_this_table.md · 8 lines, 733 bytes
# About jobs_by_industry.csv - Publisher: United States Bureau of Labor Statistics, Current Employment Statistics survey. - What a number is: employees on nonfarm payrolls in the United States, in thousands, seasonally adjusted. 151794 means 151,794 thousand jobs. - Rows: ten published series. series_id is the Bureau's own id for the series. - Columns: eight months, named year then month. 2020-04 is April 2020. - Total nonfarm is every industry together. Total private is Total nonfarm without Government. The other eight rows are single industries and do not add up to the total, because not every industry is in this table. - The Bureau revises these numbers. The file holds the values published on the day it was downloaded.
input/jobs_by_industry.csv · 11 lines, 956 bytes
series_id,industry,2019-12,2020-02,2020-04,2020-12,2021-12,2022-12,2023-12,2024-12 CES0000000001,Total nonfarm,151794,152293,130426,142548,149816,154342,156857,158316 CES0500000001,Total private,129068,129436,108517,120870,127754,131977,133766,134787 CES2000000001,Construction,7527,7610,6522,7357,7595,7885,8100,8276 CES3000000001,Manufacturing,12760,12743,11382,12153,12537,12895,12872,12693 CES4200000001,Retail trade,15550.1,15519.2,13246.9,15144.2,15421.7,15533.9,15550.9,15460.1 CES5000000001,Information,2891,2910,2643,2712,2967,3092,2963,2895 CES6054000001,"Professional, scientific and technical services",9637.2,9704.8,9161.6,9534.9,10225.5,10677.1,10800.1,10813.9 CES6562000001,Health care and social assistance,20675.5,20771.0,18485.0,19966.8,20183.4,21017.7,22018.7,22901.4 CES7000000001,Leisure and hospitality,16805,16889,8719,12798,15246,16245,16704,16862 CES9000000001,Government,22726,22857,21909,21678,22062,22365,23091,23529
output/findings.csv · written by the agent, 6 lines
finding,statement,kind,cell_a,value_a,cell_b,value_b,number 1,Total nonfarm payroll employment changed by -21867 thousand between 2020-02 (152293) and 2020-04 (130426).,difference,CES0000000001@2020-02,152293,CES0000000001@2020-04,130426,-21867 2,Leisure and hospitality employment changed by -48.4% from 16889 thousand in 2020-02 to 8719 thousand in 2020-04.,percent_change,CES7000000001@2020-02,16889,CES7000000001@2020-04,8719,-48.4 3,"Manufacturing employment changed by -50 thousand between 2020-02 (12743) and 2024-12 (12693), so it has not regained its pre-pandemic level.",difference,CES3000000001@2020-02,12743,CES3000000001@2024-12,12693,-50 4,Health care and social assistance employment changed by 10.3% from 20771.0 thousand in 2020-02 to 22901.4 thousand in 2024-12.,percent_change,CES6562000001@2020-02,20771.0,CES6562000001@2024-12,22901.4,10.3 5,Government employment changed by 672 thousand between 2020-02 (22857) and 2024-12 (23529).,difference,CES9000000001@2020-02,22857,CES9000000001@2024-12,23529,672
output/findings.md · written by the agent, 17 lines
US nonfarm payroll employment by industry (BLS Current Employment Statistics, seasonally adjusted), in thousands of jobs. 1. Total nonfarm payroll employment changed by -21867 thousand between 2020-02 (152293) and 2020-04 (130426). From: Total nonfarm: CES0000000001@2020-02 = 152293; CES0000000001@2020-04 = 130426 2. Leisure and hospitality employment changed by -48.4% from 16889 thousand in 2020-02 to 8719 thousand in 2020-04. From: Leisure and hospitality: CES7000000001@2020-02 = 16889; CES7000000001@2020-04 = 8719 3. Manufacturing employment changed by -50 thousand between 2020-02 (12743) and 2024-12 (12693), so it has not regained its pre-pandemic level. From: Manufacturing: CES3000000001@2020-02 = 12743; CES3000000001@2024-12 = 12693 4. Health care and social assistance employment changed by 10.3% from 20771.0 thousand in 2020-02 to 22901.4 thousand in 2024-12. From: Health care and social assistance: CES6562000001@2020-02 = 20771.0; CES6562000001@2024-12 = 22901.4 5. Government employment changed by 672 thousand between 2020-02 (22857) and 2024-12 (23529). From: Government: CES9000000001@2020-02 = 22857; CES9000000001@2024-12 = 23529
check.py · the check, written before the run
"""Traces every number in the five findings back to cells of the table and recomputes it."""
import csv, re, sys
from pathlib import Path
root = Path(sys.argv[1]); ok = True
def say(passed, text):
global ok; ok = ok and passed; print(("PASS " if passed else "FAIL ") + text)
def num(s):
try: return float(str(s).replace(",", "").replace("%", "").replace("−", "-").strip())
except ValueError: return None
table = next(iter(sorted((root/"input").glob("*.csv"))))
rows = list(csv.reader(table.open())); head = rows[0]
cells = {f"{r[0].strip()}@{c}": float(r[i]) for r in rows[1:] for i, c in enumerate(head) if i > 0 and num(r[i]) is not None}
path = root/"output/findings.csv"
if not path.exists():
say(False, "output/findings.csv was not written"); sys.exit(1)
finds = list(csv.DictReader(path.open()))
g = lambda f, k: (f.get(k) or "").strip()
used = [tuple(x for x in (g(f, "cell_a"), g(f, "cell_b")) if x) for f in finds]
rows_used = {c.split("@")[0] for u in used for c in u}
say(len(finds) == 5 and len(rows_used) >= 3 and len({frozenset(u) for u in used}) == len(finds),
f"{len(finds)} findings are given, drawn from {len(rows_used)} different rows of the table, with no two resting on the same cells")
cited = [(c, g(f, v)) for f in finds for c, v in ((g(f, "cell_a"), "value_a"), (g(f, "cell_b"), "value_b")) if c]
real = sum(1 for c, v in cited if c in cells and num(v) is not None and abs(num(v) - cells[c]) < 1e-9)
say(real == len(cited) and all(u for u in used), f"{real} of {len(cited)} cited cells exist in the table and hold the value quoted for them")
def recompute(f):
a, b = cells.get(g(f, "cell_a")), cells.get(g(f, "cell_b")); k = g(f, "kind").lower()
if k == "cell": return a if not g(f, "cell_b") else None
if a is None or b is None: return None
return b - a if k == "difference" else (b - a) / a * 100 if k == "percent_change" else None
good = sum(1 for f in finds if recompute(f) is not None and num(g(f, "number")) is not None and abs(num(g(f, "number")) - recompute(f)) <= (0.051 if g(f, "kind").lower() == "percent_change" else 0.0501))
say(good == len(finds), f"{good} of {len(finds)} numbers equal the number recomputed from the cited cells")
series = [[num(v) for v in r[1:] if num(v) is not None] for r in rows[1:]]
falls_in_table = any(b < a for s in series for a, b in zip(s, s[1:]))
falls = sum(1 for f in finds if g(f, "kind").lower() != "cell" and (num(g(f, "number")) or 0) < 0)
say(falls >= 1 or not falls_in_table, f"{falls} of {len(finds)} findings report a fall, so the summary is not only good news")
dates = set(re.findall(r"\d+", " ".join(head)))
figs = traced = 0
for f in finds:
text = g(f, "statement")
for c in head[1:]: text = text.replace(c, " ")
allowed = [abs(x) for x in (num(g(f, "number")), cells.get(g(f, "cell_a")), cells.get(g(f, "cell_b"))) if x is not None]
for tok in re.findall(r"(?<![A-Za-z\d])(?<![A-Za-z]-)\d[\d,]*\.?\d*", text): # a number inside a name like an id is not a figure
tok = tok.rstrip(".,"); figs += 1
if tok in dates or any(abs(float(tok.replace(",", "")) - a) <= 0.0501 for a in allowed): traced += 1
say(figs > 0 and traced == figs, f"{traced} of {figs} figures written in the statements are a cited cell value, the computed number or a date")
md = (root/"output/findings.md").read_text() if (root/"output/findings.md").exists() else ""
same = sum(1 for f in finds if g(f, "statement") and g(f, "statement") in md)
named = sum(1 for c, _ in cited if c in md)
say(same == len(finds) and named == len(cited) and md.count("From:") >= len(finds), f"findings.md carries {same} of {len(finds)} statements word for word and names {named} of {len(cited)} cited cells")
numbered = sum(1 for i, f in enumerate(finds, 1) if g(f, "finding") == str(i) and g(f, "statement") and re.search(r"(?m)^\W*%d\W+" % i + re.escape(g(f, "statement")), md))
say(numbered == len(finds), f"{numbered} of {len(finds)} findings carry their number, 1 to 5 in order, in findings.csv and in findings.md")
# the From line under each statement: every cell it names is followed by the value in the table and it holds no other figure
vals = fine = 0
for f in finds:
at = md.find(g(f, "statement")) if g(f, "statement") else -1
m = re.search(r"From:[^\n]*", md[at:]) if at >= 0 else None
src = m.group(0) if m else ""
mine = [c for c in (g(f, "cell_a"), g(f, "cell_b")) if c]
bare = src
for c in mine:
vals += 1
after = re.search(re.escape(c) + r"[^\d\n-]{0,6}(-?\d[\d,]*\.?\d*)", src)
fine += after is not None and c in cells and abs(num(after.group(1).rstrip(".,")) - cells[c]) < 1e-9
bare = bare.replace(c, " ")
for c in head[1:]: bare = bare.replace(c, " ") # a column name written on its own is a date, not a value
loose = [t.rstrip(".,") for t in re.findall(r"(?<![A-Za-z\d@])(?<![A-Za-z]-)\d[\d,]*\.?\d*", bare)]
vals += len(loose) - len(mine) if len(loose) > len(mine) else 0
say(vals > 0 and fine == vals, f"{fine} of {vals} values on the From lines of findings.md equal the cell they are written beside")
sys.exit(0 if ok else 1)
about_this_table.md: sample data written by Atris. Fingerprint 042a7ef36348.
jobs_by_industry.csv: public document. Fingerprint 0e480d961369.
findings.csv: written by the agent. Fingerprint 66f196c5ef3d.
findings.md: written by the agent. Fingerprint 2d574966c4b1.