Code interpreter
With the code interpreter, the model does not just write code, it runs it. Calculations get computed instead of estimated, data gets actually parsed, and you get results plus the code that produced them.
How to use it
Toggle the run-code badge under the prompt box and ask for something computational:
- "Here is a CSV of orders, plot revenue per month" produces a real chart from your real data.
- "Simulate 10,000 dice rolls and show the distribution."
- "Parse this log file and count errors by hour."
The model writes the code, executes it in an isolated sandbox, looks at the output, and iterates until it has an answer. You see each execution, its output, and any files it produced.
Working with files
Combine it with file uploads: attach a spreadsheet or data file and the interpreter reads it directly. Results that are files themselves, like a cleaned CSV or a rendered chart, come back into the chat as downloads.
Why it beats asking for numbers
Language models approximate arithmetic; executed code does not. For anything where the number has to be right, statistics, conversions, aggregations, the interpreter is the difference between an estimate and a result.
Sandbox boundaries
Code runs in an isolated environment per session, with no access to your account or other users. Sessions are ephemeral: persist anything important by downloading it from the chat.