Understanding Prompts in Plotly Studio
In Plotly Studio, a prompt is a high-level description of a specific part of your app. Updates to the prompt regenerate that part of the app and update the preview.
Each app has editable prompts for the following setup and components, accessible from the sidebar:
- Layout: How the app is structured, what components it includes, and the size and order of those components.
- Theme: The styles and theme for the app, for example, details on typography, and background and text colors.
- Filter Component: Global app filters, which are used to filter data cards, tables, and charts.
- Data Cards: Cards used for highlighting important KPIs and at-a-glance statistics.
- Data Table: How the table with the app's data is displayed in the app.
- Charts: Charts, including the type of chart, what controls they have, and how data is displayed within them.
Prompt vs specification
Each element in the Setup, Components, and Charts sections has a prompt and a specification.
A prompt is an editable summary of the component or setup section you are editing. It can be used to make focused edits or broader changes. For example, you can change controls on a chart by updating the prompt.
The specification is not editable and is generated based on the prompt. It is a natural language description of the code generated by Plotly Studio. The specification is useful for quickly checking how certain rules or calculations are applied, without having to read the code.

Tip
When making prompt updates, copy information from the specification if there are parts of an element that you'd like to retain in the updated version.
How prompts generate specifications and code
Each time a prompt is sent to the LLM (whether during initial app generation or when you update a prompt), Plotly Studio sends the prompt and the following additional information to the LLM to generate a specification and code:
- The data profile
- Plotly best practices
- The previous prompt (when updating an existing prompt)
Note
If there is an existing app specification, it is not used to generate the new specification. If there are specific features of the app that you want to retain from the existing specification, add them to the new prompt.
The data profile is information about the dataset. The data profile includes:
- The number of rows and columns
- Column names
- Up to 10 sample values per column
- The null count, range, mean, and median for integer, datetime, and float columns
- The null count, unique values, string length, alphabetical range, and most common values for string columns
Next steps
Learn how to write effective prompts for creating charts in the Chart Prompting Guide.