What it is
With Run Code on, the model does not guess at numbers. It writes a short program, runs it in a safe, closed-off space, and shows you the result. Anything the program makes, such as a chart or a cleaned-up spreadsheet, comes back in the chat for you to open or download.
This makes answers about data exact: totals, averages, counts and charts come from your actual file.
When to use it
- Total, average or count a column, or group it by month, region or product.
- Clean up a spreadsheet: remove duplicates, fix dates, split or join columns.
- Draw a bar, line or pie chart from your data.
- Turn data into a file: a CSV into Excel, a table into a Word or PDF report.
How to use it
- Start a new chat and pick a model.
- Click the Tools menu next to the message box (the sliders icon) and switch on Run Code. To keep it on for every new chat, pin it in the same menu.
- Attach your file with the paperclip and choose the upload option for code (it mentions the code environment). Choosing it also switches Run Code on for that chat.
- Say what you want, for example "Total the Amount column by month and draw a bar chart" or "Remove duplicate rows and give me the cleaned file as Excel".
- Read the answer. You can open the code it ran if you are curious, and open or download any file it made from the reply.
Using an agent? Agent chats do not show the Run Code switch. Run Code works there only if the agent's owner turned it on in the agent's settings.
Tips
- Name the columns you mean, exactly as they appear in your file.
- Say what you want back: a number, a table, a chart, or a file (and which file type).
- If the result looks wrong, say what is wrong ("the March total should be higher, dates are day-first") and ask it to try again.
Good to know
- It can use Python (with common data, chart, Excel, Word and PDF tools), JavaScript and shell commands.
- No internet. The program cannot open links or download anything. Attach the file instead of pasting a link.
- Each run starts fresh. Files you attached and files it made stay with the chat.
- Run Code runs on a Kapiva office server, so it is occasionally unavailable even when the rest of Manas works.
If something goes wrong
- "There was an error running the code"
- Send the request again. If it keeps happening, describe the task a different way or split it into smaller steps.
- The answer spins and never finishes
- Run Code may be down for a while. Wait a few minutes and try again, and tell the Manas team if it lasts.
- It tries to download something and fails
- The program has no internet. Attach the file to the chat instead.
- "Error downloading file. The file may have been deleted."
- Ask it to run the code again to make the file again.
- You cannot see the Run Code switch
- You may be in an agent chat. Start a normal chat with a model, or ask the agent's owner to turn on Run Code.