展示 HN:一个用于测试 LLM 是否产生确定性输出的新基准。
Show HN: A new benchmark for testing LLMs for deterministic outputs

原始链接: https://interfaze.ai/blog/introducing-structured-output-benchmark

## 结构化输出基准 (SOB) 总结 大型语言模型 (LLM) 越来越多地用于从各种来源(发票、记录、抄本、PDF)提取结构化数据。然而,目前的基准主要关注*模式合规性*——输出是否为有效的 JSON——并且未能充分评估*数值准确性*——结构*内部*的数据是否正确。这可能导致下游系统出现静默错误。 SOB 是一个新的基准,旨在解决这一差距。它使用七个指标评估来自文本、图像和音频来源的结构化输出,其中**数值准确性**是主要关注点。它使用人工验证的真实数据与 JSON 模式配对,以识别幻觉和不准确之处。 主要发现表明存在显著差距:模型始终能实现较高的 JSON 通过率(95% 以上),但数值准确性较低(通常低 15-30 个百分点)。模型大小并非性能的可靠预测指标,并且性能在不同模态之间差异很大,音频是最具挑战性的。 SOB 旨在提供对 LLM 结构化输出能力的更现实和全面的评估,最终推动确定性任务性能的改进。该基准将不断扩展,包含更多数据集和模式。

## LLM 结构化输出准确性的新基准 一个新基准,结构化输出基准 (SOB),已经发布,旨在解决大型语言模型 (LLM) 的一个关键问题:生成*准确*的结构化数据,而不仅仅是格式正确的数据。现有的基准主要检查正确的 JSON 模式和数据类型,但 SOB 还会验证输出中的*值*是否与文本、图像和音频输入的基础真相相符。 创建者发现模型在不同模态上的表现存在显著差异——GLM-4.7 在文本方面表现出色,Gemma-4-31B 在图像方面表现出色,Gemini-2.5-Flash 在音频方面表现出色。值得注意的是,模型大小并不总是准确性的指标;较小的模型,如 Qwen3.5-35B 和 GLM-4.7,通常优于较大的模型。 SOB 旨在突出“结构化幻觉”——看似合理但不正确的值,这些值会绕过典型的安全措施——并推动在可靠、准确的输出至关重要的确定性 LLM 工作流程方面的改进。该基准是开源的,其结果旨在推动该领域朝着更可控和一致的 LLM 输出方向发展。
相关文章

原文

LLMs are increasingly deployed to produce structured data from unstructured and semi-structured sources, parsing invoices, medical records, meeting transcripts, and converting PDFs to database rows.

For deterministic output, the next step in a workflow reads a specific key and expects a specific type. A hallucinated invoice_total or an array ordered incorrectly because of inaccurate date values silently breaks downstream systems. Yet existing benchmarks either check schema compliance alone or evaluate value correctness within a single source domain.

Top 5 at a glance

A side-by-side look at the top 5 models across all seven metrics. The structural metrics (JSON Pass, Path Recall, Structure Coverage, Type Safety) cluster near the ceiling for every model, while Value Accuracy and Perfect Response separate them.

The problem with current structured output benchmarks

Most benchmarks collapse "structured output quality" into a single number: does the response parse, and does it validate against the schema? That's necessary, not sufficient.

Schema compliance as the only metricA model can emit perfectly valid JSON with wrong values and score 100%
Single-source inputs (text only)Real systems extract from OCR, screenshots, meeting audio, and PDFs, not just clean text
No difficulty weightingMedium and hard schemas are scored identically, hiding which models actually handle nested structure
No separation of parse / structure / value errorsYou can't tell if a model failed at JSON, at the schema, or at the facts
Reasoning / chain-of-thought blended inResults measure reasoning + extraction together, not the extraction capability itself

References to existing benchmarks: JSONSchemaBench | StructEval | DeepJSONEval | LLMStructBench

How SOB works

SOB evaluates structured output across three modalities using the same scoring harness. The goal is to isolate the extraction capability from every other ability a model has.

Three sources, one scoring pipeline

TextHotpotQA context passages5,000
ImageolmOCR-bench documents209
AudioAMI Meeting Corpus conversations115

Every record is paired with a JSON Schema and a ground-truth answer that was verified against the source context through human authoring with an LLM cross-check, so a missing or hallucinated value is unambiguously wrong.

To isolate the structured-output capability from vision and ASR quality, image and audio records are converted to text-normalized context before scoring. Models see the same modality-stripped context, and the differences that remain are attributable to how they handle schemas, nesting, and value grounding under different content distributions.

Seven metrics, not one

SOB reports seven metrics per record so you can see exactly where a model fails:

Value AccuracyExact leaf-value match against the verified ground truth (primary)
JSON Pass RateThe response is parseable JSON
Type SafetyAll leaf values match the declared JSON Schema types
Structure CoverageThe response includes the required object/array structure
Path RecallAll required JSON paths (keys) are present
FaithfulnessValues are grounded in the source context, not hallucinated
Perfect ResponseEvery leaf value is exactly correct for the full record

Value Accuracy is the metric that matters for production. It's the share of fields a downstream system can trust without a human review step.

Scoring gates

Two gates prevent inflated scores from schema-only wins:

  • Hardening gate: If JSON parse fails, downstream semantic metrics are zeroed for that record.
  • Coverage gate: Value Accuracy is only credited on fields the model actually returned, with missing paths counting as wrong.

Schemas are tagged between easy, medium or hard. The final leaderboard is schema-complexity-weighted (easy = 1.0, medium = 2.0, hard = 3.0) so hard schemas contribute more to the ranking than medium ones.

The results

We ran SOB on all models at temperature 0.0, max output 2048 tokens and no reasoning/thinking wherever the provider allows it, so the score reflects pure structured output and extraction capability.

Unified leaderboard

1GPT-5.40.8700.7980.8690.9930.9880.9810.9930.469
2GLM-4.70.8610.8040.8680.9650.9590.9570.9650.508
3Qwen3.5-35B0.8610.8010.8630.9690.9620.9600.9690.500
4Gemini-2.5-Flash0.8600.7960.8560.9720.9670.9610.9720.498
5Qwen3-235B0.8570.7860.8540.9780.9700.9680.9780.463
6Interfaze-Beta0.8550.7950.8580.9670.9620.9570.9670.480
7Claude-Sonnet-4.60.8540.7790.8580.9790.9750.9690.9790.442
8GPT-4.10.8500.7830.8530.9690.9630.9590.9690.454
9GPT-50.8490.7690.8590.9830.9780.9720.9830.398
10Gemma-3-27B0.8470.7770.8420.9690.9610.9580.9690.454
11Qwen3-30B0.8420.7530.8320.9830.9740.9700.9830.401
12Nemotron-3-Nano-30B0.8410.7470.8170.9870.9750.9710.9870.400
13GPT-5-Mini0.8350.7510.8370.9720.9660.9600.9720.388
14Gemma-4-31B0.8330.7780.8430.9430.9340.9340.9430.461
15Gemini-3-Flash-Preview0.8330.7730.8310.9390.9350.9290.9390.484
16Schematron-8B0.8320.7310.8070.9870.9760.9690.9870.370
17IBM-Granite-4.00.8320.7360.8120.9830.9650.9670.9830.381
18Phi-40.8310.7870.8490.9690.9610.9610.9690.452
19DS-R1-Distill-32B0.8270.7470.8190.9600.9450.9470.9600.411
20Ministral-3-14B0.7780.7000.7730.9060.8980.8960.9060.368
21GPT-OSS-20B0.7320.6670.7300.8450.8380.8360.8450.362

View the full leaderboard

The top four are within 1 point of each other on overall score, but swap freely across individual metrics. Rank order is metric-specific, not absolute.

Per-metric charts

Each chart re-sorts all 21 models on that single metric, so you can see which models win each category (not just the overall average).

To expose the gaps, each chart's x-axis starts from a floor appropriate to that metric (e.g. 60% for Value Accuracy, 80% for JSON Pass). Without that, the top cluster looks identical.

Value Accuracy

The metric production systems care about. Note how tightly the top cluster sits compared to the overall leaderboard spread.

Faithfulness

How often values are grounded in context instead of hallucinated.

JSON Pass Rate

Almost every modern model clears 95%+ in the unified leaderboard. This is why a pass-rate-only benchmark can't separate them anymore.

Path Recall

Whether all required keys appear in the output.

Structure Coverage

Whether nested objects and arrays are present with the correct shape.

Type Safety

Whether leaf values respect the declared JSON Schema types (no strings where numbers are expected).

Perfect Response Rate

The fraction of records where every single leaf value is exactly right. This is the hardest metric and collapses to roughly half even for the best models.

The JSON-pass vs Value-Accuracy gap

The single most important view: most models clear 95%+ on JSON Pass, but Value Accuracy sits 15 to 30 points lower. That gap is the space where structured output benchmarks have been lying to us.

The gap column is the headline. Every model on this list passes JSON parsing 97%+ of the time, but actual leaf-value extraction drops by 17 to 26 points. Qwen3.5-35B has the tightest gap (16.8) and the highest Value Accuracy on the list, while Schematron-8B passes JSON 98.7% of the time but lands the lowest Value Accuracy at 73.1% — a 25.6 point fall.

GPT-5.499.3%79.8%19.5 pp
Nemotron-3-Nano-30B98.7%74.7%24.0 pp
Schematron-8B98.7%73.1%25.6 pp
GPT-598.3%76.9%21.4 pp
Qwen3-30B98.3%75.3%23.0 pp
IBM-Granite-4.098.3%73.6%24.7 pp
Claude-Sonnet-4.697.9%77.9%20.0 pp
Qwen3-235B97.8%78.6%19.2 pp
Gemini-2.5-Flash97.2%79.6%17.6 pp
GPT-5-Mini97.2%75.1%22.1 pp
Qwen3.5-35B96.9%80.1%16.8 pp
Gemma-3-27B96.9%77.7%19.2 pp

Modalities diverge more than we expected

The same model scores very differently across text, image, and audio, even when every model gets the same text-normalized context. Audio is the hardest by far. The transcripts are long (~7,300 tokens on average) and full of overlapping speakers, so models struggle to pull out the right values.

Best Value Accuracy by modality across all valid models:

Text83.0%GLM-4.7
Image67.2%Gemma-4-31B
Audio23.7%Gemini-2.5-Flash

No single model wins all three. GPT-5.4 ranks 3rd on text but 9th on images. Schematron-8B ranks 19th on text but 10th on images. Gemma-4-31B ranks 11th on text but 1st on images.

Seven patterns worth internalizing

  1. Valid JSON ≠ correct JSON. JSON Pass and Value Accuracy diverge by 15 to 30 points on every frontier model.
  2. Structural metrics mask value errors. Path Recall / Structure Coverage / Type Safety can all read ~99% while 20 to 30% of leaf values are still wrong, and Perfect Response collapses to about half even for the top models.
  3. Model size is not a predictor. Qwen3.5-35B and GLM-4.7 beat GPT-5 and Claude-Sonnet-4.6 on Value Accuracy. Phi-4 (14B) edges out GPT-5 and GPT-5-Mini on text.
  4. Structured hallucinations are the hardest bug. The value is type-correct, schema-valid, and plausible, so it slips through most guardrails. On one audio record the ground truth is "target_market_age": "15 to 35 years" and a model returns "25 to 35" — invisible without field-level checks.
  5. Modalities don't transfer. Text-trained structured output behavior degrades sharply when the source is a transcribed conversation. Best Value Accuracy drops from 83.0% on text to 67.2% on images to 23.7% on audio.
  6. Rankings shift across modalities. GLM-4.7 leads text, Gemma-4-31B leads images, Gemini-2.5-Flash leads audio. No single model dominates all three, so a text-only leaderboard would mask the gaps.

What's next

SOB is a first step, not a finish line. We'll keep growing the benchmark along several axes:

  • More datasets, including newer datasets with increasing complexity and difficulty.
  • More schemas and difficulty tiers, including recursive types, unions, and large enum spaces.
  • Continuous re-evaluation as new models ship, and ongoing transparent tracking of our own models against the same scoring harness so we can measure ourselves honestly.

Why we released SOB?

Our goal is to be the best general model for deterministic tasks and a key aspect of determinism is controllable and consistent output structure. The first step to making structured output better is to measure it and hold ourselves against the best.

SOB launch video

联系我们 contact @ memedata.com