When JSON Is Not Enough: Semantic Reliability of Schema-Constrained LLM Ordering Agents
Abstract
LLM agents are increasingly used as transaction compilers: a user states an intent in natural language, and the model emits a structured object that an API can execute. JSON Schema and provider-level structured-output modes are useful because they remove a large class of parse failures, but they do not by themselves decide whether the object is a safe, faithful transaction. We introduce OrderBench, a deterministic benchmark for restaurant ordering agents that separates syntactic validity, schema validity, status decisions, exact item semantics, constraint preservation, and unsafe acceptances. Across 2,400 Nebius Token Factory calls to four open models in prompt-only and JSON-schema modes, we find that schema-valid output can still have large semantic error rates. In the strongest model, both modes achieve 100% schema validity, yet semantic success remains near 80%; in weaker models, schema-valid unsafe acceptances occur in double digits. The result is a concrete engineering warning: structured output is a necessary interface layer, not a substitute for domain verification and fail-closed execution.
Create a lesson
Metadata
- Comments
- 7 pages, 6 tables
Related papers
STRIDE: A Self-Reflective Agent Framework for Reliable Automatic Equation Discovery
Shared title terminologycs.AIJiarui Su, Songjun Tu, Bei Sun et al.
Episodic-Semantic Memory Architecture for Long-Horizon Scientific Agents
Shared title terminologycs.AINikola Milosevic
REE: A Scientific Research Entrance Exam for AI Agents
Shared title terminologycs.AIZeqi Zhou, Minghao Liu, Jiarui Liu et al.
ZeroHero: Training Small Language Agents from Scratch
Shared title terminologycs.AINikita Sorokin, Zoya Volovikova, Alexey Skrynnik et al.
EgoUseBench: Benchmarking Computer-Use Agents under Evolving First-Person Contexts
Shared title terminologycs.AIYurun Chen, Biao Yi, Qihang Yu et al.
vSFT: Learning to Verbally Tune Agents at Test Time
Shared title terminologycs.AIQishuai Wen, Rui Chen, Haiwen Li et al.