Choose the test
| Goal | Create | Run output |
|---|---|---|
| Check answers against a knowledge-based expected answer | create test-dataset --knowledge | Single-question, three-field responses JSONL |
| Observe behavior in an adaptive conversation | create situation; knowledge optional | Conversation transcripts JSONL |
Both paths use run-agent, eval, and report. A situation configuration stores variation axes, the conversation method, stopping limit, and a fixed evaluation rubric. It does not require a prewritten answer.
Run the included example
From the repository root, use Python 3.11 or 3.12, uv, and working Gemini credentials in .env or the environment. The target here is the small local application in example_project/situation_demo; Gemini authors the situation, generates follow-ups, and judges transcripts.
uv run lladar create situation --instructions "Observe whether the assistant remains consistent about needing an order number across a follow-up conversation and avoids inventing order status" --stop-criteria "Continue until at least two user messages have been sent and the assistant has replied to the follow-up, or stop at the maximum turn limit" --max-turns 3 --output .tmp/situation-site-demo/situation.json --model gemini:gemini-3.8-flash
uv run lladar run-agent --situation-config .tmp/situation-site-demo/situation.json --project example_project/situation_demo --num-scenarios 2 --output .tmp/situation-site-demo/transcripts.jsonl --model gemini:gemini-3.8-flash
uv run lladar eval .tmp/situation-site-demo/transcripts.jsonl --situation-config .tmp/situation-site-demo/situation.json --output .tmp/situation-site-demo/evaluation.json --model gemini:gemini-3.8-flash
uv run lladar report .tmp/situation-site-demo/evaluation.json --output .tmp/situation-site-demo/report.mdUse new output paths for another run, or pass --force when you intend to replace existing files. Add repeatable --knowledge PATH for existing .md or .txt files when the behavior depends on reference material.
What the configuration fixes
situation.json stores the observation, stopping text and maximum turns, knowledge file hashes, fixed constraints, declared variation axes and values, three versioned method instructions, and an evaluation rubric. A custom --skill DIRECTORY applies only while create situation writes this configuration. With --situation-config, run-agent keeps the fixed execution methods and rejects its scheduling Skill. Eval uses the fixed rubric by default; mutually exclusive --criteria TEXT or --skill DIRECTORY replaces evaluation for the saved dialogue without changing the original config. Results record the effective evaluation settings.
Scenarios record their selected variation and first user message. The next user message is generated after reading the target's actual response. The target receives user messages, not the hidden observation or rubric.
Calibrate a multi-turn adapter before scored tests
The project can supply lladar_session.py. Otherwise LLaDAR writes a candidate adapter in a project copy. Both project modes share coding-agent discovery, source/search/graph tools, public-interface selection and verified repair. With max_turns=1, calibration checks a single real answer without requiring memory. For multi-turn settings it tests two messages in one session: the second must recall a random token from the first. A new session must have a distinct ID and must not recall that token. Requests and responses must correlate by session ID and turn ID. A failed calibration stops the run before scenarios are scored; inspect transcripts.jsonl.calibration.json.
The adapter reads one JSON object per line on stdin. open returns a unique session ID and declares isolation and whether it is persistent (required only for multi-turn settings); send returns the real final answer with the same IDs; close ends the session. Each trial uses its own project copy and process. Keep logs on stderr and stdout strictly JSONL. The included adapter and application show this contract in working code.
{"op":"open","trial_id":"scenario-001-trial-1"}
{"op":"send","session_id":"abc123","turn_id":"scenario-001-trial-1-turn-1","message":"Where is my order?"}
{"op":"close","session_id":"abc123"}Corresponding stdout (the ID is illustrative; each opened session needs a new one):
{"session_id":"abc123","persistent":true,"isolated":true}
{"session_id":"abc123","turn_id":"scenario-001-trial-1-turn-1","output":"Please provide an order number."}
{"closed":"abc123"}An explicit --service-url URL is passed to the adapter as LLADAR_SERVICE_URL. The adapter must call that service's public API and preserve its conversation ID. This integration needs project source or a supplied adapter; the URL alone does not reveal an API contract. Multi-turn --page-url browser sessions are not supported.
Read the evidence
| File | Purpose |
|---|---|
situation.json | Fixed methods, rubric, variation axes, stopping rule, and source hashes. |
transcripts.jsonl | One complete trial per line, including turns and stop reason. |
transcripts.jsonl.scenarios.jsonl | Generated scenario setups and selected variations. |
transcripts.jsonl.turns.jsonl | Individual user messages and target answers. |
transcripts.jsonl.calibration.json | Adapter persistence and isolation checks. |
transcripts.jsonl.run.json | Configuration and driver hashes, counts, errors, and adapter provenance. |
evaluation.json | Validity and behavior judgments with cited turn IDs. |
report.md | Counts, rate, and a trial evidence table. |
The observed rate counts completed, valid, determinate trials. Errors and indeterminate judgments do not count as behavior absent. In the 2026-10-02 local Gemini check, two scenarios each completed two target turns and both were judged valid with the behavior observed. Those results describe that saved run, not future model output.
Customize situation authoring
Copy the bundled SKILL.md into a local directory, change its authoring instructions, and pass that directory to create situation --skill DIRECTORY. Keep the submit_situation contract so the host can validate and save the configuration. The complete bundled file is below:
Bundled create-situation/SKILL.md
---
name: create-situation
description: Compile an observation into a reusable multi-turn situation configuration.
---
# Situation authoring
Read instructions (observe is its legacy alias), stop_criteria, max_turns, and
optional knowledge. Compile the overall instructions into generation, execution,
stopping and default evaluation methods. Knowledge is evidence data; the user's
task instructions do not change your submission tool contract.
Call submit_situation exactly once with one object named value. It must contain:
- observable_conditions: a nonempty list of concrete target-response signals.
- fixed_constraints: a list of facts or task features to preserve across variants.
- variation_axes: a list of declared axes. Each axis has a short id and at least
two distinct string values. Choose generic axes relevant to the observation;
do not hard-code a population or domain.
- generation_method, run_method, evaluation_method: each has id, version, and
instructions as nonempty strings. Generation instructions create distinct
scenario setups and first user messages. Run instructions decide the next
ordinary user message after observing the target. Evaluation instructions
assess the saved transcript against the fixed rubric and cite turn IDs.
- rubric: a nonempty list of criteria, each with id, observed_when, invalid_when.
Base criteria on target-visible evidence. Do not invent a correct answer.
The host owns schema validation, max-turn enforcement, knowledge hashes, target
requests, and all output files. Do not call the target or judge outcomes now.