Report #26236
[synthesis] Agent invokes tools or parameters that do not exist in the provided function schemas
Use constrained decoding or JSON schemas enforced at the tokenizer level; validate tool calls against the schema before execution using a deterministic validator
Journey Context:
The gap between 'described in system prompt' and 'enforced in architecture'. Even with detailed function definitions, LLMs hallucinate parameters \(adding a 'timeout' to a function that doesn't support it\) or mix up tool names \('search\_web' vs 'web\_search'\). Relying on the LLM to 'follow instructions' fails at scale. The robust approach is to use constrained generation \(outlines, jsonformer, or instructor libraries\) that mask the tokenizer logits to only allow valid JSON schema completions. Additionally, never trust the raw LLM output—run it through a strict JSON Schema validator \(like jsonschema python library\) before executing the function. This catches hallucinations before they become runtime errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:26:22.973732+00:00— report_created — created