TRANSMISSION // 2611.27106v1

A valid JSON answer can still be wrong

Source published

A benchmark of six Python implementations finds that schema compliance and task correctness are distinct—and that results vary by task and tested setup.

AI-generated conceptual illustration for A valid JSON answer can still be wrong
AI-generated conceptual illustration; not documentary evidence.

When an AI returns a neatly formatted record, query or policy answer, does that mean it got the task right? A benchmark study says those are separate questions. Its comparison of six Python implementation setups found substantial differences in schema validity and automated task scores. The results apply to a particular model, package configuration and test suite—not to frameworks in general.

A tidy answer is not necessarily a correct one

A language model can return an object that fits a required format and still get its contents wrong. An invoice record might omit a charge; a policy answer might include an unsupported claim; a SQL query might run but return the wrong results. Checking that an answer can be parsed is useful, but it is not the same as checking whether it does the job.

That distinction is the focus of a benchmark paper by Sidney Shapiro and colleagues. The researchers propose measuring structural validity—whether a response meets a specified schema—separately from task-specific quality. They compare six Python implementation setups for connecting a language model to those requirements: PydanticAI, LangGraph, DSPy, CrewAI, Agno and a framework-free software development kit (SDK) reference.

The practical questions are whether these implementation paths behave alike under a shared evaluation setup, and whether schema compliance tells us that a task was completed correctly.

Five tasks, two kinds of checks

The benchmark covers five business tasks using synthetic task data: extracting information, generating SQL, summarizing reports, answering compliance questions and making workflow decisions. The confirmatory evaluation used GPT-4o-mini, matched task inputs, schemas and model settings, and a common scoring process. The authors report 5,400 execution rows, with distinct task instances and three nested replicates. Those rows are not 5,400 independent tasks: the paper identifies distinct instances as the effective sample for comparisons.

After each implementation returned an output, the researchers independently checked its schema at a shared benchmark boundary. Separate task scorers assessed measures such as whether extracted fields matched, SQL results were correct, or compliance answers and citations were supported, with a penalty for unsupported claims. These automated checks do not amount to a comprehensive human assessment of whether every claim is grounded. The eligible run also records observed provider-call counts.

The paper reports that its analysis plan was frozen before the confirmatory run, and describes planned comparisons against the SDK reference. This design matters because a library’s own report that an output succeeded need not mean it passed an independent check—or that it was right for its intended task.

Different setups, different results

Across the confirmatory run, overall schema validity was 0.684 and mean automated quality was 0.638. PydanticAI and LangGraph each had 100% schema validity in this configuration, with mean quality scores of 0.935 and 0.940. DSPy was nearly as strong on these measures: 99.8% schema validity and a 0.911 mean quality score. The plain SDK and Agno each had 38.8% overall schema validity, with mean quality scores of 0.367 and 0.365. CrewAI had 32.8% overall schema validity and a 0.308 mean quality score; its workflow-task schema-validity rate was zero in this run.

These results describe the tested implementation conditions, not a universal ranking of the libraries. The authors caution that the comparison does not show that advertised features caused the differences. The main comparison used a lowest-common-denominator structured-output setup; it did not activate every library’s distinctive capabilities.

The other key finding is that valid structure did not guarantee a high task score. The authors counted many schema-valid rows below their automated quality threshold, particularly in extraction and compliance question answering. Summarization had fewer such flags and the highest mean task score among the task families. Performance also varied by task and implementation: weaknesses were concentrated in some combinations rather than appearing as a uniform drop across all tasks.

A flag is not, by itself, proof of a meaningful factual error. The paper labels these cases as candidates for review and says blinded human adjudication of its audit packet remains incomplete. Automated scores reveal a mismatch worth investigating; they do not establish a human-verified semantic error rate.

What the benchmark can—and cannot—tell us

The study’s takeaway is not that one framework is best for every team. Reliability has multiple layers: a provider may constrain output format, application code may validate it, and task-specific evaluation may assess whether its contents are appropriate. Those checks answer different questions. As an implication for practice—not a real-world outcome tested by this benchmark—a schema check alone should not be treated as sufficient reason to write an answer into a business system.

The limits are substantial. The task data are synthetic; the confirmatory run uses one model family and a particular set of package and adapter versions. Results may change with different models, versions, prompts, tasks or deployment conditions. The primary comparison does not test long-running agents or establish security against prompt injection, data leakage or unsafe permissions. Some feature-focused ablations are small pilots, and broader mechanism attribution remains open. The authors provide a public executable artifact, but note that cloning the code alone does not provide the specific archived live-result bundle needed to replay these results.

The manuscript is an arXiv preprint, not evidence of peer review. Its protocol and reported results make it a testable case study, but they should be read as configuration-specific findings, not as certification of any tool for production. For builders, the practical lesson is straightforward: check an output’s shape and evaluate the task separately.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • Why AI-agent evaluations need more than a good answer

    Supporting evidence: Both studies report that passing a structural or syntactic check does not ensure task correctness: the origin study reports task-score flags among schema-valid outputs, and Zhang et al. describe syntactically valid but semantically wrong SQL. This supports that limited point, not a direct comparison of rates; the tasks and evaluation designs differ.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.27106v1 — Original paper

      Excerpt reference: static/papers/2611.27106v1.md:13-48
      Basis: Paper text
      Source SHA-256: 97eb96dc042813c09962bcb96e00c92b637d7102b76f13e805de16de17ca2d63

    • 2611.14493v1 — Original paper

      Excerpt reference: static/papers/2611.14493v1.md:13-128
      Basis: Paper text
      Source SHA-256: 8d6cd2b149d7f8c72d7a03014fd6211cbe526d50f25b0fbb41e819c3da1cbf64

  • An AI can match a financial answer while using the wrong history

    Supporting evidence: The origin study reports task-score flags among schema-valid outputs; BuySideFlow reports confirmed point-in-time violations in 193 of 380 audited runs that passed result checks. Together, these findings support the bounded point that passing one check does not establish correctness on other task-relevant dimensions. The benchmarks, populations, and checks differ, so their rates are not directly comparable.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.27106v1 — Original paper

      Excerpt reference: static/papers/2611.27106v1.md:13-48
      Basis: Paper text
      Source SHA-256: 97eb96dc042813c09962bcb96e00c92b637d7102b76f13e805de16de17ca2d63

    • 2611.12966v1 — Original paper

      Excerpt reference: static/papers/2611.12966v1.md:148-200
      Basis: Paper text
      Source SHA-256: 5d1b0aa70d842acebb88a1d40c738c5dddd1a0bd51e5800b994b73b31c38b328

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.