All the fields you can use in a task YAML file.
Unique identifier for the task
task_name: my_evaluation_task
Human-readable name for display
display_name: "My Evaluation Task"
Important: This is what appears in the UI task rail.
Detailed description of the task. Pipeline variables resolve per stability run; each run resets its pipeline context.
description: "Tests mathematical reasoning with basic arithmetic"
tests:
- id: test_1
prompt: "What is 2 + 2?"
expected: 4
scoring:
mode: exact_match
- id: test_2
prompt: "Calculate 15 * 3"
expected: 45
points: 2
Base folder for attachments. If relative, resolves from <bench_dir>. Use an absolute path to bypass.
attachments_root: "./documents"
Enable {document_content} placeholder rendering for modern format. Text from attachments is injected only when BOTH are true: (1) enable_prompt_placeholders: true AND (2) the prompt contains {document_content}. Otherwise, attachments are passed as file paths (not inlined).
falseenable_prompt_placeholders: true
When true, allows using {document_content} in prompts.
task_defaults:
temperature: 0.2
Fields you can use for each test in the tests array:
Unique identifier for the test case
The prompt to send to the model
Expected output for scoring
Maximum points this test contributes to the total score. Capped at 999 per test.
tests:
- id: complex_task
prompt: "Solve this complex problem..."
expected: "Solution"
points: 5 # This test is worth 5 points
Default: 1.0. Maximum: 999 per test.
Scoring criteria configuration
Files to attach to the prompt. TWO CATEGORIES: (1) TEXT-EXTRACTABLES (.txt, .md, .csv, .json, .xlsx, .xls, .xlsm, .pdf, .docx, .rtf): MUST use {document_content} placeholder. Content counted in preflight token budget. Auto-extracted if libraries present (pandas/PyPDF2/python-docx/striprtf). (2) VISION IMAGES (.png, .jpg, .jpeg, .gif, .webp, .bmp): Attach normally (NOT via {document_content}). Sent as binary to vision models. Conservative vision guard applied (~500 tokens/MP, 256-4096 range). AVIF files auto-convert to JPEG. ⚠️ WARNING: Extractables without {document_content} are NOT preflight-counted and may overflow small contexts. See USER_GUIDE.md#attachments-and-document_content
Override the task default temperature for this test
temperature: 0.2 # Override task default
How to score model responses - pick the right tool for your evaluation needs!
Tracks token usage against limits - ensures models stay within token budgets
Cost efficiency scoring - cheaper models get better scores!
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
target_usd |
number | No | 0.001 |
Your cost goal per test in US dollars (smaller is cheaper) |
min_score |
number | No | 0.0 |
Lowest possible score even if very expensive (0-1) |
Static Python code quality via AST: cyclomatic complexity, long lines, function count
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source_from |
string | No | "attachment" |
Get code from attachment or model output |
attachment_index |
integer | No | 0 |
Which attachment to analyze (0-based) |
targets |
object | No | {} |
Target thresholds for metrics (max_avg_cc, max_fn_cc, max_long_lines) |
weights |
object | No | {"avg_cc": 0.34, "fn_cc": 0.33, "long_lines": 0.33} |
Relative weights for each metric (avg_cc, fn_cc, long_lines) |
JSON field comparison - check specific parts of JSON data
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
fields |
array | No | [] |
Top-level JSON fields to check (e.g., ['name', 'score']). Nested paths NOT supported. |
partial_credit |
boolean | No | false |
Give partial points if some fields match |
JSON structure validation - ensures responses match expected format
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
schema |
object | No | {} |
JSON Schema that the response must match |
partial_credit |
boolean | No | false |
Give partial points even if schema validation has errors |
extract_json_from_text |
boolean | No | true |
Find and extract JSON from text (e.g., from code blocks) |
Must include ALL items - perfect for checklists and requirements
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
partial_credit |
boolean | No | false |
Give partial points if some items are found |
case_insensitive |
boolean | No | true |
Ignore uppercase/lowercase when finding items |
order_matters |
boolean | No | false |
Items must appear in the listed order |
invert |
boolean | No | false |
Score high when items are NOT found (useful for safety tests) |
delimiter |
string | No | "," |
Character to split items (e.g., ',' for comma-separated) |
Must include AT LEAST ONE item - flexible multiple-choice checking
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
partial_credit |
boolean | No | true |
Give partial points based on how many items found |
case_insensitive |
boolean | No | true |
Ignore uppercase/lowercase when finding items |
invert |
boolean | No | false |
Score high when items are NOT found (useful for safety tests) |
Compare lists of items - choose if order matters or not
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
order_sensitive |
boolean | No | true |
Items must be in the same order to match |
partial_credit |
boolean | No | false |
Give partial points for partially correct lists |
case_insensitive |
boolean | No | true |
Ignore uppercase/lowercase in list items |
Checks that at least K items from expected are present in the model output. Supports aliases and normalization.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
min_hits |
integer | No | 1 |
Minimum number of items that must be found |
aliases |
object | No | {} |
Map of canonical names to equivalent forms |
lower |
boolean | No | true |
Convert to lowercase before matching |
strip_punct |
boolean | No | true |
Remove punctuation before matching |
collapse_ws |
boolean | No | true |
Collapse multiple spaces to single space |
Smart list comparison - uses F1 score for unordered sets
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
case_insensitive |
boolean | No | true |
Ignore case when comparing items |
dedupe |
boolean | No | true |
Remove duplicate items before calculating F1 score |
Find numbers in text - extracts and compares numeric values from prose
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tolerance |
number | No | 0.0 |
How close the number can be (e.g., 0.01 allows ±0.01) |
extract_strategy |
string | No | "first" |
Which number to pick: first one, last one, or largest |
require_unit |
boolean | No | false |
Only accept if a valid unit is present (e.g., 'kg', 'meters') |
unit_aliases |
array | No | [] |
Accepted unit strings (e.g., ['J', 'joule', 'joules']) |
unit_proximity |
integer | No | 5 |
How many words away the unit can be from the number |
method |
string | No | "abs" |
'abs' = exact difference, 'rel' = percentage difference |
range |
object | No | "N/A" |
Accept values in a range (e.g., {'min': 10, 'max': 20}) |
Number comparison with wiggle room - allows small differences
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tolerance |
number | No | 1e-06 |
How close numbers must be (e.g., 0.01 allows ±0.01) |
parse_from_text |
boolean | No | false |
Find and extract numbers from text answers |
Response time scoring - faster models get better scores!
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | No | "runtime" |
Use actual runtime, model's rated speed, or both |
target_ms |
number | No | 1000 |
Your response time goal in milliseconds (smaller is faster) |
curve |
string | No | "softcap" |
'softcap' = full points if under target, 'linear' = gradual decrease |
min_score |
number | No | 0.0 |
Lowest possible score even if very slow (0-1) |
combine |
string | No | "weighted" |
How to mix actual and rated speed: 'weighted' or 'sum' |
latency_weight |
number | No | 0.25 |
How much to trust rated speed vs actual (0=actual only, 1=rated only) |
Consistency matters - measures how stable results are across runs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
stability_metric |
string | No | "range" |
How to measure consistency: 'range' = max-min, 'stdev' = spread, 'variance' = squared |
Flexible text match - ignores uppercase/lowercase differences
Perfect text match - must be exactly the same (ignoring extra whitespace)
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
case_insensitive |
boolean | No | false |
Ignore uppercase/lowercase differences |
trim_whitespace |
boolean | No | true |
Remove extra spaces at start/end before checking |
Pattern matching with regex - powerful text extraction and validation
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pattern |
string | No | "N/A" |
Pattern to find in text (regex syntax) |
flags |
array | No | [] |
Advanced regex options (e.g., ['IGNORECASE']) |
match_mode |
string | No | "all" |
'all' = every pattern must match, 'any' = at least one |
partial_credit |
boolean | No | false |
Give partial points based on patterns matched |
How many words match? Measures overlap between responses
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
min_overlap |
number | No | 0.5 |
Minimum word match ratio to pass (0.5 = 50% match) |
partial_credit |
boolean | No | false |
Give partial points based on how many words match |
case_insensitive |
boolean | No | true |
Ignore uppercase/lowercase when matching words |
Chain your tests together! Export values from one test and use them in the next - perfect for multi-step workflows.
How to chain results between tests.
Use the exports field in a test to capture values:
tests:
- id: test_1
prompt: "What is 15 + 27?"
expected: 42
exports:
- name: result1
mode: raw # Capture full response
Reference exported values in subsequent tests with {var:name}:
tests:
- id: test_2
prompt: "Multiply {var:result1} by 3"
expected: 126
# WRONG:
{{exports.test_1.result1}} # Don't use
{{exports.result1}} # Don't use
{{result1}} # Don't use
# CORRECT:
{var:result1} # Use this!
Attach PDFs, text files, spreadsheets, and more to your tests. Document content is automatically included when benchmarking.
Use {document_content} to control exactly where attachment text appears in your prompt. Without it, content is added automatically:
enable_prompt_placeholders: true
tests:
- id: doc_analysis
prompt: |
Analyze this document and extract the main topic:
{document_content}
attachments:
- report.pdf
expected: "Financial analysis"
task_name: simple_math
display_name: "Simple Math Test"
tests:
- prompt: "What is 2 + 2?"
expected: 4
task_name: chained_math
display_name: Chained Math Example
description: Demonstrates pipeline variables
tests:
- id: addition
prompt: "Calculate 15 + 27. Return ONLY the number."
expected: 42
scoring:
mode: exact_match
exports:
- name: sum_result
mode: raw
- id: multiplication
prompt: "Multiply {var:sum_result} by 3. Return ONLY the number."
expected: 126
scoring:
mode: numeric_from_text
task_name: vision_emotional_detection
display_name: Vision - Emotion Detection
description: Evaluate model ability to detect emotions in images
attachments_root: test_data/images
tests:
- id: happy_detection
prompt: |
Look at the attached image and answer with only the word "happy" or "sad".
expected: happy
points: 10
attachments:
- family_photo.jpg
scoring:
mode: case_insensitive
- id: sad_detection
prompt: |
Look at the attached image and answer with only the word "happy" or "sad".
expected: sad
points: 10
attachments:
- memorial_photo.jpg
scoring:
mode: case_insensitive
- id: count_people
prompt: |
Count the number of people in the attached image.
Return ONLY the number (digits only).
expected: 4
points: 20
attachments:
- group_photo.png
scoring:
mode: numeric_from_text
tolerance: 0
task_name: excel_data_analysis
display_name: Excel Data Analysis
description: Extract and analyze data from spreadsheet
enable_prompt_placeholders: true
attachments_root: test_data/spreadsheets
tests:
- id: count_items
prompt: |
Analyze the attached Excel file.
Count how many times "apple" appears in the 'Product' column.
Return ONLY the number.
{document_content}
expected: 5
points: 25
attachments:
- sales_data.xlsx
scoring:
mode: numeric_from_text
tolerance: 0
- id: sum_values
prompt: |
From the same data, calculate the total revenue for "apple" products.
Return ONLY the number (no currency symbols).
{document_content}
expected: 2500
points: 35
attachments:
- sales_data.xlsx
scoring:
mode: numeric_tolerance
tolerance: 0.01
method: abs
task_name: philosophy_knowledge
display_name: Ancient Philosophy Knowledge Test
description: Test knowledge of ancient Greek philosophers
tests:
- id: name_philosophers
prompt: List 5 ancient Greek philosophers. Separate names with commas.
expected:
- Socrates
- Plato
- Aristotle
- Epicurus
- Thales
- Diogenes
- Pythagoras
- Heraclitus
points: 20
scoring:
mode: contains_any
partial_credit: true
case_insensitive: true
- id: socratic_method
prompt: |
In one sentence, what is the Socratic method?
expected:
- questioning
- dialogue
- inquiry
- assumptions
points: 30
scoring:
mode: contains_all
partial_credit: true
case_insensitive: true
task_name: science_quiz
display_name: Science Knowledge Quiz
description: Multiple choice questions testing scientific knowledge
tests:
- id: periodic_table_mcq
prompt: |
What is the chemical symbol for Gold?
A) Au
B) Ag
C) Fe
D) Cu
Return ONLY the letter of the correct answer.
expected: A
points: 10
scoring:
mode: exact_match
case_insensitive: true
trim_whitespace: true
- id: astronomy_mcq
prompt: |
Which planet is known as the "Red Planet"?
A) Venus
B) Jupiter
C) Mars
D) Saturn
Return ONLY the letter of the correct answer.
expected: C
points: 10
scoring:
mode: exact_match
case_insensitive: true
trim_whitespace: true
- id: biology_mcq
prompt: |
What is the powerhouse of the cell?
A) Nucleus
B) Ribosome
C) Mitochondria
D) Golgi apparatus
Return ONLY the letter of the correct answer.
expected: C
points: 10
scoring:
mode: exact_match
case_insensitive: true
trim_whitespace: true
Examples showing different ways to describe your benchmark tasks. The AI agent will interpret your intent and generate test cases automatically. These examples progress from simple one-liners to more detailed specifications.
I want to test if AI models can do basic math.
That's it! The AI agent will generate appropriate math questions and expected answers for you.
Test if models can add 234 + 567, subtract 89 from 456, and multiply 23 by 4.
Create a geography quiz with these questions:
1. What's the capital of France? (Answer: Paris)
2. Name the longest river in the world (Answer: Nile or Amazon, accept either)
3. Which continent has the most countries? Give options:
A) Asia
B) Africa
C) Europe
D) North America
The correct answer is B
Make the first two worth 15 points each and the multiple choice worth 20 points.
Build a task to evaluate reading comprehension using an attached article.txt file.
Test 1: Count how many times the word "innovation" appears in the document
Expected: 12 occurrences
Points: 20
Test 2: Extract the main author's name from the first paragraph
Expected: "Dr. Sarah Johnson"
Points: 15
Test 3: List three key technologies mentioned in the article
Expected answers should include at least 3 of: artificial intelligence, quantum computing, biotechnology, renewable energy, nanotechnology
Points: 30
Design a chained calculation task for testing multi-step reasoning:
Step 1: "A store has 156 apples. If they sell 40% of them, how many are left?"
- Expected: 94 (accept 93.6 with rounding)
- Points: 25
- Save this result for the next step
Step 2: "If each remaining apple costs $0.75, what's the total value of remaining inventory?"
- Expected: 70.50 or 70.5
- Points: 35
- This should use the result from step 1
Step 3: "If apples are packed 6 per box, how many full boxes can be made?"
- Expected: 15
- Points: 40
- Should use the quantity from step 1
Comprehensive JSON API response validation task:
test_1: Validate user profile JSON structure
prompt: "Generate a JSON object representing a user profile with fields: name (string), age (integer), email (string), active (boolean)"
expected: JSON schema with required fields and correct types
scoring: json_schema validation
points: 30
test_2: Extract nested values
prompt: "From this JSON: {'company': {'name': 'TechCorp', 'employees': {'count': 250, 'departments': ['Engineering', 'Sales', 'HR']}}}, extract the employee count"
expected: 250
scoring: numeric_from_text with tolerance 0
points: 20
test_3: Array manipulation
prompt: "Given the departments array from the previous JSON, return all departments that start with 'E'"
expected: ["Engineering"]
scoring: exact_match for JSON array
points: 25
Practical advice to help you create effective benchmarks and get the most out of your evaluations.
You don't always need complex scoring modes. In many cases, just providing an expected value is enough: the system defaults to exact_match automatically.
# This works! No scoring mode needed.
tests:
- id: capital_city
prompt: "What is the capital of Japan? Answer with the city name only."
expected: Tokyo
Add scoring modes only when you need specific behavior (numeric tolerance, partial matching, etc.).
Instead of crafting complex prompts with elaborate scoring rules, consider using multiple choice questions (MCQ). They're:
- id: science_mcq
prompt: |
Which planet is closest to the Sun?
A) Venus
B) Mercury
C) Mars
D) Earth
Return ONLY the letter.
expected: B
Rather than relying on sophisticated scoring modes to handle ambiguous outputs, invest in writing clear, specific prompts. A prompt like:
"Return ONLY the number, no words or units."
...is more reliable than trying to extract numbers from verbose responses with complex parsing rules.
If your task scores consistently high across multiple models, that's a sign your prompt is well-crafted: clear, unambiguous, and easy to follow.
If scores are inconsistent or surprisingly low, the prompt might be ambiguous or the expected answer too strict. This is valuable feedback for refining your prompts!
If a model scores lower than expected, don't guess why. Look at what it actually said:
This often reveals the issue immediately. Maybe the model gave the right answer but with extra text, or interpreted the question differently.
Models may return "Paris" or "paris" or "Paris.", so use case_insensitive: true to avoid false negatives:
scoring:
mode: exact_match
case_insensitive: true
trim_whitespace: true
Before running a full benchmark across all models, test with 2-3 models first. This lets you:
Once your task works well with a small set, expand to the full model list.