Analyse a spreadsheet with AI and check its work
Getting real analysis out of a data file, with the verification that stops you acting on a wrong number.
Before you start
- A data file
- A tool that runs code on uploads
What you will be able to do
- Ask questions the tool can answer correctly
- Verify a result three ways before trusting it
- Spot the silent row-dropping that skews everything
Upload a spreadsheet, ask a question, get an answer with a chart. It is a remarkable capability and it fails in ways that produce plausible numbers rather than errors.
The workflow below is the same as the naive one plus three checks, and the checks take about two minutes.
Describe the data before asking anything of it
What each column means, its units, and what a blank signifies.
Column headers are rarely self-explanatory and the model will guess. Tell it what each one means, the units, the date format, and — importantly — what an empty cell means: zero, unknown, or not applicable.
That last distinction changes averages substantially and is invisible in the data itself, so it is the assumption most likely to be made wrongly and never surfaced.
Ask for the code, not just the answer
The code is checkable. A number in a sentence is not.
Insist on seeing the code that produced each result. You do not need to be fluent to check the important things: which column it grouped on, what it filtered out, whether it dropped nulls.
Answers presented without code are unverifiable, and in tools that summarise rather than execute, sometimes not computed at all.
- Accepting a number from a tool that did not actually run anything. If no code appeared, the figure may be an estimate from reading the file.
Check the row counts at every stage
Silent row-dropping is the most common and most damaging failure.
Ask how many rows went into each step. Type coercion, date parsing and joins all discard rows quietly — a column with three text entries in a numeric field can lose them without comment.
If 4,812 rows became 4,390 somewhere, find out why before you look at any conclusion, because every figure downstream is computed on a filtered set nobody chose.
Verify one number by hand
Take the smallest group and check its total yourself.
Pick the smallest category in the result and compute it manually — filter the sheet, sum the column, compare.
If that one matches, the pipeline is probably sound. If it does not, everything above it is wrong in the same way, and you have found it for the cost of one filter.
- Always ask for group counts alongside group averages. An average over four rows and an average over four thousand look identical in a chart.
Ask for the code, check the row counts, and sanity-check one number by hand. Two minutes against a number you are about to act on is a good trade.
Common questions
Was this guide useful?
100% of readers found this useful
Read next
Build a RAG pipeline over your own documents
The demo takes an afternoon. Making retrieval return the right passage on the questions people actually ask is the entire project.
Write SQL with AI against a schema it has never seen
A model will write syntactically perfect SQL against a schema it is guessing at. The query runs, returns numbers, and the numbers…
Write ad variants and test them properly
AI removes the cost of writing variants, which makes it very easy to run tests that cannot teach you anything. The discipline is i…
Connect two apps with an AI step in the middle
The genuinely useful automations are not the clever ones. They are a trigger, one AI step that makes a small judgement, and a writ…