Save Scenario
save_scenarioSave a named scenario for quality tests. Provide dataset as JSONL content, file path, or rows. Existing scenario names return the current version.
Instructions
Save a named scenario for use in quality tests.
Provide EXACTLY ONE dataset source: `content`, `file_path`, or
`rows`.
Prefer `file_path` for local .jsonl files — the server reads the
file directly, so no rows pass through the assistant's context.
When passing rows through the assistant instead, keep the dataset
UNDER 2,000 rows (`content` with the file's text, or `rows` for
tiny datasets). For 2,000 rows or more, always use `file_path` or
upload directly to Okareo via the web app, SDK, or CLI, to avoid
unnecessary token cost.
If a scenario with the same name already exists, the existing
scenario is returned (idempotent). Scenarios are immutable after
creation — use create_scenario_version to create updated versions.
Args:
name: A unique name for the scenario.
content: Raw JSONL text (one JSON object with 'input' and
'result' per line). Only for datasets under 2,000 rows.
file_path: Path to a local .jsonl file. Preferred — works for
any size.
rows: List of data rows, each with 'input' (any type) and
'result' (any type). Use for small scenarios (< 20 rows).
tags: Optional list of tags for categorizing the scenario.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| rows | No | ||
| tags | No | ||
| content | No | ||
| file_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |