
Chris Parmer
November 20, 2025
Simple, Spec-Based Development for Analytics With Plotly Studio
Working with AI to build a full-fledged app can feel magical. But if you’re doing data analytics, "magic" is a liability. You need to know exactly how your data is being filtered, aggregated, and visualized. What hidden assumptions did the AI make?
Plotly Studio uses AI to write the code that analyses your data, rather than trusting AI to analyze data. It avoids a major class of hallucinations by relying on the AI-generated code to analyze data in a consistent, deterministic way
But deterministic code is more useful if you can verify what it does. We want to make it absolutely clear exactly how Plotly Studio analyzes data with AI, and so we always display specifications alongside your generated app and visualization. A specifications document is the human-readable blueprint that details everything AI generates.
We are now excited to announce a major update to this specification format within Plotly Studio, making it far easier to read, modify, and use. Watch the demo:

Why we love specification-based development i.e. the Spec file
Vibe coding means working with AI-generated code you never really examine. You write a prompt, get output that looks right, and move on. This is fine for prototyping, but doesn't inspire confidence when analyzing critical data.
FYI, read our thoughts on everything vibe coding gets wrong.
When you give AI a vague prompt like "show me complaints day over day," it fills in the blanks: details about the exact dimensions used to create the chart, the data processing steps, the dropdowns and parameters, and all of the styles and labels. Specification-based development makes every one of these decisions explicit and verifiable. Plotly Studio auto-generates a specification file that describes exactly what the AI-generated code does.
You get the speed of AI generation with the transparency required for trustworthy data analysis. You can check the AI's choices, copy the parts you want to keep, modify what you want to change, and build prompts that produce consistent, reproducible results. Our latest update makes this workflow more powerful and intuitive.
What's new: a clearer format for a tighter workflow
When you connect your data to Plotly Studio and have it generate your data app, you’ll see the Specification tab alongside a preview of your app and its code:

This Specifications tab shows you an auto, AI-generated natural language description of the code. When you write a prompt, Plotly Studio will generate the code for that prompt and then will generate the Specifications (Specs) based off of that code; the Spec is kept "in sync" with the code.
The Specification tab has two purposes:
- Describe what the code does in English so that you can verify the implementation (especially important with data analytics) in plain English or debug issues
- Provide a copy-and-paste format so you can easily update your prompts with additional details that you might want to lock down or modify, like the the labels of the chart or the colors
The core function of the Specification tab remains the same: it documents the code in a declarative, natural language format. You can use it to verify the AI's work and to copy-paste details back into your prompt to refine your app.
This new update to Plotly Studio makes that workflow significantly easier. The Spec is now auto-generated in a much cleaner, more comprehensive, and better-organized format.
Previously, the Spec could be a large block of text. Now, it is intelligently broken down into distinct, logical sections for each component of your application. In the Spec file, you will see clear headings for:
- Chart: Describes exactly which columns are used to create the chart and any additional chart parameters
- Data: The series of steps and assumptions used in pre-processing the data before visualizing it
- Options: The set of dropdowns, their options, and their default values that are used as input parameters for the data analysis and visualization
- Chart styles and labels: Any additional styling options (think conditional formatting) used and the exact text labels
How the Specifications tab improves your data analytics workflow
This new, clearer format in the Specifications tab makes the two primary purposes of having specifications more powerful.
- Faster verification: The Spec file is very easy to scan and read, allowing you to easily spot any issues or verify the results. For example, you can make sure that the AI chose the correct columns to plot in the Chart section or verify the aggregation method in the Data section. This allows you to quickly verify that the work being done by the code is exactly as you expect.
- Easier, more precise prompting: This is the most powerful update to the workflow. You can now go from a high-level prompt to a detailed prompt with precision, by copying and pasting sections from the Spec into your prompt, which then iteratively modifies your generated visualizations.
Example: how the specification drives precise data refinement
Let's walk through an example from a data app in Plotly Studio, using data about 311 citizen complaints in San Francisco.

The vague prompt
We start with a high-level, "vibe coding" style prompt: “which neighborhood has the worst response time?”
This is fast, but it forces the AI to make several critical, hidden assumptions. Plotly Studio generates the chart and, most importantly, the Specification file.
Verification via the Spec file
After the chart is generated, you immediately check the Specification tab to verify the AI's implicit decisions.

The Spec reveals the following details, making the "magic" explicit:
- Chart Section:
- Chart Type: Horizontal Bar Chart.
- X-Axis: Calculated by taking the average response time (the difference between the 'closed' and 'opened' timestamps).
- Y-Axis: Neighborhood.
- Data Section:
- Aggregation: The primary metric being used is the mean.
By reading the Spec, you realize your vague question ("worst response time") was interpreted by the AI as the average worst response time. This might not be the most appropriate metric for measuring a "worst-case" scenario.
Iteration for deeper analysis
The Specification file now provides the precise language needed to refine the analysis. To look at different measures of "worst", you copy the Data and Options logic from the Spec and use it to modify your prompt.
Instead of just accepting the mean as the default measure, you modify the prompt to include a dropdown option for multiple metrics:
Modified prompt (adding details to the original): “Options: mean, median, P95, P99. Default - mean.”
The chart regenerates with a new control, and now you can look at the data using Mean, Median, P95 (95th percentile), and P99 (99th percentile).
By switching metrics, you make a key discovery:
- Using the Average response time, Golden Gate Park appears to have the worst response time.
- Using the Median response time, the distinction shifts, and Yerba Buena appears to have the worst response time.
Iterating with data cleaning
While looking through the data, you notice a new issue: the neighborhood names are not consistently capitalized (e.g., some are 'all uppercase' while others are 'lowercase'). This case sensitivity issue is causing duplicate entries in the visualization.

Again, you modify the prompt by adding a specific instruction to the Data section of the Spec:
Further modified prompt to clean the data: “normalize the neighborhood names to all of all be uppercase.”
The power of specification-based development
Structured, simpler specifications allow you to refine your prompt over time. Your prompt evolves from a vague idea into a detailed, reproducible blueprint. When you regenerate this application, or share it with a colleague, you will get the exact same data visualizations back every single time.

The Specification tab displaying Chart, Data, Options, and Styles that go into that visualization.
This update solves one of the key frustrations of working with AI systems. It removes the guesswork and gives you a simple, copy-paste path to refine your application. You get the speed of AI generation combined with the precision and reliability you need for enterprise-grade analytics.
This update to the specification format is another major step in delivering on that vision. <The new format is scheduled to launch in next week's Plotly Studio release>. We encourage you to upgrade, try it out, and let us know what you think.
Download Plotly Studio now and get started for free.