Advanced file and data analysis
Advanced file and data analysis allows you to upload csv, xlsx, json, and xml files to perform data and statistical analysis or process data in file using secure code sandboxes. This enables you to perform the following tasks using isolated and persistent code sandboxes to execute code in the cloud also referred as Code Interpreter:
- Provide custom queries for calculations
- Provide structured data files for calculations or transformations through users
- Process structured data files provided within the Assign task to genie action
This expands a genie's computational abilities beyond what AI models can reliably handle natively. Code Interpreter enables genies to analyze data accurately, perform precise calculations, and process large files.
When to use advanced file and data analysis
Use advanced file and data analysis in the following scenarios:
- Accurate math and computation: Perform calculations, aggregations, and statistical analyses that AI models often perform inaccurately when operating without advanced file and data analysis.
- Large file processing: Parse and analyze CSV, XLSX, and JSON files uploaded by users or passed through Agent orchestration, even when files exceed LLM context limits.
- Workflow-triggered analysis: Use App Events and recipes to pass files or data to the genie for computation. Return results as text in the conversation or a downstream workflow.
How advanced file and data analysis works
A genie automatically determines whether to invoke advanced file and data analysis or respond natively when a user prompt or incoming App Event requires computation. A genie completes the following workflow if computation is needed:
- Generates a Python script to solve the problem.
- Executes the script in an isolated, secure container scoped to that conversation.
- Returns results or error logs, which allows the genie to self-correct and retry before surfacing a response.
Containers are destroyed at the end of each conversation. No data persists across sessions.
Example advanced file and data analysis use cases
The following sections demonstrate use cases for advanced file and data analysis:
Weekly finance pipeline analysis
A finance team schedules a weekly pipeline analysis. Every Monday morning, a scheduled recipe retrieves deal data from Salesforce, converts it to a file, and assigns the task to a genie using the Assign task to genie action with the file attached. The genie invokes advanced file and data analysis to analyze the data and returns a summary directly in Slack without manual exports or spreadsheet work.
FILE ATTACHMENT REQUIREMENT
You must attach a file to the Assign task to genie action for advanced file and data analysis to work.
Workflow outline
- Trigger: A scheduled recipe runs every Monday and retrieves open deal data from Salesforce.
- Assign task to genie: The recipe uses the Assign task to genie action to pass the deal data file and task instructions to the genie. The recipe job suspends while the genie processes the task.
- Genie reasoning: The genie determines that the request requires computation and invokes advanced file and data analysis.
- Code generation: Advanced file and data analysis generates a Python script to calculate totals, group deals by stage, and identify the top five deals by value.
- Sandboxed execution: The script runs in an isolated container scoped to that conversation.
- Self-correction: Advanced file and data analysis catches the error, revises the script, and retries automatically if the script fails.
- Result: The genie returns a text summary to the recipe. The recipe resumes and posts the summary to the designated user in Slack.
Sample output
16 deals worth $1.09M are closing this month.
$95K is already closed.
$380K is in negotiation — your most actionable bucket right now.
Top deal: Acme Corp — $210K, closing March 28.Chat file upload analysis
A sales manager uploads a customer revenue CSV directly in the genie chat interface and asks the genie to identify the top five customers by revenue. The genie invokes advanced file and data analysis to process the file and returns a ranked summary table without requiring any recipe configuration.
Workflow outline
- File upload: The user uploads a CSV file directly in the genie chat interface and submits a prompt. For example:
Analyze top 5 customers by revenue. - Genie reasoning: The genie determines that the request requires computation against the uploaded file and invokes advanced file and data analysis.
- Code generation: Advanced file and data analysis generates a Python script to parse the CSV, sort customers by revenue, and return the top five results.
- Sandboxed execution: The script runs in an isolated container scoped to that conversation.
- Self-correction: Advanced file and data analysis catches the error, revises the script, and retries automatically if the script fails.
- Result: The genie returns a ranked table with customer name, revenue, industry, and region directly in the chat interface.
Sample output
Here are the Top 5 Customers by Revenue:
Rank Customer Revenue Industry Region
1 Everstone Group $238,879 Finance North
2 Silver Oak LLC $199,393 Retail West
3 Nimbus Analytics $199,161 Logistics North
4 Golden Horizon $198,061 Logistics West
5 Red Maple Co $182,392 Logistics East
The top 5 collectively generated $1,017,886 in revenue.
Logistics dominates with 3 out of 5 spots in the top 5.More resources
Last updated: