
Zero-Code Data Analysis with Claude Sonnet 3.7
Today, for the 4th time in my career, I saw something I believe will fundamentally change how we do data analysis — 8 complex analyses and interactive visuals created with ZERO code in under 45 minutes...
Keep in mind, I'm not selling anything, and I'm usually one of the most skeptical people in the crowd when it comes to claims of “low code/no code”.
However, I've spent most of the last 24 hours putting Claude Sonnet 3.7 through intensive testing and I can say with certainty that it is way beyond any model I've tested over the last two years. Over that time, I’ve been intensely focused on the nexus between data analysis and AI.
It successfully ran a gauntlet of expert-level coding tests in DAX and M that no other model I've tested has yet fully succeeded at (including the one I pay $200/month for — ouch!). I will post about that later this week.
In this article, I want to give you an initial look at what it is capable of in terms of real-time, truly ZERO-code analysis and interactive visualization.

Building the Agent Signatures
The auto-analyst is built using DSPy and each analytics agent is a DSPy signature.

DSPy makes it very straightforward and convenient to build a custom LLM agent/program that does some specific task.
Marketing Reporting Agent
import dspy
class marketing_reporting_agent(dspy.Signature):
# Analytics Agent for generating marketing reports
# Prompt
"""
You are a marketing reporting agent specialized in creating data-driven marketing reports.
Your task is to take marketing data, a user-defined goal, and report instructions
to generate Python code that creates insightful marketing reports and visualizations.
You should use libraries like pandas, matplotlib, seaborn, and plotly for the analysis and visualization.
Make sure your output matches the report instructions and goal!
Visualization Requirements:
- Line charts showing trends for all metrics
- Correlation heatmap between metrics
- Use Plotly for all visualizations
- Monthly comparison bar charts
- Rolling averages to smooth out fluctuations
- Interactive plots for detailed exploration
- Don't set index, just use the default index
- Set number of floating points to 2
Additional Analysis:
- Calculate key statistical measures (mean, median, std dev)
- Identify any significant correlations between metrics
- Highlight notable insights and patterns
- Provide recommendations based on findings
"""
# Inputs
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal")
report_instructions = dspy.InputField(desc="Specific instructions for report format, metrics, and visualizations")
# Outputs
code = dspy.OutputField(desc="The code that generates the marketing report")

The agent takes in three things: dataset (a string of data info like columns, variable type, etc), goal (user-intended goal or query), and report_instructions (what the report should do). You can create any custom way to pass reporting instructions. Below is an example:
query = "Tell me about how key KPIs are changing over time?"
report_instructions = """
1. Executive Summary
- Highlight top 3 KPIs showing significant changes
- Provide clear actionable insights
- Flag any metrics requiring immediate attention
2. Action Items Section
- List top 3 areas needing improvement
- Provide data-backed recommendations
- Include estimated impact of proposed changes
3. Report Format Requirements
- Use executive-friendly visualizations
- Keep decimal points to maximum of 2 places
- Use consistent color scheme for all charts
"""
Here is the output from the marketing report agent:

The agent was able to create an entire marketing report in one shot. You can change the reporting instructions to come up with a custom reporting style.

Bidding Strategy Agent
For the bidding strategy agent, I’m following a similar setup as the other agents in the auto-analyst system. The agent takes in a user’s question or goal, along with information about the dataset, and then generates code to perform the analysis needed to answer the question.
class bidding_strategy_agent(dspy.Signature):
# Analytics Agent for optimizing bidding strategies
"""
You are a bidding strategy analytics agent specialized in marketing analytics.
Your task is to take marketing campaign data and a user-defined goal, and output
Python code that performs bidding strategy analysis and optimization.
You should use libraries like numpy, pandas, and scikit-learn for the analysis.
Bidding strategy tasks include:
- Analyzing historical bid performance
- Optimizing bid values across channels
- Forecasting campaign performance
- A/B testing bid strategies
- ROI and conversion rate analysis
- Budget allocation optimization
Make sure your output is as intended!
Use Plotly for all visualizations
The dataset is loaded as bidding_df, just use bidding_df.copy(),
handle numeric and categorical columns differently.
Calculate bid improvements as numbers and percentages.
Show clearly how to improve the bids.
"""
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal ")
code = dspy.OutputField(desc="The code that performs the bidding strategy analysis")
commentary = dspy.OutputField(desc="The comments about what bidding strategy analysis is being performed")
Query = "Figure out in which product categories is our bidding strategy failing? \
Tell us which bids we should improve and by how much? Which variables are most important?"
Example:
Query: “Figure out in which product categories is our bidding strategy failing. Tell us which bids we should improve and by how much. Which variables are most important?”


Note: This is a dummy dataset. Usually, winning bids are not shared on Meta / Google Ads, but the AI can adapt to the dataset. You can change the prompt to meet your specific requirements.
Customer Analytics Agent
class customer_analytics_agent(dspy.Signature):
# Analytics Agent for customer value and acquisition analysis
"""
You are a customer analytics agent specialized in analyzing customer behavior and value.
Your task is to take customer data and a user-defined goal, and output Python code
that performs customer lifetime value, acquisition cost, and ROI analysis.
You should use libraries like numpy, pandas, scikit-learn and lifetimes for the analysis.
Customer analytics tasks include:
- Customer Lifetime Value (CLV/LTV) modeling
- Customer Acquisition Cost (CAC) analysis
- Customer segmentation and clustering
- Churn prediction and prevention
- Customer journey mapping
- ROI and retention metrics
- Purchase behavior analysis
Make sure your output is as intended!
Use Plotly for all visualizations
"""
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal ")
code = dspy.OutputField(desc="The code that performs the customer analytics")
commentary = dspy.OutputField(desc="The comments about what customer analysis is being performed")
Like most analytics agents, the customer analytics agent has a similar input/output structure, making it easy to adapt for various analysis tasks.