Make sense of a messy table
Inspect a messy synthetic spreadsheet, spot missing rows and unit traps, and check whether the summary matches the numbers.
1. Scenario
Pick a work role starter with synthetic material, or switch to Bring your own.
Fire safety refresher completion rate by department
HR · Synthetic materialYou need to report fire safety completion rates, and three staff on parental leave are still listed in the roster export.
staff_id,dept,status,completed_fire_training S-01,Warehouse,active,yes S-02,Warehouse,active,yes S-03,Warehouse,active,no S-04,Office,active,yes S-05,Office,active,yes S-06,Office,parental_leave,no S-07,Office,parental_leave,no
2. Work area
Edit the briefs or setup below before you run.
Only the header row, inferred column types, and at most 20 sample rows leave your device. The analysis function runs in your browser on all rows.
Answer and chart
Example. No model ran.8 of the 24 shifts used agency cover, and 48 overtime hours were logged across all departments.
- 1. Group all 24 shifts by department and count agency shifts alongside total overtime hours.
- 2. Count all rows where cover_type equals agency.
- 3. Show the agency cover rows so HR can verify the shift count before payroll cut-off.
Inspect the analyze(rows) code that ran in your browser
function analyze(rows) {
const byDept = {};
let agencyCount = 0;
let totalOvertime = 0;
for (const row of rows) {
const dept = String(row.department || "Other");
const ot = Number(row.overtime_hours) || 0;
if (!byDept[dept]) {
byDept[dept] = { department: dept, shifts: 0, agencyShifts: 0, overtimeHours: 0 };
}
byDept[dept].shifts += 1;
byDept[dept].overtimeHours += ot;
totalOvertime += ot;
if (String(row.cover_type) === "agency") {
byDept[dept].agencyShifts += 1;
agencyCount += 1;
}
}
const table = Object.values(byDept).sort((a, b) => b.overtimeHours - a.overtimeHours);
const chart = table.map((d) => ({ label: d.department, value: d.overtimeHours }));
return {
answer: agencyCount + " of the " + rows.length + " shifts used agency cover, and " + totalOvertime + " overtime hours were logged across all departments.",
table,
chart,
checkOne: {
label: "Shifts filled by agency cover",
figure: agencyCount,
column: "cover_type",
equals: "agency",
mode: "count"
}
};
}Check one number by hand
Reported: 8 · Rows found: 8Shifts filled by agency cover: Filter where cover_type equals agency. Below are all 8 matching rows from the 24-row spreadsheet so you can count or sum them yourself.
3. Run
Nothing leaves your browser until you press Run.
Sends only the column header and at most twenty sample rows when you press run. to job data_code (claude-sonnet-5-5, effort medium). Raw text is processed in memory and not stored.
4. Inspect
See what left the browser, which model ran, and the receipt.
Nothing sent yet. When you run, only headers and at most 20 sample rows leave this device.
All 24 rows stay in your browser and run inside the sandboxed Web Worker.
data_code · claude-sonnet-5-5 (effort medium, max 1600 tokens). Haiku reads the schema and sample rows to propose checks you can verify against the full table.
0 runs used · source: offline · Example. No model ran.
5. Judge
Did the summary separate active staff (2 of 2 in Office = 100%) from staff currently on parental leave?
50 is a coin flip. 99 is certain. Honest confidence scores best.
6. Debrief and Keep
What to check next time, the matching lesson, and keeping this setup as a recipe.
What to check next time
A rate is only as honest as its denominator. Including staff on parental leave makes the Office look 50 percent non-compliant when every active person has finished.
Keep as a recipe
Save the stronger brief and scenario setup to your device so you can reuse or adapt it in Keep.