Skip to content
Unsnag

Scenario fields

An Unsnag Scenario: unsnag/scenarios/<id>.yaml, or a Draft Scenario: unsnag/drafts/<id>.yaml. A Scenario needs goal and checks; its id is the file name without .yaml. unsnag schema scenario prints the same definition as a JSON Schema.

FieldTypeDescription
titlestringA short title for the author's lists, never shown to an Agent.
goalstringThe goal, given verbatim to the Agent after the preamble.
checkslist of mapping (at least 1)The Checks that decide whether the goal was reached.
tagslist of stringFree-form tags, including archetype tags.
setupstringA shell script run as root before every Run.
teardownstringA shell script run after the Checks.
solutionmappingThe Reference Solution, never shown to an Agent.
wrong_answerslist of stringPlausible wrong answers the Jury must reject.
notesstringNotes for the author, never shown to an Agent.
allowlist of stringLeak lint hits to accept on purpose.
budgetnumber (> 0)The Run budget for this Scenario, instead of the Benchmark's.
timeoutstring or number (> 0)The Run time limit for this Scenario, instead of the Benchmark's.

title

A short title for the author's lists, never shown to an Agent.

Type: string

Hint: write a title of a few words

goal

The goal, given verbatim to the Agent after the preamble.

Type: string
Required: yes

Hint: state the goal the way a user would ask a colleague

checks

The Checks that decide whether the goal was reached.

Type: list of mapping (at least 1)
Required: yes

Hint: add a Check, such as - command: test -f /work/out.txt

checks[].command

A shell script run as root in /work after the Agent; exit 0 means pass.

Type: string
Required: exactly one of command, answer, judge

Hint: write a shell script, such as test -f /work/out.txt

checks[].answer

A fixed match on the Agent's final answer.

Type: mapping
Required: exactly one of command, answer, judge

Hint: write answer: { contains: <text> }, { regex: <regex> } or { number: <n>, tolerance: <t> }

checks[].answer.contains

Text the answer must contain.

Type: string or mapping
Required: exactly one of contains, regex, number

Hint: give the text, or { truth: <shell command> }

checks[].answer.contains.truth

A shell command run after the Agent; its stdout is the expected value.

Type: string
Required: yes

Hint: write a shell command

checks[].answer.regex

A regex the answer must match.

Type: string or mapping
Required: exactly one of contains, regex, number

Hint: give a regex, or { truth: <shell command> }

checks[].answer.regex.truth

A shell command run after the Agent; its stdout is the expected value.

Type: string
Required: yes

Hint: write a shell command

checks[].answer.number

A number the answer must state.

Type: number or mapping
Required: exactly one of contains, regex, number

Hint: give a number, or { truth: <shell command> }

checks[].answer.number.truth

A shell command run after the Agent; its stdout is the expected value.

Type: string
Required: yes

Hint: write a shell command

checks[].answer.tolerance

How far the stated number may be from number and still pass.

Type: number (≥ 0)
Default: 0

checks[].answer.near_miss

How far the stated number may be from number to count as a near miss.

Type: number (≥ 0)

checks[].answer.ignore_case

Match contains and regex ignoring case.

Type: boolean
Default: false

checks[].judge

A free-text answer decided by the Jury.

Type: mapping
Required: exactly one of command, answer, judge

Hint: write judge: { rubric: <what a good answer says> }

checks[].judge.rubric

What a correct answer says.

Type: string
Required: yes

Hint: describe what a correct answer says

checks[].judge.expected

The true answer.

Type: string or mapping

Hint: give the true answer, or { truth: <shell command> }

checks[].judge.expected.truth

A shell command run after the Agent; its stdout is the expected value.

Type: string
Required: yes

Hint: write a shell command

tags

Free-form tags, including archetype tags.

Type: list of string

Hint: list tags, such as [lookup]

setup

A shell script run as root before every Run.

Type: string

Hint: write a shell script

teardown

A shell script run after the Checks.

Type: string

Hint: write a shell script

solution

The Reference Solution, never shown to an Agent.

Type: mapping

Hint: write solution: { commands: <shell>, answer: <final answer> }

solution.commands

The Target CLI calls an expert would make.

Type: string
Required: yes

Hint: write a shell script

solution.answer

The final answer, when the goal asks a question.

Type: string

Hint: write the final answer

wrong_answers

Plausible wrong answers the Jury must reject.

Type: list of string

Hint: list wrong answers

notes

Notes for the author, never shown to an Agent.

Type: string

allow

Leak lint hits to accept on purpose.

Type: list of string

Hint: list the flags or command names to allow

budget

The Run budget for this Scenario, instead of the Benchmark's.

Type: number (> 0)

Hint: give an amount in US dollars, such as 2.50

timeout

The Run time limit for this Scenario, instead of the Benchmark's.

Type: string or number (> 0)

Hint: write a duration such as 90s, 15m or 1h, or a number of seconds