Skip to content

Cut Step 7 workload, fix 512-char descriptions, stop the interrogation - #29

Merged
Pierre Malarme (pmalarme) merged 1 commit into
mainfrom
pmalarme-simplify-step-7-and-prompts
Aug 18, 2026
Merged

Cut Step 7 workload, fix 512-char descriptions, stop the interrogation#29
Pierre Malarme (pmalarme) merged 1 commit into
mainfrom
pmalarme-simplify-step-7-and-prompts

Conversation

@pmalarme

Copy link
Copy Markdown
Collaborator

Why

Three problems surfaced while running Step 7 end to end:

  1. Step 7 was too much work. coordinator.py shipped as a near-empty scaffold, so participants had to write ~310 lines before anything ran.
  2. Deploying Step 7 failed with 400 invalid_payload"String length 568 exceeds maximum 512" on description.
  3. The deployed agent interrogated the traveler instead of planning: asked for a Tokyo trip, it came back with "what are your dates, how many travelers, which cabin class?" — and asked again after being answered.

What changed

1. Step 7 workload cut to one TODO

.workshop/step_files/07/coordinator.py now ships almost complete — the instruction constants, the Step 5 RAG provider, the Step 6 skills provider and trusted script runner, the manager Coordinator, and the GroupChatBuilder graph are all wired. One TODO remains: add HotelsSpecialist and ActivitiesSpecialist, with FlightsSpecialist delivered as the worked example. Capability slicing is still the lesson; the boilerplate isn't.

The step doc gets a slice → Agent(...) mapping table (each row labelled with its source file — role fields come from agent.yaml, capabilities from agent.manifest.yaml) and now gives main.py verbatim.

2. The 512-character description cap

Foundry caps agent description at 512 chars, and YAML folded scalars (>) add a trailing newline. Solutions 06, 07 and 09 measured 515, 568 and 500 — now 413, 416 and 393. Added a callout in Step 7 §4 and troubleshooting entries in Steps 6 and 7 so the next person recognises the error.

3. Prompts that plan instead of interrogate

  • COORDINATOR_INSTRUCTIONS gains a "Plan first, ask almost never" section.
  • Every specialist gains a never stop to ask — assume the obvious default and label it as an assumption boundary.
  • Defaults are self-contained, so Hotels and Activities still work when Flights hasn't run — a hotel-only request in Step 7, and the concurrent GatherPreferences node in Steps 8–9.
  • Flights searches and prices both legs; the trip-length default is three nights everywhere (Activities previously said "three days").
  • Departure city has no sensible default, so specialists report it missing rather than inventing one, and only the Coordinator may close with that single question — after delivering the plan it could build.

Applied across all 12 prompt locations: the coordinator.py constants in step_files/07 and solutions 07/08/09, plus the agents/*/agent.yaml slices in each (keeping the intended group-chat vs workflow wording variants).

Also removed the unused logging import and logger from the four coordinator.py files.

Validation

  • python .workshop/scripts/lint_steps.py0 failures, 2 pre-existing warnings
  • python -m pytest .workshop/scripts/tests -q154 passed
  • All four coordinator.py files compile; every agent*.yaml parses
  • Five rubber-duck review rounds, ending with no findings

Review notes

Docs, solutions and step files are kept in sync per the authoring rules. No new environment variables, no secrets, no auth changes — everything stays keyless via DefaultAzureCredential.

Three fixes to the Step 7 (multi-agent) experience, plus the prompt and
manifest problems it exposed downstream.

1. Step 7 asked participants to write ~310 lines of coordinator.py. The
   starter file now ships almost complete — the instruction constants, the
   Step 5 RAG provider, the Step 6 skills provider and trusted script
   runner, the manager Coordinator and the GroupChatBuilder graph are all
   wired — leaving one TODO: add HotelsSpecialist and ActivitiesSpecialist,
   with FlightsSpecialist delivered as the worked example. The step doc
   gains a slice -> Agent(...) mapping table (labelled with each field's
   source file) and now gives main.py verbatim.

2. Deploying Step 7 failed with 400 invalid_payload — Foundry caps agent
   description at 512 chars and the folded scalars in solutions 06, 07 and
   09 measured 515, 568 and 500. Shortened to 413, 416 and 393, with a
   callout in Step 7 and troubleshooting entries in Steps 6 and 7.

3. The deployed agent interrogated the traveler ("what dates? how many
   travelers? which cabin class?") instead of planning. The Coordinator
   gains a "Plan first, ask almost never" section and every specialist a
   "never stop to ask — assume the obvious default and label it" boundary,
   with self-contained defaults so Hotels and Activities work when Flights
   hasn't run (Step 7 hotel-only requests, and the concurrent workflow in
   Steps 8-9). Flights searches and prices both legs; the trip-length
   default is three nights everywhere. Departure city has no sensible
   default, so specialists report it missing and only the Coordinator may
   close with that one question, after delivering the plan. Applied across
   all 12 prompt locations (coordinator.py x4 and the agents/*/agent.yaml
   slices).

Also removed the unused logger from the four coordinator.py files.

lint_steps.py: 0 failures. pytest: 154 passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: eff02da0-9879-4ce8-b4ec-d7626c2d1073
Comment thread .workshop/step_files/07/coordinator.py
@pmalarme
Pierre Malarme (pmalarme) merged commit bf12d4e into main Aug 18, 2026
9 checks passed
@pmalarme
Pierre Malarme (pmalarme) deleted the pmalarme-simplify-step-7-and-prompts branch August 18, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant