Build a prompt

Open Playgrounds and create a new playground
- By UI
- By Alyx
- By Code
Create a playground
Choose a provider and model

Provider and model selection in the Prompt Playground
Write the messages
{destination}, to fill them from dataset columns at run time.System and user messages with template variables
Add tools (optional)

Tool definitions and function selection
Set invocation parameters
Invocation parameters in the Prompt Playground
Run the prompt as an experiment
Running a prompt against a dataset creates an experiment on that dataset, so the results are directly comparable to your other runs.Running a prompt against a dataset in the Prompt Playground
Select a dataset
{variable} in your messages maps to a dataset column. The Input Variables panel shows the mapping. To reach the playground with a dataset already selected, use New Experiment → Run in Prompt Playground from the dataset.Attach evaluators
Run
Compare experiments
The playground compares variants you are editing now. The dataset’s Experiments tab compares completed runs, including runs produced by a different experiment type. Side by side in the playground. Add a second prompt to compare wording changes directly, or use Compare Models to run the same prompt against different models. Both hold the dataset fixed, so the wording or model change is the only variable. Open a row’s output, then click View Diff on Experiments to see that row’s change against a baseline. Across runs on the dataset. Open the dataset’s Experiments tab, select two or more runs, and click Compare Experiments for per-row output differences, evaluator deltas, and summary metrics per run. This is where a run from last week and a run from today become directly comparable, whichever experiment type produced them.
Comparison view with diff mode enabled against a baseline run
Classification metrics
When your task returns a label rather than free-form text, accuracy, F1, precision, and recall are more useful than an output diff. Configure them once per dataset in Metrics Settings on the dataset’s Experiments tab:- Ground Truth Column, chosen from the dataset’s own columns.
- Predicted Column, chosen from the experiment’s output columns.
- Positive Class Value, the label that counts as positive.
Save the winning prompt
When a variant wins, save it to Prompt Hub so your app can resolve it at runtime and your team can see what changed.
Prompt Hub with its prompt list, versions, and labels
Save from the playground
Review the version history
Tag the version you ship
production, so your app resolves the approved prompt rather than a specific version number.Prompt version history and comparison in Prompt Hub
Save your playground session
A playground view is a named snapshot of a playground session, holding its prompt messages and tools, model and parameter configuration, dataset selection, and results. Views let you return to a setup, hand it to a teammate, or branch a new variant without rebuilding it. Saved views are listed under Playgrounds, where All, Prompt, and Agent filter by playground type. Each view can be renamed, duplicated, or deleted, and Enable view auto-save keeps a view current as you work.
Saved playground views with rename, duplicate, and delete actions