Skip to content

Examples and guides for using the OpenAI API

Tompakeman/realtime evals/types tooling (#2485)

Minhajul Hoque288f8d3eecc1
diff --git a/AGENTS.md b/AGENTS.md
index 63d33e10..4b14a4b7 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -40,5 +40,9 @@ These are considered priority 0 issues for this repo, in addition to the normal
## Recent Learnings
+- **`uv run` can inherit the wrong virtualenv in this repo** -> Clear `VIRTUAL_ENV` (for example `env -u VIRTUAL_ENV uv run ...`) when an unrelated environment is active -> Avoids misleading mismatch warnings and makes it clear the repo's `.venv` is the interpreter actually running the harnesses.
- **Realtime eval shared imports can resolve the wrong module under pytest** -> Add `shared/__init__.py` and ensure tests prepend `examples/evals/realtime_evals` to `sys.path` before importing `shared.*` -> Prevents collection failures caused by unrelated installed packages named `shared`.
- **Run-level grades can be overweighted by long simulations** -> Store turn-level grades on the matching turn and trace-level grades on one row per simulation instead of copying them onto every row -> Keeps `results.csv` row semantics intact and prevents summary means from favoring longer conversations.
+- **Synthetic-audio scaffold requests can pick the wrong harness** -> Default unspecified synthetic-audio evals to `crawl` text-to-TTS and reserve `walk` for replay-specific audio traits like noise, telephony artifacts, or speaker characteristics -> Keeps new realtime evals on the simplest harness unless audio realism is itself under test.
+- **Task-specific single-turn grading can outgrow the shared crawl schema** -> Keep the shared crawl harness for realtime execution, then add eval-local wrapper scripts that post-grade domain-specific quality and overwrite `results.csv` while preserving `results_base.csv` -> Avoids forking the harness when a use case needs richer grading than tool-call correctness.
+- **Synthetic learner audio can sound like eval scaffolding** -> Write `user_text` as a realistic in-app learner request and keep evaluation rules in metadata plus the system prompt -> Produces audio inputs that match the product surface instead of teaching the model the grading rubric through the spoken prompt.
diff --git a/examples/evals/realtime_evals/shared/plotting_utils.py b/examples/evals/realtime_evals/shared/plotting_utils.py
index 05bf35e6..5333a325 100644
--- a/examples/evals/realtime_evals/shared/plotting_utils.py
+++ b/examples/evals/realtime_evals/shared/plotting_utils.py
@@ -275,9 +275,7 @@ def _plot_turn_trends(
markeredgecolor=EDGE,
)
grade_ax.set_ylim(0, 1.05)
- grade_ax.set_title(
- "turn-level score by turn", loc="left", pad=12, fontsize=14
- )
+ grade_ax.set_title("turn-level score by turn", loc="left", pad=12, fontsize=14)
grade_ax.set_xlabel("turn index", fontsize=12)
grade_ax.set_ylabel("score", fontsize=12)
grade_ax.set_xticks(grouped["turn_index"])
@@ -370,7 +368,9 @@ def _plot_score_metrics(axis: plt.Axes, summary: Mapping[str, Any]) -> None:
def _plot_latency_quantiles(axis: plt.Axes, summary: Mapping[str, Any]) -> None:
- quantile_frame = _summary_quantile_frame(summary, LATENCY_COLUMNS, ["p50", "p95", "p99"])
+ quantile_frame = _summary_quantile_frame(
+ summary, LATENCY_COLUMNS, ["p50", "p95", "p99"]
+ )
axis.set_title("latency percentiles", loc="left", pad=12, fontsize=14)
if quantile_frame.empty:
_empty_panel(axis, "No latency percentile values found.")
@@ -431,9 +431,7 @@ def _plot_token_summary(axis: plt.Axes, summary: Mapping[str, Any]) -> None:
.reindex(metrics)
.reset_index()
)
- positions = [
- position + ((stat_index - 1) * width) for position in x_positions
- ]
+ positions = [position + ((stat_index - 1) * width) for position in x_positions]
bars = axis.bar(
positions,
subset["value"],
@@ -701,10 +699,7 @@ def _score_metric_rows(summary: Mapping[str, Any]) -> list[tuple[str, float]]:
for key in summary
if key.endswith("_mean")
and key not in {"grade_mean", *preferred_keys}
- and (
- key.replace("_mean", "").endswith("_grade")
- or key.startswith("grade_")
- )
+ and (key.replace("_mean", "").endswith("_grade") or key.startswith("grade_"))
)
for key in extra_grade_keys[:4]:
metric_value = _coerce_summary_float(summary.get(key))
@@ -854,5 +849,7 @@ def _status_color(status: str) -> str:
def _status_palette(status_values: Any) -> list[tuple[str, str]]:
- statuses = sorted({str(value).strip() for value in status_values if str(value).strip()})
+ statuses = sorted(
+ {str(value).strip() for value in status_values if str(value).strip()}
+ )
return [(status, _status_color(status)) for status in statuses]
diff --git a/examples/evals/realtime_evals/shared/result_types.py b/examples/evals/realtime_evals/shared/result_types.py
index 98b97c55..a087caf9 100644
--- a/examples/evals/realtime_evals/shared/result_types.py
+++ b/examples/evals/realtime_evals/shared/result_types.py
@@ -792,9 +792,9 @@ class RunEvalRunSummary:
grade_means["grade_mean"] = overall_grade_mean
grade_means.update(
{
- key: float(value)
- for key, value in summary.items()
- if key.endswith("_grade_mean") and value not in (None, "")
+ key: float(value)
+ for key, value in summary.items()
+ if key.endswith("_grade_mean") and value not in (None, "")
}
)
return cls(
diff --git a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/SKILL.md b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/SKILL.md
index 81220756..56ccf151 100644
--- a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/SKILL.md
+++ b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/SKILL.md
@@ -1,6 +1,6 @@
---
name: bootstrap-realtime-eval
-description: Bootstrap a new realtime eval folder inside this cookbook repo by choosing the right harness from examples/evals/realtime_evals, scaffolding prompt/tools/data files, generating a useful README, and validating the result with smoke and test runs. Use when a user wants to start a new crawl, walk, or run realtime eval in this repository.
+description: Bootstrap a new realtime eval folder inside this cookbook repo by choosing the right harness from examples/evals/realtime_evals, scaffolding prompt/tools/data files, generating a useful README, and validating it with smoke, full eval, and test runs. Use when a user wants to start a new crawl, walk, or run realtime eval in this repository.
---
# Bootstrap Realtime Eval
@@ -15,7 +15,9 @@ This skill is repo-specific. Do not copy harness code into the generated folder.
## Inputs To Collect
-Ask for the minimum set needed to choose and scaffold the eval:
+Always ask the user for the minimum set needed to choose and scaffold the eval before you create files, run the scaffold script, or author starter data. Do not skip this just because you can infer a default.
+
+Ask for:
- Eval name
- Goal or scenario
@@ -27,16 +29,26 @@ Ask for the minimum set needed to choose and scaffold the eval:
If the user does not know which harness they want, explain the options briefly and recommend one. See `references/harness-selection.md`.
-If the user only provides `user_text` or a short task description, do not block on missing fields. Infer a runnable starter scaffold from the available information, call out the assumptions, and make it easy to revise later.
+When the user asks for synthetic audio but does not specify a harness, default to `crawl` text-to-TTS unless they need the generated audio to carry particular noise, telephony artifacts, speaker characteristics, or other replay-specific properties. Use `walk` for those cases.
+
+Keep the questions concise and grouped into one short batch whenever possible.
+
+If the user only provides `user_text` or a short task description, still ask the questions above first. If they answer only partially, then infer the remaining low-risk details, call out the assumptions, and make the scaffold easy to revise later.
## Workflow
-1. Pick the harness.
+1. Ask the user for the required inputs first.
+ - Do this before making files or selecting a final harness.
+ - If the user already supplied some of the inputs, ask only for the missing ones.
+ - If you recommend a harness, wait for the user response before scaffolding.
+
+2. Pick the harness.
- `crawl`: single-turn text-to-TTS.
- `walk`: replay saved audio or generate audio from text rows.
- `run`: multi-turn simulation with tool mocks and judge criteria.
+ - If the user wants synthetic audio but does not care about replay-specific audio characteristics, prefer `crawl` over `walk`.
-2. Normalize the inputs.
+3. Normalize the inputs.
- If the user gives inline prompt or tool content, write it into the generated folder.
- If the user gives CSV data, inspect it with pandas before wiring it in.
- If the data is not yet harness-ready, scaffold the files and then have you author the starter dataset directly in those files.
@@ -44,14 +56,14 @@ If the user only provides `user_text` or a short task description, do not block
- Ground the starter data in the use case, prompts, tools, and any other material the user provided.
- Make the starter data realistic. Put yourself in the shoes of the end user in that use case and craft datapoints that a real user would plausibly say or do.
-3. Be proactive when data is missing.
+4. Be proactive when data is missing.
- `crawl`: you should author 3 starter rows covering one happy path and a couple of nearby variants or edge cases.
- `walk`: you should author 3 source CSV rows and prepare the audio-generation step so the user can create audio immediately.
- `run`: you should author 2 starter simulations, not 1.
- Do not rely on deterministic script-generated samples for use-case-specific starter data.
- Show the generated starter samples to the user, ask for a quick greenlight or correction, then expand only after feedback when the task calls for more coverage.
-4. Run the scaffold script:
+5. Run the scaffold script:
```bash
python examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/bootstrap_realtime_eval.py --name "<eval_name>" --harness "<crawl|walk|run>"
@@ -59,31 +71,28 @@ python examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/boot
Add flags for prompt, tools, data, graders, and run-specific fields as needed. Read the script help if you need the exact flag names.
-5. Review the generated folder.
+6. Review the generated folder.
- Confirm the README is accurate for the selected harness.
- Confirm the system prompt, tools, and data files point at the generated folder.
- If the user provided real data, make sure it is wired in instead of leaving starter placeholders.
- If you authored inferred starter data, show the user the generated rows or simulations before scaling up.
-6. Enrich the scaffold.
+7. Enrich the scaffold.
- For `crawl` and `walk`, make the CSV realistic and ensure the expected tool columns are present.
- For `walk`, if the dataset lacks `audio_path`, use the shared `walk_harness/generate_audio.py` flow described in the README.
- For `run`, make sure `simulations.csv` and the starter `sim_*.json` file reflect the user’s scenario, tool mocks, and graders.
-7. Validate before returning.
- - Run the format checks before the smoke run:
- - `make -C examples/evals/realtime_evals validate-input HARNESS=<crawl|walk|run> DATA_PATH=<path-to-data-or-simulations.csv>`
+8. Validate before returning.
- Run a smoke eval for the generated folder.
- - Run the output-format check against the emitted run directory:
- - `make -C examples/evals/realtime_evals validate-output HARNESS=<crawl|walk|run> RUN_DIR=<path-to-results/run_name>`
+ - If the smoke eval succeeds, automatically run the full eval for the generated folder in the same turn.
+ - If the smoke eval fails, stop and fix or report the blocker before attempting the full eval.
- Run `pytest examples/evals/realtime_evals/tests -q`.
- - Confirm the Streamlit results viewer can discover runs written under the generated folder's `results/` directory.
- - If the viewer does not surface the scaffolded eval correctly, fix the viewer or scaffold before you finish.
- Inspect the generated README and at least one generated data file.
## Hard Rules
- Keep the generated folder inside `examples/evals/realtime_evals/`.
+- Ask the user for the missing setup information before scaffolding. Do not jump straight to building a default eval when the request is to create a new eval.
- Do not duplicate the main harness scripts into the generated folder.
- Do not write generic placeholder starter data when the use case provides enough context to do better.
- Use the prompt, tools, and scenario details to make the initial datapoints feel like a real user interaction.
@@ -91,7 +100,6 @@ Add flags for prompt, tools, data, graders, and run-specific fields as needed. R
- why this harness was chosen
- which files to edit first
- smoke and full run commands
- - how to inspect runs in the Streamlit results viewer
- data contract notes
- troubleshooting notes
- Prefer assistant-specific flags for run harness commands:
@@ -106,11 +114,8 @@ Treat the task as complete only when:
- `README.md`, `system_prompt.txt`, and `tools.json` exist
- harness-specific starter data exists, authored by you when the user did not provide it
- the smoke command has been run or is blocked for a clear reason
-- the format validators have been run or are blocked for a clear reason:
- - `make -C examples/evals/realtime_evals validate-input ...`
- - `make -C examples/evals/realtime_evals validate-output ...`
+- if the smoke command succeeded, the full eval command has also been run or is blocked for a clear reason
- `pytest examples/evals/realtime_evals/tests -q` has been run
-- the Streamlit results viewer can discover the scaffolded eval's `results/` directory, or the blocker is clearly documented
## Learnings
@@ -124,4 +129,5 @@ Only add items that are likely to help future realtime-eval scaffolding in this
- **`gpt-realtime` temperature is unsupported** -> Do not add a `temperature` field or CLI flag when scaffolding `gpt-realtime` evals -> Avoids invalid config and keeps runs aligned with the realtime harness constraints.
- **Starter samples should come from the model, not the scaffold script** -> Use the script to create the folder structure and template files, then have you author the initial rows or simulations from the user’s use case -> Produces more relevant starter data and makes iteration easier with the user.
-- **Bootstrap work should verify the repo viewer path end-to-end** -> After scaffolding and a smoke run, make sure `results_viewer/app.py` can see the generated folder's `results/` output -> Prevents new eval folders from working in harness CLI flows but being invisible in the review UI.
+- **Synthetic audio can be overfit to the wrong harness** -> Default unspecified synthetic-audio requests to `crawl` text-to-TTS and reserve `walk` for replay-specific audio characteristics like noise or telephony artifacts -> Keeps the bootstrap path simpler unless audio realism is the actual target.
+- **Smoke-only validation can leave scaffolds half-proven** -> After a successful smoke run, automatically run the full eval before declaring the bootstrap complete -> Catches dataset-wide or late-row failures that a one-example smoke test misses.
diff --git a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/agents/openai.yaml b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/agents/openai.yaml
index e2d169d3..0f585582 100644
--- a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/agents/openai.yaml
+++ b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/agents/openai.yaml
@@ -1,4 +1,4 @@
interface:
display_name: "Bootstrap Realtime Eval"
short_description: "Scaffold a repo-local realtime eval folder with the right harness, data, and README"
- default_prompt: "Use $bootstrap-realtime-eval to create a new realtime eval folder in this cookbook repo, choose the right harness, scaffold prompt/tools/data, and validate it with smoke and test runs."
+ default_prompt: "Use $bootstrap-realtime-eval to create a new realtime eval folder in this cookbook repo, choose the right harness, scaffold prompt/tools/data, and validate it with smoke, full eval, and test runs."
diff --git a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/references/harness-selection.md b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/references/harness-selection.md
index aa6e7a6a..3e9269b5 100644
--- a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/references/harness-selection.md
+++ b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/references/harness-selection.md
@@ -4,15 +4,16 @@ Use this table when the user is not sure which realtime eval harness to start wi
| Harness | Use when | Required starting material | Best first outcome |
| --- | --- | --- | --- |
-| `crawl` | The user wants fast iteration on single-turn behavior, tool choice, or tool args. | Text prompts. Expected tool names and args are optional if the user wants tool-call grading. | A small CSV plus smoke/full commands that run immediately. |
-| `walk` | The user cares about saved phone audio or wants more realistic audio replay. | Either a CSV with `audio_path`, or text rows that can be turned into audio. | A walk dataset plus optional audio-generation step and replay commands. |
+| `crawl` | The user wants fast iteration on single-turn behavior, tool choice, or tool args, including basic synthetic audio generated from text. | Text prompts. Expected tool names and args are optional if the user wants tool-call grading. | A small CSV plus smoke/full commands that run immediately. |
+| `walk` | The user cares about saved phone audio, wants more realistic audio replay, or needs synthetic audio with replay-specific characteristics such as noise, telephony artifacts, or speaker traits. | Either a CSV with `audio_path`, or text rows that can be turned into audio. | A walk dataset plus optional audio-generation step and replay commands. |
| `run` | The user needs multi-turn behavior, tool mocks, or conversation-level grading. | A scenario, starter user utterance, simulator prompt, tool mocks, and grader criteria. | `simulations.csv` plus one or more `sim_*.json` files. |
## Recommendation Rules
1. Recommend `crawl` by default when the user only has text rows or a rough task description.
-2. Recommend `walk` when the user already has WAV files, cares about telephony realism, or wants to validate the audio replay path.
-3. Recommend `run` only when the evaluation target depends on multiple turns, tool outputs, or conversation-level completion.
+2. Recommend `crawl` when the user asks for synthetic audio but does not mention any replay-specific audio characteristics.
+3. Recommend `walk` when the user already has WAV files, cares about telephony realism, wants to validate the audio replay path, or wants synthetic audio with specific noise or speaker characteristics.
+4. Recommend `run` only when the evaluation target depends on multiple turns, tool outputs, or conversation-level completion.
## Data Contracts
diff --git a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/bootstrap_realtime_eval.py b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/bootstrap_realtime_eval.py
index 1e5848b7..6721af58 100644
--- a/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/bootstrap_realtime_eval.py
+++ b/examples/evals/realtime_evals/skills/bootstrap-realtime-eval/scripts/bootstrap_realtime_eval.py
@@ -27,7 +27,9 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Create a realtime eval starter folder under examples/evals/realtime_evals.",
)
- parser.add_argument("--name", required=True, help="Eval name, used in the folder name.")
+ parser.add_argument(
+ "--name", required=True, help="Eval name, used in the folder name."
+ )
parser.add_argument(
"--harness",
required=True,
@@ -139,7 +141,9 @@ def write_text(path: Path, content: str) -> None:
path.write_text(content.rstrip() + "\n", encoding="utf-8")
-def copy_or_write_text(source_path: Path | None, destination_path: Path, default_text: str) -> None:
+def copy_or_write_text(
+ source_path: Path | None, destination_path: Path, default_text: str
+) -> None:
ensure_dir(destination_path.parent)
if source_path is not None:
shutil.copy2(source_path, destination_path)
@@ -208,12 +212,23 @@ def normalize_crawl_dataset(
if "user_text" not in dataframe.columns:
raise ValueError("CSV must include a user_text column for crawl or walk.")
if "example_id" not in dataframe.columns:
- dataframe.insert(0, "example_id", [f"ex_{index + 1:03d}" for index in range(len(dataframe))])
+ dataframe.insert(
+ 0,
+ "example_id",
+ [f"ex_{index + 1:03d}" for index in range(len(dataframe))],
+ )
if "gt_tool_call" not in dataframe.columns:
dataframe["gt_tool_call"] = expected_tool_name
if "gt_tool_call_arg" not in dataframe.columns:
dataframe["gt_tool_call_arg"] = expected_tool_args_json
- dataframe = dataframe.loc[:, [column for column in CRAWL_REQUIRED_COLUMNS if column in dataframe.columns]]
+ dataframe = dataframe.loc[
+ :,
+ [
+ column
+ for column in CRAWL_REQUIRED_COLUMNS
+ if column in dataframe.columns
+ ],
+ ]
ensure_dir(destination_path.parent)
dataframe.to_csv(destination_path, index=False)
@@ -262,7 +277,11 @@ def normalize_walk_dataset(
[f"ex_{index + 1:03d}" for index in range(len(dataframe))],
)
else:
- dataframe[column] = expected_tool_name if column == "gt_tool_call" else expected_tool_args_json
+ dataframe[column] = (
+ expected_tool_name
+ if column == "gt_tool_call"
+ else expected_tool_args_json
+ )
walk_csv_path = data_dir / "walk_dataset.csv"
dataframe = dataframe.loc[:, WALK_REQUIRED_COLUMNS]
dataframe.to_csv(walk_csv_path, index=False)
@@ -356,7 +375,9 @@ def normalize_run_dataset(
}
template_path = eval_dir / "data" / f"{eval_slug}_simulation_template.json"
- expected_tool_args = parse_json_object(expected_tool_args_json) if expected_tool_args_json else {}
+ expected_tool_args = (
+ parse_json_object(expected_tool_args_json) if expected_tool_args_json else {}
+ )
tool_mocks = parse_json_array(tool_mocks_json) if tool_mocks_json else []
template_simulation = {
"simulation_id": f"{eval_slug}_replace_me",
@@ -367,7 +388,8 @@ def normalize_run_dataset(
"model": "gpt-realtime",
},
"simulator": {
- "system_prompt": simulator_system_prompt or "Replace with the simulator prompt.",
+ "system_prompt": simulator_system_prompt
+ or "Replace with the simulator prompt.",
"model": "gpt-realtime",
"voice": "marin",
},
@@ -379,7 +401,8 @@ def normalize_run_dataset(
"real_time": False,
},
"turns": {
- "fixed_first_user_turn": fixed_first_user_turn or "Replace with the first user turn.",
+ "fixed_first_user_turn": fixed_first_user_turn
+ or "Replace with the first user turn.",
"max_turns": 4,
},
"tool_mocks": tool_mocks,
@@ -394,7 +417,13 @@ def normalize_run_dataset(
}
write_text(template_path, json.dumps(template_simulation, indent=2))
simulations_df = pd.DataFrame(
- columns=["simulation_id", "simulation_path", "enabled", "notes", "max_turns_override"]
+ columns=[
+ "simulation_id",
+ "simulation_path",
+ "enabled",
+ "notes",
+ "max_turns_override",
+ ]
)
simulations_df.to_csv(simulations_csv_path, index=False)
@@ -406,7 +435,9 @@ def normalize_run_dataset(
}
-def build_run_commands(harness: str, eval_dir: Path, walk_info: dict[str, Any]) -> dict[str, str]:
+def build_run_commands(
+ harness: str, eval_dir: Path, walk_info: dict[str, Any]
+) -> dict[str, str]:
results_dir = repo_relative(eval_dir / "results")
prompt_path = repo_relative(eval_dir / "system_prompt.txt")
tools_path = repo_relative(eval_dir / "tools.json")
@@ -487,15 +518,21 @@ def build_readme(
}[harness]
file_edit_lines = [
- "- `system_prompt.txt`: assistant instructions for this eval.",
- "- `tools.json`: tool schema the assistant can call.",
+ f"- `system_prompt.txt`: assistant instructions for this eval.",
+ f"- `tools.json`: tool schema the assistant can call.",
]
if harness == "run":
file_edit_lines.append("- `data/simulations.csv`: index of simulations to run.")
- file_edit_lines.append("- `data/*.json`: scenario, simulator, tool mocks, and graders.")
+ file_edit_lines.append(
+ "- `data/*.json`: scenario, simulator, tool mocks, and graders."
+ )
elif harness == "walk" and manifest["data"].get("audio_generation_required"):
- file_edit_lines.append("- `data/source_eval_dataset.csv`: source rows used to generate walk audio.")
- file_edit_lines.append("- `data/walk_dataset.csv`: generated walk dataset used by the harness.")
+ file_edit_lines.append(
+ "- `data/source_eval_dataset.csv`: source rows used to generate walk audio."
+ )
+ file_edit_lines.append(
+ "- `data/walk_dataset.csv`: generated walk dataset used by the harness."
+ )
else:
file_edit_lines.append("- `data/`: harness-specific dataset files.")
@@ -564,8 +601,16 @@ def build_readme(
)
source_notes = [
- f"- Prompt source: `{prompt_source}`" if prompt_source is not None else "- Prompt source: generated starter prompt.",
- f"- Tools source: `{tools_source}`" if tools_source is not None else "- Tools source: generated empty tools list.",
+ (
+ f"- Prompt source: `{prompt_source}`"
+ if prompt_source is not None
+ else "- Prompt source: generated starter prompt."
+ ),
+ (
+ f"- Tools source: `{tools_source}`"
+ if tools_source is not None
+ else "- Tools source: generated empty tools list."
+ ),
f"- Data source mode: `{manifest['data']['source_mode']}`.",
]
if manifest["data"]["source_mode"] == "awaiting_model_authored_starter_data":
@@ -684,16 +729,12 @@ def main() -> None:
args = parse_args()
eval_slug = slugify(args.name)
- output_dir = args.output_dir or (
- HARNESS_ROOT / f"{eval_slug}_realtime_eval"
- )
+ output_dir = args.output_dir or (HARNESS_ROOT / f"{eval_slug}_realtime_eval")
output_dir = output_dir.resolve()
try:
output_dir.relative_to(HARNESS_ROOT)
except ValueError as exc:
- raise ValueError(
- f"Output directory must live under {HARNESS_ROOT}"
- ) from exc
+ raise ValueError(f"Output directory must live under {HARNESS_ROOT}") from exc
if output_dir.exists():
if not args.force:
@@ -789,7 +830,11 @@ def main() -> None:
write_text(output_dir / "README.md", readme_text)
write_text(output_dir / "bootstrap_manifest.json", json.dumps(manifest, indent=2))
- print(json.dumps({"eval_dir": repo_relative(output_dir), "harness": args.harness}, indent=2))
+ print(
+ json.dumps(
+ {"eval_dir": repo_relative(output_dir), "harness": args.harness}, indent=2
+ )
+ )
if __name__ == "__main__":