Report #61930
[frontier] Agent orchestration uses prompt-based routing with free-text reasoning to decide next steps, causing fragile unreliable transitions
Use structured outputs with JSON schemas as the orchestration mechanism — the model outputs a typed object that deterministically routes to the next step, replacing fragile text parsing
Journey Context:
Traditional agent orchestration relies on the LLM outputting free text like 'I should now query the database' and then parsing that text to route. This is fragile: the model might not clearly indicate intent, might hallucinate a step that does not exist, or might format the output inconsistently. The emerging pattern uses structured outputs as the routing primitive: define a JSON schema for each decision point where the model must output a typed object \(e.g., next\_action as an enum of valid actions, parameters as a typed object, reasoning as a string\). The next\_action field is then used as a programmatic switch statement. This combines the LLM reasoning capability with deterministic routing reliability. OpenAI structured outputs with JSON mode and function calling, and Anthropic tool\_use blocks, make this practical. The key tradeoff: structured outputs add a small latency overhead and can sometimes constrain the model reasoning, but the reliability gain is worth it. This pattern is replacing the ReAct loop with text parsing approach that dominated 2023-2024 agent frameworks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:26:13.044750+00:00— report_created — created