Skip to content

v0.3.2

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Nov 18:54
· 34 commits to main since this release
Immutable release. Only release title and notes can be modified.
c91d9b2

Summary

usersim 0.3.2 is a patch release. Tool-calling conversations come much closer to real use: every simulated tool response is checked before the assistant sees it, the simulated services answer as real ones do, and the assistant is judged on whether its replies match what its tools returned. The simulated user keeps to its locale's language in every locale, and identity_disclosure gains openings and stricter grading. Nothing in it asks you to change how you run User Sim or your extension code, but tool_calling, identity_disclosure and evaluator results move.

Highlights

For everyone running User Sim

  • Simulated tool responses are judged. Before the assistant sees a simulated response, a judge checks that it answers the call, agrees with the earlier responses, computes values correctly and holds no placeholders, and a rejected one is rewritten. A response still rejected after max_response_attempts (default 2) stands, and the row carries an unverified_tool_response warning. A models file can name an api_response_judge_model alias to run these checks on a model of their own; without it, judge_model runs them. --probe-option tool_calling.judge_responses=false turns the checks off.
  • The simulated services answer as real ones do. The simulator sees what a service would see: the call, the earlier calls with their responses, and its clock, never the conversation. It writes compact JSON with links on the service's own domain and realistic page sizes, and keeps to what it returned before. Its clock moves with the conversation, so a live score or a job's progress can move between turns, while schedules and listings for later dates exist. A tool that takes a tracking, order or booking number knows the user's name and town; any other tool knows nothing about the user. The bundled models file gives api_response_model 16384 tokens.
  • Tool-calling conversations open and run like real use. A conversation is offered its whole toolset up to max_tools, now 15 by default, and opens with a request the offered tools can do. The assistant sees the date and where the user is on the first message (share_user_context, on by default), and the date is a setting, today. The simulated user sees when the assistant used its tools, and hands over what the assistant asks for, written as a real one.
  • Replies are judged against their tool results. The per-turn assistant judge reads the turn's tool calls and results. It fails a reply that states a result no tool returned, claims an action no call performed, or says it can't do what one of its tools does; n_assistant_ungrounded counts these. tool_calling resamples a rejected turn when --max-assistant-attempts is above 1, and undoes the rejected turn's tool calls completely.
  • The evaluator reads whole tool results and scores grounding. Its judges read each tool result up to 24,000 characters, and the tool_use scorer gains a grounding axis, which counts toward tool_use_correctness.
  • A run can switch off the per-turn assistant judge. usersim simulate --no-assistant-judge saves a judge call per turn for runs scored afterwards. It can't be combined with --max-assistant-attempts above 1.
  • The simulated user writes in its locale's language. The user-turn gate checks the language in every locale, not only the script, and English-locale users are told to write English. A user asking for a translation or a correction can still quote the text in question.
  • identity_disclosure adds lineage, structured-output and multiple-choice openings (spec bank 1.7.0), records what each user turn claims in identity_premises, and grades with strict, versioned extraction (extraction_prompt_version).

For extension authors

  • New exports. usersim.extension exports run_inline_judge and run_inline_judge_ex, for a probe that checks something with a judge inline, and persona_location, the place a persona's prompt states.
  • New optional probe hooks. user_context returns a line the assistant's app attaches to the first user message, such as the date and the user's place. snapshot_turn_state and restore_turn_state keep the state a probe holds on itself, so a resampled turn can be undone; assert_probe_conforms reports a probe that overrides one without the other. UserTurnPolicy.show_tool_use shows the simulated user that a reply followed tool use.
  • Resampling works for probes that run tools. A rejected turn is undone completely: its messages, metadata, counters, warnings and traces. docs/engine/AUTHORING_A_PROBE.md describes the hooks.

Upgrading

No changes needed. Run pip install -U usersim, or uv add "usersim>=0.3.2" in a uv project.

  • Results move. tool_calling rows get new trajectory ids under prompt version v1.11, identity_disclosure rows draw from spec bank 1.7.0, and stored evaluations are judged again under the evaluator's prompt version v1.3. Compare scores within one version.
  • Optional: add an api_response_judge_model alias to a custom models file to run tool_calling's response checks on a model of their own.

If your extension uses user_context, snapshot_turn_state, restore_turn_state, show_tool_use, run_inline_judge, run_inline_judge_ex or persona_location, require usersim>=0.3.2,<0.4.