Eval Suite & Playground
Test agents with golden test sets and the prompt playground
Builder Guide: Eval Suite & Prompt Playground
This guide covers two closely related Studio features for testing and iterating on agent behavior: the Eval Suite for systematic quality assessment, and the Prompt Playground for rapid interactive experimentation.
Where to use: Agent Studio > Evals (
http://localhost:3001/evals) and Agent Studio > Playground (http://localhost:3001/playground).
Table of Contents
Eval Suite Overview
The Eval Suite provides systematic, repeatable quality testing for agents. Instead of manually chatting with an agent to check if it works, you define golden test cases and run them automatically.
Core Concepts
| Concept | Description |
|---|---|
| Test Case | A single input/expected-output pair with optional grading criteria |
| Eval Run | A batch execution of test cases against an agent configuration |
| Grade | A score (pass/fail/partial) assigned by an LLM judge or exact match |
| Regression | A test case that previously passed but now fails after a change |
Creating Test Cases
Test cases are managed in Agent Studio at /evals. Each test case includes:
- Input prompt -- The message sent to the agent
- Expected output -- The reference answer (used by graders)
- Tags -- Categorization labels (e.g.,
safety,accuracy,edge-case) - Grading method -- How to evaluate the response (
llm-judge,exact-match,contains,regex)
Example test case:
{
"input": "What is the capital of France?",
"expectedOutput": "Paris",
"tags": ["factual", "geography"],
"assertion": "contains_expected"
}
Assertion types & the required criterion (as built)
The editor picks an assertion type; whichever criterion that method grades against is required (the Save button stays disabled until it's filled, and the backend rejects an empty criterion — see "no free passes" below).
| Assertion | What it checks | Required criterion |
|---|---|---|
response_not_empty | response is non-empty | — |
response_length_gt_50 | response > 50 chars | — |
no_system_prompt_leak | no prompt-leak phrases | — |
contains_expected | response contains the expected text | Expected Output |
llm_judge_reference | LLM scores semantic alignment to a reference answer | Expected Output (the ideal answer) |
llm_judge_pointwise | LLM scores against a rubric (reference-free) | Rubric (Expected Output is ignored) |
For "expect output semantically": use llm_judge_reference (put the ideal
answer in Expected Output) when a correct answer exists; use llm_judge_pointwise
(write a rubric of explicit criteria) when the answer is open-ended. The judge
passes at a default threshold of 3/5 and runs at temperature 0.1.
No free passes: an empty Expected Output (contains_expected/llm_judge_reference)
or an empty rubric (llm_judge_pointwise) now fails the case instead of
silently passing — empty criteria were the source of a previous "always green" bug.
Keep a negative control. Add at least one case a correct agent should fail
(e.g. ask for "apple", expect "banana" with contains_expected). If it ever
passes, the harness is broken. The seeded "Starter checks (example)" suite on
the tester agent demonstrates this (5 real cases + 1 negative control).
Running Evaluations
- Navigate to Evals in Studio.
- Select the agent and test cases to include.
- Click Run Evaluation.
- The system executes each test case against the agent and records:
- The actual response
- The grade (pass/fail/partial)
- Latency (ms)
- Token usage (input/output)
- Cost estimate
Results are displayed in a table with pass/fail indicators and can be filtered by tag or status.
In the Studio Test drawer Eval tab, the latest run shows an X/Y passed
summary plus a per-case breakdown (each case ✓/✗ with its reason and judge
score) — so a failing case (a true negative) is visible with why, e.g.
✗ contains_expected — Output does not contain expected: "banana". Runs are
ordered newest-first, so "Latest run" always reflects your most recent run (an
earlier bug showed the oldest run, masking later failures).
LLM-as-Judge Grading
For test cases that require nuanced evaluation (not just string matching), the eval suite uses an LLM as a judge:
- The judge LLM receives: the input, the expected output, and the actual response.
- It evaluates on criteria such as: factual accuracy, completeness, tone, safety.
- It returns a structured grade with a score and explanation.
The judge model is configurable per eval run (defaults to the same model used by the agent).
Regression Tracking
The eval suite tracks results over time. When you modify an agent's prompt, model, or tools:
- Re-run the eval suite.
- The system compares results to the previous run.
- Regressions are highlighted -- test cases that previously passed but now fail.
- This prevents accidental quality degradation when iterating on agent configuration.
Eval API Reference
# List eval test cases
GET /api/evals/cases
# Create a test case
POST /api/evals/cases
{
"input": "...",
"expectedOutput": "...",
"tags": ["..."],
"gradingMethod": "llm-judge"
}
# Run an evaluation
POST /api/evals/runs
{
"agentId": "agent-1",
"caseIds": ["case-1", "case-2"],
"model": "claude-sonnet-4"
}
# Get eval run results
GET /api/evals/runs/:runId
Prompt Playground Overview
The Prompt Playground is an interactive testing environment for experimenting with prompts, models, and parameters in real time. It is the fastest way to iterate on agent behavior before committing changes.
Playground Features
| Feature | Description |
|---|---|
| Monaco Editor | Full-featured code editor for writing and editing system prompts |
| Model Selector | Choose from all available platform models (D4 policy-aware) |
| Temperature Slider | Adjust creativity vs. determinism (0.0 to 2.0) |
| Max Tokens | Control response length |
| Live Chat | Send messages and see responses in real time |
| Token Counter | See input/output token counts per message |
| Cost Estimate | Per-message and cumulative cost tracking |
| Version History | Save and compare prompt versions |
Model Selection
The playground's model selector shows all models available to the current tenant, including:
- Model name and provider
- Hosting type (EU self-hosted vs. external)
- Cost tier (budget / standard / premium / reasoning)
- D4 policy indicators -- whether the model is allowed by the tenant's model access policies
Models that are blocked by policy are shown but greyed out with an explanation.
Parameter Controls
| Parameter | Range | Default | Description |
|---|---|---|---|
| Temperature | 0.0 -- 2.0 | 0.3 | Controls randomness. Lower = more deterministic. |
| Max Tokens | 1 -- 32768 | 2048 | Maximum response length in tokens. |
| Top P | 0.0 -- 1.0 | 1.0 | Nucleus sampling threshold. |
| Frequency Penalty | -2.0 -- 2.0 | 0.0 | Penalizes repeated tokens. |
| Presence Penalty | -2.0 -- 2.0 | 0.0 | Penalizes tokens that have appeared. |
Version Management
The playground supports saving and comparing prompt versions:
- Write or modify a system prompt in the Monaco editor.
- Click Save Version to snapshot the current prompt + parameters.
- Switch between versions to compare behavior.
- When satisfied, copy the prompt to the Agent Designer.
Live Metrics
Each playground interaction shows:
- Latency -- Time to first token and total response time
- Token usage -- Input tokens (prompt) and output tokens (response)
- Cost -- Estimated cost based on the selected model's pricing
- Model -- Which model generated the response
Workflow: From Playground to Eval
The recommended workflow for building high-quality agents:
- Explore in Playground -- Experiment with different prompts, models, and parameters.
- Save promising versions -- When a prompt produces good results, save the version.
- Create eval test cases -- Based on your exploration, define golden test cases that capture expected behavior.
- Apply to Agent Designer -- Copy the best prompt/model/params to the agent's configuration.
- Run eval suite -- Verify the agent passes all test cases.
- Iterate -- When you need to change the agent, re-run evals to catch regressions.
Model Browser
The Model Browser (Studio > Models, http://localhost:3001/models) provides a catalog of all LLM models available on the platform:
| Column | Description |
|---|---|
| Model Name | Display name and model ID |
| Provider | Anthropic, OpenAI, Google, Meta, DeepSeek, Alibaba, etc. |
| Hosting | EU Self-Hosted or External |
| Source | Open Source or Proprietary |
| Cost Tier | Budget, Standard, Premium, or Reasoning |
| Context Window | Maximum input tokens (e.g., 200K for Claude Sonnet 4) |
| D4 Policy | Whether the model is allowed/denied by tenant policy |
The model browser is read-only. Model access policies are managed by admins in the Admin Console.
Related Documentation
- Registering Agents Guide -- Full agent lifecycle and the 9-tab designer
- Admin Model Policies Guide -- Configuring model access policies
- LLM Provider Reference -- T-Systems AIFS model catalog
- External Agents Guide -- Integrating external agent frameworks