Analyzing data and creating charts
Intra AI can write and run small programs to analyze spreadsheets and draw charts. You don't write any code yourself. You describe what you want to know, and the model writes the program and runs it in an isolated sandbox on your instance.
Note: Code execution is only available if your instance runs a sandbox. It is not included in the trial.
When Intra AI runs code
There is nothing to switch on. Whether code runs depends on where you ask:
- In a conversation without an agent, the model is offered code execution automatically once the sandbox is set up. It decides on its own whether a question needs a program. To add up a long spreadsheet it will usually write one; for a plain text question it won't.
- An agent only runs code if it has the Code interpreter capability. The person who builds the agent turns it on in the Tools step under Capabilities (see Tools, knowledge and sub-agents).
- Your administrator can turn off code execution in conversations without an agent for individual models (the Tool rounds setting). A model with this setting off never runs code in a conversation without an agent, even when a sandbox is set up. Agents with Code interpreter are not affected.
If you want to be sure, say so in your message, for example: "Please calculate this with code."
Upload a spreadsheet and analyze it
- In the message box, click the plus icon (Attach file).
- Choose Upload from computer and pick your CSV or Excel file (XLSX). If the file is already in Intra AI, choose Browse files and folders instead, or pick it under Recent.
- Wait until the file has finished processing. A file that is still being processed does not reach the sandbox.
- Ask a specific question: which columns, which period, which figure.
- Send the message. While the program runs, the row above the answer says Running code.
The attached file has our 2024 and 2025 revenue by branch and month.
Calculate 2025 annual revenue per branch and the percent change from 2024.
Show the five branches with the largest decline as a table.
The figures in the answer come from the program run. You can expand the program and read it (see below). For numbers that matter, still spot-check one, such as a total in Excel.
In later messages in the same conversation, the code can open the files you attached earlier. If you attach new files to a message, the code in that run uses those files. For uploads and file formats, see Managing files.
Create a chart
- Describe the chart: type, axes, sort order, units. For example: "Create a bar chart of annual revenue per branch, sorted from highest to lowest, with the axis in thousands of euros."
- Send the message. The chart appears as an image right in the answer, with its file name below it.
- Click the download icon next to the file name to save the image.
- To change it, keep writing in the same conversation, for example "Make it a line chart and label each point with its value." The model then starts a new run.
The sandbox has common Python libraries for data analysis and charts, including pandas, matplotlib and seaborn.
What the code card shows
Each run appears as a card titled Run code. If the run produced a chart, the card is already open. Otherwise, click the row above the answer (for example "Ran code") to expand it.
| What you see | What it means |
|---|---|
| Writing code… | The model is writing the program. |
| Staging files | Your attached files are being copied into the sandbox. |
| Queued for the sandbox | The run is waiting for a free slot. |
| Running in the sandbox | The program is running. A timer next to it shows the elapsed time. |
| Collecting output | The program has finished and its output is being picked up. |
| Saving files | The files the program created are being stored. |
| Input files | Your files that reached the sandbox. |
| Not available to this run | Files this run could not open. |
| Delivered files | Files the program created for you. |
Below that you'll find the program itself, which you can copy with Copy code, and whatever the program printed. A green check mark with the run time means the run succeeded. A red X marks an error or a run that never started. A clock marks a timeout.
Download files the program creates
When the program writes files, such as a cleaned-up Excel sheet or a CSV with results, they appear as tiles below the answer with the file name and size. Click a tile to open the file in the panel, or click the download icon on the right of the tile to save it directly.
A file only exists if the program writes one. If you need a file, ask for it: "Save the result as an Excel file." Preview and versions in the panel are covered in Generating documents.
Limits
The values below are the defaults. Your instance may use different ones.
| Limit | Default |
|---|---|
| Run time per execution | 3 minutes |
| Memory per execution | 1.5 GB |
| Attached files per execution | 8 files, 32 MB in total |
| Runs at the same time per person | 2, with up to 4 more waiting |
If you attach more than eight files, documents and spreadsheets go first and images after them. Whatever doesn't fit is listed on the card under Not available to this run.
When a program prints a lot of text, the model only reads the beginning and the end. The card then shows a note such as "2048 bytes omitted". In that case, ask the program to print only a summary, or split the analysis into several steps.
Troubleshooting
| Message or situation | What to do |
|---|---|
| Timed out — execution exceeded the wall-clock limit. | Make the task smaller: fewer rows, one year instead of five, or the analysis in several steps. |
| This step did not finish | The program stopped with an error. The error message is under Technical details. The model often fixes the program and starts a new run. If it doesn't, ask it to, and give the exact column names. |
| The code was not run | The model sent an incomplete request, the sandbox was unreachable or fully busy, the run waited too long for a free slot, or your attached files did not reach the sandbox intact. The line under the heading names the reason. Send the message again in a few minutes. If it keeps happening, contact your administrator. |
| A file is listed under Not available to this run | You attached too many files, the files are too large in total, or the file was still being processed. Attach fewer files, or wait until the file is ready. |
| The model says it cannot open an Excel file | Usually the file is password-protected or in the old XLS format. Save it as XLSX without a password and attach it again. |
| Completed successfully with warning lines | Not an error. The program printed warnings, and the result is still there. |
| No code card appears at all | First ask explicitly for the calculation to be done with code. If there is still no card, your instance has no sandbox, or you are on the trial. If the agent lacks Code interpreter, try a conversation without an agent. If code execution is off for the model, pick another model or an agent with Code interpreter. Otherwise, ask your administrator. |