Repository navigation
docs: evals cover scripted and simulated scenarios - #1259
Conversation
|
🔍 Mintlify preview for this branch: https://daily-aleix-evals-simulated-scenarios.mintlify.site |
pipecat main deprecated pipecat.evals.harness in 1.9.0 and re-exports EvalSession through a star import, which the import checker cannot resolve. Point the library page at the module that defines it, and drop the unused EvalTurnProgress import. A fuller rewrite for the renamed script/simulation API lands in #1259. Claude-Session: https://claude.ai/code/session_013Y5KvVSbnLLMWmMk41duMr
31cf3c8 to
2e2acb4
Compare
Simulations landed in pipecat (#5646): a scenario with a persona: and a goal: hands the user's side to an LLM, and a judge decides success and scores per-reply metrics. The Evals section now explains the two kinds. - Overview leads with both kinds, adds the kind x modality grid, and repositions third-party platforms around deployed paths and scale. - Writing Scenarios becomes Scripted Scenarios (redirect kept), beside a new Simulated Scenarios page: persona, goal, simulator, success, judged and measured metrics with a table of the built-in measures, function_calls, caps, runs, endings, output, and authoring advice. - Quickstart ends with a simulated caller; Lifecycle no longer calls simulations out of scope; Suites covers mixed manifests, -k, runs vs --repeat, and the results.jsonl record; the Library page moves to the 1.9.0 names with a migration table; the Eval Loop and CLI reference pick up simulations, -k, and .env loading.
The user: and judge: blocks, factory:, !include, back-to-back runs, and the disconnect path apply to scripted and simulated scenarios alike, so they move from the scripted page to Scenario Configuration. The scripted page keeps the two fields only it has, context: and stop_on_failure:, and both kinds link to the new page.
Follows pipecat #5676: EvalSession is the base of both session kinds and builds either from a loaded scenario, and how a run behaves is one EvalSessionParams. The kind-specific from_scenario() calls stay as the typed alternative, the run knobs move to a params table, and the migration table drops the EvalSession rename.
Follows pipecat #5676's follow-ups: min_quality is min_score, the persona runs on the local Ollama judge model unless a simulator: block says otherwise, service: openai and service: cartesia give way to a factory: that takes the block alone, a run ends as silence after max_silence_s, and results tell judge trouble from bot trouble with a verdict of none, a metric kind, and a judge_no_verdict error on the goal.
006f849 to
d1f9a89
Compare
ff9121b to
16f9143
Compare
| - A judge LLM. Either: | ||
| - **Ollama** (local, the default): install [Ollama](https://ollama.com) and run `ollama pull gemma4:12b`, or | ||
| - **OpenAI**: set `OPENAI_API_KEY` and point the scenario's `judge:` block at it (shown below). | ||
| - **OpenAI**: set `OPENAI_API_KEY` and point the scenario's `judge:` block at it through a small factory (shown below). |
There was a problem hiding this comment.
For a quickstart, does it make sense to set up a factory or just use the default service to simulate turns?
That said, it is nice to teach the factory option to provide your own. No strong preference.
There was a problem hiding this comment.
I have removed OpenAI. It's deprecated now, you can still use the factory function.
| | `turns` | The persona's turns in the conversation. A reply that only calls `end_call` is not a turn. | count | | ||
| | `duration` | The conversation's length, from its first line to the hang-up. | seconds | | ||
| | `words` | The longest agent reply. Bounds every reply. | words | | ||
| | `latency` | The slowest agent reply. In text mode, from the persona's send to the reply's first LLM token; in audio mode, from the agent noticing the persona stop speaking to its first spoken sentence. Bounds every reply. | seconds | |
There was a problem hiding this comment.
I think in text mode, latency isn't relevant, right?
There was a problem hiding this comment.
It still measures time to first token. I've updated the description.
| `EvalManifest.load()` accepts keyword overrides for every manifest value (`concurrency`, `base_port`, `spawn`, `scenarios_dir`, and so on), mirroring the CLI flags. | ||
| `EvalManifest.load()` accepts keyword overrides for every manifest value (`concurrency`, `base_port`, `spawn`, `scenarios_dir`, `repeat`, and so on), mirroring the CLI flags. | ||
|
|
||
| ## Migrating from 1.8 |
| - **Actionable failures.** Failures name the turn, the expectation, and the reason, including what the judge said. The `.eval.log` decision trace shows every event the harness observed, so "why did this fail" is answerable from files. | ||
| - **Suites are self-contained.** `pipecat eval suite` spawns the agents itself, so an autonomous loop doesn't need to manage processes: edit, run one command, read the result. | ||
| - **Text mode is fast and cheap.** Iterating on prompts and logic skips STT and TTS entirely, so an assistant can afford to run the evals after every change. | ||
| - **Simulations find, scripts pin.** A failing simulation shows where the agent lost the caller, with the conversation printed under `-v`. The assistant reproduces that exchange as a scripted scenario, fixes against it, and keeps both. |
There was a problem hiding this comment.
Claude keeps using this phrase of "scripts pin", but it seems a bit weird. Maybe we can find a better way to say it. It's used here and in a few other places.
There was a problem hiding this comment.
Yeah, that is actually wrong. Simplified.
markbackman
left a comment
There was a problem hiding this comment.
LGTM! Nice improvement. Just a few minor things.
… judge is a default
Summary
Simulations landed in pipecat (#5646): a scenario with a
persona:and agoal:hands the user's side to an LLM, and a judge decidessuccess:and scores per-replymetrics:. The Evals section now explains the two kinds of scenario, scripted and simulated./pipecat/evals/scripted-scenarios, redirect from the old path) beside a new Simulated Scenarios page: persona and goal, thesimulator:block, modalities, thesuccess:criterion and what the judge sees, judged metrics with the per-reply yes/no rule, a table of the built-in measures,function_callsandcalls: [], caps andruns:, how a run ends, sample output, and authoring advice.-k,runs:as a requirement versus--repeatas a measurement, the simulation record inresults.jsonl, and per-run subprocesses.EvalScriptSession,EvalSimulationSession,load_scenario_file,persona_llm=,user_tts=/bot_stt=) with a migration table for the deprecated ones.-k, the new--repeatsemantics, and.envloading.The pipecat
AGENTS.mdtemplate was aligned to the new page titles in pipecat-ai/pipecat branchaleix/flows-hello-world-greeting.Checks
node scripts/check-imports.mjsresolves every import against pipecatmain(daf5902d9).npx mint broken-links --check-anchors --check-redirects: no broken links.node scripts/docs-meta-lint.mjs: no errors;llms.txtandllms-full.txtregenerated.