Repository navigation
Conversation
The Extension hook form asks for the need in general terms, why the existing hooks do not cover it, a proposed shape, and whether it works when a host drives the probe. Adding a hook in CONTRIBUTING.md lists what a new hook does: it is general, keeps the current behaviour by default, is async when it can call a model, passes assert_hosted_parity, and comes with a use in the extension fixture and updates to the conformance checks, templates and docs. The feature request form and docs/extensions.md point to it. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
An extension can keep its prompts in a prompts.yaml under its assets_root and read them with get_prompt, as built-in probes do: load_prompt_file reads the file from the folder the probe's banks resolve to, a declared assets_root included. docs/extension_api.md lists both. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
A probe sets the area its conversations explore and the bounds a scorer checks, and the simulated user explores that area in the persona's own words. Step 0 of the authoring guide says so and starts its decision tree with the shapes in which the user model writes turn 1, keeping a verbatim turn for probes whose exact wording is what they test. Its step examples subclass BankBackedProbe alone where a mixin was incidental. Both bookings examples follow it: the bank names what can be booked, draw_booking picks each row's date, time and number of people, and the user model asks for the booking in its own words, with the gate checking turn 1. The BaseProbe template draws a topic per row from themes, and the template README says when a verbatim turn fits. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
templates/extension_package/ is a package to copy and rename: a probe that draws an area per row from themes.yaml and has the user explore it, its prompts in prompts.yaml read with get_prompt, a tool, a scorer, entry points, and tests wired to the pytest plugin. make check-extensions installs it next to the built wheel and runs its tests, and the public-import test scans it. docs/extensions.md and CONTRIBUTING.md point to it. Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
A probe sets the area its conversations explore and the bounds a scorer checks, and the simulated user explores that area in the persona's own words. The guides, their worked examples and the templates lead with that shape. An extension author also gets a form for asking for a hook, and a package template to start from.
Builds on #118.
.github/ISSUE_TEMPLATE/extension-hook.ymlasks for the need in general terms, why the existing hooks do not cover it, a proposed shape, and whether it works when a host drives the probe. "Adding a hook" inCONTRIBUTING.mdlists what a new hook does: it is general, keeps today's behaviour by default, isasync defwhen it can call a model, passesassert_hosted_parity, and comes with a use in the extension fixture and updates to the conformance checks, templates and docs. The feature request form anddocs/extensions.mdpoint to it.get_promptandload_prompt_filejoinusersim.extension, so an extension can keep its prompts in aprompts.yamlunder itsassets_root, as built-in probes do.docs/extension_api.mdlists both.docs/engine/AUTHORING_A_PROBE.mdstates the principle, and its decision tree starts with the shapes in which the user model writes turn 1. A verbatim turn 1 is kept for probes whose exact wording is what they test, such as a false premise or a matched pair. The step examples subclassBankBackedProbealone where a mixin was incidental.bookingsworked examples follow it. The bank names what can be booked,draw_bookingpicks each row's date, time and number of people, and the user model asks for the booking in its own words, with the gate checking turn 1 like every user turn. Each drawn date has a day and a month that are different numbers no greater than 12, so it reads as another date in the other order. The scorer is unchanged.templates/probe/generator_baseprobe_only.pydraws a topic per row fromthemes, andtemplates/probe/README.mdsays when a verbatim turn fits.templates/extension_package/is a package to copy and rename: a probe that draws an area per row fromthemes.yamland has the user explore it, its prompts inprompts.yamlread withget_prompt, a tool, a scorer, entry points, and tests wired to the pytest plugin.make check-extensionsinstalls it next to the built wheel and runs its tests, and the public-import test scans it.docs/extensions.mdandCONTRIBUTING.mdpoint to it.How it was verified
At each commit, on that commit's tree:
The test count is 4652 at every commit; the template's own tests run in
make check-extensions, below.At the head:
make check-extensionsruns the template's tests against the installed wheel:The code blocks of both
bookingsexamples are the files that ran. The extension package's six tests pass as an outside project. The in-tree probe, installed in an exported tree with the guide's other files, passesprobe_conformance_problems, runs inen_USandpt_BRwithrun_episode, passesassert_hosted_parity, andusersim smokechecks its assets with the other probes:The
my-bookingspackage ran live against a custom provider config, two rows each inen_USandpt_BR, thenusersim eval --scorers auto. Each simulated user wrote its own opening for the drawn booking, every model's requests showfailed=0, and every row was scored:Results impact
None. No shipped probe, prompt, asset or scorer changes; the two exported helpers are the functions built-in probes already call.