> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.comet.com/docs/opik/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.comet.com/docs/opik/_mcp/server.

# Prompt Playground

The Playground lets you test prompt changes and compare models without writing code. Create
multiple prompt variants, run them side by side, and validate the results against a test suite —
all from the Opik UI.

![Playground with two prompt variants running against a test suite, showing pass/fail results](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/opik.docs.buildwithfern.com/b845a048a0ac3ad83a013e80af1030aa2d1ac0c1d354b6c1821d5e536b557795/img/v2/prompt-engineering/playground.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260922%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260922T073122Z&X-Amz-Expires=604800&X-Amz-Signature=cbf5d67b9b6cde415216ac82f726458ac0d01b0800886bb17570d8499949b369&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Compare prompt variants side by side

Each variant in the Playground is independent — it has its own model, messages, and configuration.
This means you can test a prompt change against the current version, try different models on the
same prompt, or experiment with temperature and sampling parameters, all in a single view.

Supported providers include OpenAI, Anthropic, Gemini, OpenRouter, Vertex AI, and custom
endpoints. Reasoning models like Claude and o1/o3 expose additional controls such as thinking
effort.

Click **Run** (or press **Shift+Enter**) to execute all variants at once. Results stream in real
time with the model's response, token usage, latency, and a link to the full trace.

## Validate against test suites

The real power of the Playground is running your prompt variants against a dataset or test suite.
Instead of manually checking a handful of inputs, you can validate across your full set of test
cases and see which variant performs better.

#### Bind a dataset or test suite

Click **Test on Dataset** in the header and select a dataset or test suite. If you're using
template variables (`{{variable_name}}`), they are automatically mapped to dataset columns.

#### Run the experiment

Click **Run experiment** to execute all prompt variants against every item in the dataset.
Results appear in a table below the prompts, with each variant's output shown side by side.

#### Review results

When using a test suite, each output is scored against the suite's evaluation rules and
displayed as pass/fail. You can click into any result to inspect the full trace.

Experiments are saved automatically — compare them over time in the **Experiments** tab.

## Template variables

Use `{{variable_name}}` syntax in your prompt messages to create dynamic templates. When running
in standard mode, the Playground asks you to fill in the values. In dataset mode, variables are
mapped to dataset columns automatically.

## Next steps

* [Prompt Library](/development/prompt-library/overview) — Manage prompts and the rest of your agent configuration in one place
* [Test suites](/evaluation/advanced/building-test-suites) — Build the test cases your playground experiments run against
* [Experiments](/evaluation/advanced/evaluate_your_llm) — Review and compare experiment results over time