Skip to main content
Search

# Structured outputs

2 related articles

Subscribe to updates
  1. OpenRouter Blog

    OpenRouter tests three routes to structured LLM output: 209 of 216 replies met a strict schema, and all 7 misses came from one provider that ignores it

    OpenRouter compared three ways to get reliable JSON out of models, using 24 messy support messages across nine models that support structured outputs: send a strict JSON Schema, force a single tool call, or switch to a decision model that only returns labels. Across the nine models, 209 of 216 replies matched a strict schema, and all 7 misses came from one provider that ignores the schema; asking for JSON only in the prompt produced 18 failures, each from a code fence. For GLM 5.3 FlashX, which only supports tools, forcing the tool call gave 22 valid outputs out of 24, against 0 when the schema was sent directly.

  2. arXiv

    FactorSpec turns relational constraints into speculative drafts, accepting up to 10.5 tokens per verify step while every record stays valid

    In structured output, relations among a record's fields could determine many tokens, yet serving engines draft from the prompt or a learned head and grammar masks enforce only syntax, so models often violate those relations. FactorSpec compiles a JSON Schema and its relations into a factor graph, treats tokens the constraint uniquely determines as certain drafts through an exact feasibility check, and picks a verify width per request. In SGLang its drafts accept up to 10.5 tokens per verify step on trip planning, up to 1.9 those of the fastest n-gram drafter shape, and decode up to 1.43 faster than speculators tuned per load, at a grammar mask's cost.

You’re all caught up