Repository navigation
feat(user sim): files in the first message, and a rating step after the run - #681
Open
sarah-chitty-1 wants to merge 13 commits into
Open
sarah-chitty-1 wants to merge 13 commits into
sarah-chitty-1 wants to merge 13 commits into
Conversation
…for a 1-5 rating after the last read (FD-5491) A description's satisfaction lines go in the prompt as S1... A user sim with them rates the run once it's over, recorded in metadata["user_sim_satisfaction"][step_id], never delivered; without them nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ended, recorded like always_on's (FD-5491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, in always_on and prompt_agent (FD-5491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (FD-5491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
deploy_user_sim_agent's opening_prompt also takes a list of text and file parts, in prompt_agent's parts format; a plain string works as before. A file part may carry a one-line metadata.description for the user sim, which can't open files. The parts are checked when the task loads. - always_on sends the parts on the first wake in order: the joined text as the user's labelled line, each file in its place, without the description; the graded conversation's first user turn has the files. - The user sim's prompt and first read say what it attached: "(you attached itinerary.pdf: Mom and Dad's flight itinerary)", or the file name alone with no description. Text-only openings are byte-identical. - prompt_agent with the built-in user sim compares the files too: the same files in the same order after seeding, and its error names both lists. - Files go through the same sharing and seed filling as any prompt file part (apply_seed, lifted out of PromptAgentTaskStep._apply_seed, which now calls it). - The record keeps "opening" as the text, so text readers are unchanged, and adds "opening_parts" (as written) for an opening given as parts. The training harness's first prompt is the opening's text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atisfaction; always_on and prompt_agent no longer rate (FD-5491) The satisfaction lines move from the persona to the new step, so the user sim's system prompt never has them and the run behaves as tested. The step runs after the always_on or prompt_agent step it rates and asks the user sim once, in the session the run used, with what the user never read; a malformed answer gets one retry. The rating is recorded at metadata["user_sim_satisfaction"][run step id] and sent nowhere. always_on and prompt_agent are as they were before the first build, apart from the opening-files work, and always_on's record now names its user sim session (user_sim.context_id), which the step asks in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt, its load checks, and no S lines in the prompt (FD-5491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tep's (FD-5491) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tty/fd-5491-satisfaction-step
…ser sim's file descriptions - rate_user_satisfaction: a failed_steps entry marked retried is a failure a retry recovered from, so it no longer skips the rating. - prompt_agent with the built-in user sim: file parts copied from the opening_prompt are sent and stored without metadata.description, as always_on sends them; the user sim still gets the descriptions from its record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e; the opening wake names its files; runs record each tag's line
- An opening with files adds one line under the "(you attached …)" note in W2: the user sim remembers only what's
said of each file, not its contents, and says so or points the assistant to the file. Text-only openings are
byte-identical (the golden prompt tests are untouched).
- always_on's timeline wake event records the files it carries, by name and uri, never their descriptions.
- deploy_user_sim_agent records tagged_lines ({"W1": ..., "D9": ...}) in metadata["user_sims"][name], so an answer's
`used` resolves against the lines that run's user sim saw after a persona is reordered; rate_user_satisfaction
records its S-tag map with the rating.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d (T) and things the assistant should already know (C) From the hand-written user sim template's standing_knowledge and assumed_context. Asked again for something already told, the user sim reminds the assistant, a little annoyed, and gives it again; it never brings up what the assistant should already know, and corrects it briefly when it gets one wrong. Both are validated like the other sections; a persona without them renders as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Additions to the built-in user sim (
deploy_user_sim_agent):rate_user_satisfaction, asks the user sim to rate the outcome once the run is over (FD-5491, Anisha's rubric A5);already_toldandshould_already_know(from Anisha's task ideas);tagged_linesmap in the record, so every tag in the user sim'susedresolves to its line.Tasks that use none of these are unchanged, byte for byte: the golden tests that pin the user sim's prompt and reads pass untouched.
Files in the first message (FD-5494)
opening_prompttakes a string, as before, or a list of text and file parts, the same shape asprompt_agent'sparts. Any file type. A file part may carry a one-linemetadata.descriptionfor the user sim.(you attached itinerary.pdf: Mom and Dad's flight itinerary), or just the name. One more line says it knows only that description, not what's in the file; asked about the contents, it says it doesn't remember or points the assistant to the file.files: [{name, uri}]).uriandname. Sharing goes through the usual path.openingas the joined text and addsopening_parts; training's_first_promptuses the joined text.The rating step (FD-5491)
rate_user_satisfactionruns after an always_on or prompt_agent run and sends the user sim one private message in the same session, so it remembers the run. The message has:any agent messages it hadn't read yet;
the task's satisfaction lines ("HOW YOU'D RATE THE JOB", tagged S1…);
a 1–5 ask: 5 perfect, 3 fine, 1 "you'd have done it yourself". It adds "Something you were never told was done doesn't count as done."
The satisfaction lines live on the rating step, never in the persona, so the user sim doesn't see them during the run and the run behaves as tested.
The rating goes to
metadata["user_sim_satisfaction"][<run step id>], with the full ask in the object store. It never reaches the agent, the graded conversation orverifications.A run that ended in an error isn't rated;
skippedrecords why. A failed rating never fails the task (fail_task_on_errorfalse).The step is refused at load if it has no run step, several and no
run_step_id, a user that isn't a built-in user sim, or bad lines.One always_on change: its record now keeps the user sim's session id (
user_sim.context_id), so the step can continue that session.Two optional persona sections
Both go in
description, afterwhat_you_know, each line tagged like the others:already_toldshould_already_knowEach
should_already_knowfact must also be in the assistant's own instructions or data, or the task is unfair.tagged_linesThe record at
metadata["user_sims"][name]now hastagged_lines: each tag the prompt shows with its line as written ({"W1": "...", "D9": "..."}). An answer'susedtags resolve through it, so they stay readable when sections are added or reordered. The rating step records its own S tags the same way.Tests
test_user_sim_opening_files.py(26) andtest_user_sim_satisfaction.py(50), plus one inharness_test.py.tst/unit/task_step,task/episode,trainingandcli: 3,824 passed; the twotest_mcp_cli_buildertests that needclickwere deselected. No paid runs yet. The rating's wording gets a small replay test (good / fine / bad outcomes against Sarah's own ratings) before tasks use it.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; both earlier findings are fixed and no new blocking issue remains.Summary
Adds opening-message files, a private rating step after a run, optional persona sections, and recorded tag-to-line maps.
Reviews (10) · Last reviewed commit: "feat(user_sim): two optional description..." · Reviewed by Greptile