What does an AI do with your file before it gives you a number?
See what happens between your question and the number: the assistant turns your words into a calculation, writes code, runs it, and sums it up for you.
Free course. Your Maestro, an AI, .
When you give an assistant a spreadsheet and ask for a number, it can use tools to write and run code. OpenAI documents Python for some ChatGPT analysis tasks; Microsoft describes Python-based analysis in a Copilot in Excel experience; Anthropic offers code execution to analyze files with Claude. The capability depends on the product and configuration: it does not prove this answer ran code.
Check it: ask for the code actually executed, its output, and the decisions made. A program that finishes without an error can still have the wrong formula or implementation, and the summary can disagree with the output. Being able to read and repeat the calculation provides evidence, not a guarantee.
In this course’s examples the calculations run correctly; we focus on decisions that can make them answer the wrong question.
From your question to the number
When the assistant uses code to answer, these are the steps you need to review:
Looks at the table
It sees which columns exist and what they are called. From that it assumes what each row represents, even if the file doesn't say so anywhere.
Turns your words into a calculation
"Sales" can mean counting rows or counting distinct tickets. "Average ticket" can be the average of a column, or a sum per ticket and then an average. This is where the decisions that change the result the most are made.
Writes the code and runs it
It decides which rows to use, whether to filter anything, and what to do with empty cells. Execution does not guarantee correctness: check the formula, data types, and output.
Tells you in words
It turns the result into a sentence like "In March there were 312 sales." By the time you read that sentence, the decisions from the earlier steps are no longer visible.
The second step concentrates the decisions we practice here. Your question is in business words, and the table is in columns and rows. Someone has to decide how to get from one to the other. If you don't say it, the assistant decides.
The decisions you don't see
With the hardware store's file, a question as simple as "how many sales were there in Zapopan?" hides at least four decisions:
- What a sale is. The file has one row per product. Counting Zapopan's rows gives 89; counting distinct tickets gives 30.
- Whether canceled ones count. Two of those Zapopan tickets were canceled. Are they sales?
- What to do with repeated rows. The system exported some rows twice. If nobody removes them, they count double.
- What to do with the sale that has no branch. One ticket was entered without a branch. We don't know which branch it belongs to; we cannot assign it to Zapopan or another branch without checking.
Each decision has a reasonable answer, and each answer gives a different number. There isn't an "AI number" and a "real" one: there are numbers that answer different questions. Your job is to know which one it answered. Which of these decisions do you think has happened to you without noticing?
Where to see what it did
You don't need to read Python fluently to check these decisions. The first step is to see the code or, at least, to ask for an explanation of it. Each assistant shows it in its own way; pick the one you use:
OpenAI documents that ChatGPT can write and run Python for some analysis tasks. When it does, review the code, output, and assumptions before relying on the result.
You can ask in chat; an explanation or proposed code alone does not prove execution:
Show me the code you actually ran, its output, and the decisions at each step. If you did not run it, say so.Microsoft says Copilot in Excel uses Python-based analysis to interpret your question and calculate the answer, and that you can expand the code to see how it was generated. It works with tables or with ranges that look like a table, in Excel for Microsoft 365.
When it gives you a number, open the code and, if you don't understand it, ask in the same pane:
Explain in plain words what the code you used does, step by step.Anthropic explains that Claude can write and run code, for example Python, and analyze the CSV files you upload. It also says Claude gives you summaries as it works, so you can follow what it's doing.
If you can't see the full code in the summary, ask for it in the chat:
Show me the code you ran to get that number, and explain in one sentence what each step does.You do not need to perform a full programming audit. Start by looking for three things you can read even if you don't know Python: which columns it used, whether it filtered or removed rows, and what operation it did (count, sum, average, divide). On the next page you learn to read the four or five lines you will see most often.
Try it
Think of the last time an assistant gave you a number about one of your tables, or ask a new question. Ask it for the code and, without reading it line by line, look only for those three things. A good answer looks like this: "it used the importe column, filtered nothing, and summed." If you can't find one of the three, you already have your first question for the assistant. If you like, we can go over what it told you together.
Note: Before uploading data from your job
Check what your company allows you to upload to each assistant, and with which account. In this course everything is practiced with made-up data, so you risk nothing here.
Check yourself: You see that your assistant ran code to answer "how many sales were there in Zapopan?" and got 89. Where was the definition of a sale expressed?