Code interpretation capability lets an assistant accept files, run code, analyze data, and produce computational outputs such as plots. In practice, it turns a GPT assistant into a practical data-analysis agent. section 3.2 section 3.7
A typical setup follows this workflow:
- Design the assistant’s role and instructions, often by iterating through prompts that define its data-science workflow. section 3.2
- Enable the Code Interpreter skill in the assistant’s Configure panel; enabling it also permits file uploads. section 3.2
- Upload a CSV and request a focused analysis, such as filtering records by country and identifying significant trends. section 3.2
- Add usage guidance when frequent coding or file uploads could consume account resources or temporarily block users. section 3.5.1
Data Scout analyzes a CSV
Configure an assistant named Data Scout to analyze uploaded CSV files. Upload netflix_titles.csv and ask: “Analyze the attached CSV and filter the results to the country Canada and output any significant discoveries in trends.” The assistant can inspect the data and return findings based on the requested filter. section 3.2
Generate a task schedule plot
A task-organizing assistant can use Code Interpreter to create a plot after retrieving daily tasks through a custom action. Instructions can require the assistant to organize tasks first and then show when and how they will be completed. section 3.3.2
Listing 3.3 Prompting for a data science assistant
FIRST PROMPT: what is a good basic and interesting data science experiment you can task someone with a single csv file that contains interesting data? #1 SECOND PROMPT: okay, can you now write all those steps into instructions to be used for a GPT Agent (LLM agent) to replicate all of the above steps #2 THIRD PROMPT: What is a famous personality that can embody the agent data scientist and be able to present data to users? #3
Review the staged prompts used to develop a data-science assistant’s experiment, workflow, and persona. section 3.2
