Best practice L2 · Context engineering informational

Have ChatGPT Show the Code, Not Just the Chart

What it is

A verification habit for the code-interpreter tool: always ask to see the Python it ran, not just the resulting chart or number, so you can check how the result was actually produced.

Chart onlyopaque· Pretty output· Unknown assumptions· Can't reproduce or auditChart + codeauditable→ See the filters & joins→ Catch wrong assumptions→ Re-run it yourself
A number you can't trace is a number you can't trust.

Why it works

The analysis tool writes and runs code invisibly, and a clean chart hides questionable choices — dropped rows, a wrong join, a silent type coercion. Reading the code exposes those assumptions and lets you reproduce the result outside ChatGPT, turning a black box into something you can defend.

When to use it

Any analysis you'll act on or share — reporting figures, business decisions, anything where a silently-wrong number has consequences.

When not to use it

Quick, disposable exploration where you're just getting a feel for the data and won't rely on the exact figures.

Prompt

Analyse <file> to answer <question>. Show me the Python you run at each step, and call out any rows you drop or assumptions you make about the columns. I want to be able to reproduce this myself.

Example

A 'revenue up 12%' chart looks fine until the shown code reveals it silently dropped rows with null regions — you fix the handling and the real figure is 4%.

Common mistakes

  • Trusting a clean chart without seeing how the numbers were derived.
  • Not noticing silently dropped or coerced rows that skew the result.
  • Sharing a figure you can't reproduce or explain if challenged.

Related