{
  "format": "agent-article-v0",
  "article_id": "EA-240",
  "canonical_url": "/tools/ea-240-structured-output-schema-validation",
  "page_type": "reference",
  "claim_ids": [],
  "evidence_ids": [
    "EA-240-CURRENT-APPROVAL",
    "EA-240-CURRENT-BODY-READBACK",
    "EVD-EA-240-URL-B1ED6CF92876",
    "EVD-EA-240-URL-2551F1B1287D",
    "EVD-EA-240-URL-F82212725495",
    "EVD-EA-240-URL-735D86ECC127",
    "EVD-EA-240-URL-265A674D3F00",
    "EVD-EA-240-URL-2E35BD33C49F",
    "EVD-EA-240-URL-BDC7E2AF9D9F",
    "EVD-EA-240-URL-B01515BB8172",
    "EVD-EA-240-URL-64D451728A26",
    "EVD-EA-240-URL-C0671C3A4240"
  ],
  "unknown_ids": [
    "EA-240-UNKNOWN-01"
  ],
  "operational_object_ids": [],
  "provider": [],
  "models": [],
  "plans": [],
  "surfaces": [],
  "regions": [],
  "current_status": "CURRENT",
  "observation_status": "SPEC_ONLY",
  "freshness": "CURRENT",
  "last_verified": "2026-10-05",
  "supersedes": [],
  "superseded_by": [],
  "provenance": [
    "CANDIDATE-EA240-FIRST-20261005-C1",
    "BODY-SHA256:1148f544c3f41ccc5c760337976e97962af6a567cfc47d5a1faad400c4f2f772",
    "SRC-EA-240-URL-B1ED6CF92876",
    "SRC-EA-240-URL-2551F1B1287D",
    "SRC-EA-240-URL-F82212725495",
    "SRC-EA-240-URL-735D86ECC127",
    "SRC-EA-240-URL-265A674D3F00",
    "SRC-EA-240-URL-2E35BD33C49F",
    "SRC-EA-240-URL-BDC7E2AF9D9F",
    "SRC-EA-240-URL-B01515BB8172",
    "SRC-EA-240-URL-64D451728A26",
    "SRC-EA-240-URL-C0671C3A4240"
  ],
  "article_sources": [
    {
      "id": "EA-240-CURRENT-APPROVAL",
      "evidence_class": "RESEARCH",
      "title": "現行本文の監査・revision対応",
      "supports": [
        "現行台帳のAUDIT_PASSと候補・revision・本文ハッシュの対応を確認しています。"
      ],
      "limit": "監査状態と来歴の記録です。外部根拠の最新性や本文の全主張を追加保証しません。",
      "origin_class": "AUDITED_CANONICAL_RESEARCH_PACKET",
      "source_or_experiment_ids": [
        "CANDIDATE-EA240-FIRST-20261005-C1"
      ],
      "supporting_locators": [
        "1KqhJtiSb2S84rWmeYVwKcT_76dBwZ_B0ZZuAWQqH0rQ",
        "EA_REVISION_LEDGER!A43:U43",
        "EA-240-FIRST-20261005"
      ],
      "provenance_status": "CURRENT_CANONICAL_APPROVAL_READBACK"
    },
    {
      "id": "EA-240-CURRENT-BODY-READBACK",
      "evidence_class": "IMPL",
      "title": "現行本文の収録照合",
      "supports": [
        "公開生成入力の本文SHA-256が、監査済み候補に結び付いたハッシュと一致しています。"
      ],
      "limit": "本文の同一性の検査です。外部システムの挙動や全主張の真偽を実証したものではありません。",
      "checked_at": "2026-10-12",
      "origin_class": "IMPLEMENTATION_READBACK",
      "source_or_experiment_ids": [
        "BODY-SHA256:1148f544c3f41ccc5c760337976e97962af6a567cfc47d5a1faad400c4f2f772"
      ],
      "supporting_locators": [
        "content/staging/EA-240.md",
        "1148f544c3f41ccc5c760337976e97962af6a567cfc47d5a1faad400c4f2f772",
        "EA-240-FIRST-20261005"
      ],
      "provenance_status": "CURRENT_APPROVED_BODY_HASH_MATCH"
    },
    {
      "id": "EVD-EA-240-URL-B1ED6CF92876",
      "evidence_class": "RESEARCH",
      "title": "E1 — JSON Schema, “Specification / Draft 2020-12”, JSON Schema project, published 2022-06-16, accessed 2026-10-05.",
      "href": "https://json-schema.org/specification",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-B1ED6CF92876"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E1",
        "Canonical URL: https://json-schema.org/specification"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-2551F1B1287D",
      "evidence_class": "RESEARCH",
      "title": "E2 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, Draft 2020-12, accessed 2026-10-05.",
      "href": "https://json-schema.org/draft/2020-12/json-schema-validation",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-2551F1B1287D"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E2",
        "Canonical URL: https://json-schema.org/draft/2020-12/json-schema-validation"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-F82212725495",
      "evidence_class": "RESEARCH",
      "title": "E3 — OpenAI API Reference, “Create a model response”, accessed 2026-10-05.",
      "href": "https://developers.openai.com/api/reference/resources/responses/methods/create",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-F82212725495"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E3",
        "Canonical URL: https://developers.openai.com/api/reference/resources/responses/methods/create"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-735D86ECC127",
      "evidence_class": "RESEARCH",
      "title": "E4 — OpenAI Developers, “Prompt generation — Schemas”, accessed 2026-10-05.",
      "href": "https://developers.openai.com/api/docs/guides/prompt-generation",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-735D86ECC127"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E4",
        "Canonical URL: https://developers.openai.com/api/docs/guides/prompt-generation"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-265A674D3F00",
      "evidence_class": "RESEARCH",
      "title": "E5 — OpenAI, “Introducing Structured Outputs in the API”, 2024-08-06, accessed 2026-10-05.",
      "href": "https://openai.com/index/introducing-structured-outputs-in-the-api/",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-265A674D3F00"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E5",
        "Canonical URL: https://openai.com/index/introducing-structured-outputs-in-the-api/"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-2E35BD33C49F",
      "evidence_class": "RESEARCH",
      "title": "E6 — Google AI for Developers, “Structured outputs — Gemini API”, accessed 2026-10-05.",
      "href": "https://ai.google.dev/gemini-api/docs/structured-output",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-2E35BD33C49F"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E6",
        "Canonical URL: https://ai.google.dev/gemini-api/docs/structured-output"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-BDC7E2AF9D9F",
      "evidence_class": "RESEARCH",
      "title": "E7 — Google AI for Developers, “Generating content — Gemini API”, accessed 2026-10-05.",
      "href": "https://ai.google.dev/api/generate-content",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-BDC7E2AF9D9F"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E7",
        "Canonical URL: https://ai.google.dev/api/generate-content"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-B01515BB8172",
      "evidence_class": "RESEARCH",
      "title": "E8 — Ray, “The Constraint Tax: Measuring Validity-Correctness Tradeoffs in Structured Outputs for Small Language Models”, arXiv:2605.26128, 2026-05-20.",
      "href": "https://arxiv.org/abs/2605.26128",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-B01515BB8172"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E8",
        "Canonical URL: https://arxiv.org/abs/2605.26128"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-64D451728A26",
      "evidence_class": "RESEARCH",
      "title": "E9 — Chavan, “Constrained Decoding Eliminates Structural Failures in Small LLMs but Reveals a Scale-Dependent Semantic Gap”, arXiv:2609.23742, 2026-09-20.",
      "href": "https://arxiv.org/abs/2609.23742",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-64D451728A26"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E9",
        "Canonical URL: https://arxiv.org/abs/2609.23742"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    },
    {
      "id": "EVD-EA-240-URL-C0671C3A4240",
      "evidence_class": "RESEARCH",
      "title": "E10 — Li, “When JSON Is Not Enough: Semantic Reliability of Schema-Constrained LLM Ordering Agents”, arXiv:2607.18261, 2026-05-16.",
      "href": "https://arxiv.org/abs/2607.18261",
      "supports": [],
      "limit": "元の監査済み資料に記載された参照先です。URLの復元は、資料の最新性や全主張の支持を新たに検証したことを意味しません。",
      "origin_class": "SOURCE_PACKET_REFERENCE",
      "source_or_experiment_ids": [
        "SRC-EA-240-URL-C0671C3A4240"
      ],
      "supporting_locators": [
        "EVIDENCE_TABLE",
        "E10",
        "Canonical URL: https://arxiv.org/abs/2607.18261"
      ],
      "scope": "EVIDENCE_TABLE",
      "provenance_status": "SOURCE_PACKET_REFERENCE_PROJECTED"
    }
  ],
  "research_sections": [
    {
      "heading": "PUBLIC_CLAIM",
      "text": "Structured OutputやJSON Schemaは、LLM出力を機械処理しやすい構造へ制約し、parse/schema failureを減らすための境界です。schema適合を、内容の真偽、業務妥当性、認可、最新状態、副作用の安全性と同一視しません。"
    },
    {
      "heading": "FIVE_GATES",
      "text": "side effectへ到達する前に、少なくとも次を分離します。\n\n1. syntax/parse: JSONとして読めるか。\n2. provider schema conformance: providerのstructured-output modeが対応subsetに従っているか。\n3. independent schema validation: application側validatorで期待dialect/schemaに適合するか。\n4. semantic validation: ID、単位、時刻、金額、相互関係、business invariantが正しいか。\n5. execution gate: identity/authorization、最新version、precondition、idempotency、必要なhuman confirmationを満たすか。\n\n前段PASSを後段PASSの代用にしません。"
    },
    {
      "heading": "SCHEMA_DIALECT_AND_PROVIDER_SUBSET",
      "text": "「JSON Schema対応」という表記だけでDraft 2020-12全機能が同一に使えるとは仮定しません。\n\nOpenAI strict structured outputはJSON Schemaのsubsetを使用します。公式documentation自身が、標準meta-schemaにはstrict mode未対応featureがあることを示しています。\n\nGemini structured outputsもJSON Schemaのsubsetであり、大規模・深いschemaは拒否され得ます。provider/model/API surfaceごとにsupported keywordとcomplexity limitをfixtureで確認します。\n\nschemaにはdialect/version、provider/model/API revision、schema hashを付け、consumer側validator versionも監査証跡へ残します。"
    },
    {
      "heading": "FORMAT_IS_NOT_BUSINESS_SEMANTICS",
      "text": "JSON Schema Draft 2020-12では`format`のassertion behaviorはvocabulary/implementationに依存します。email/date-time等がschema validatorを通っても、メールボックス実在、業務時間、timezone policy、組織上の許可までは証明しません。\n\ndomain validationをschema validationから分離します。"
    },
    {
      "heading": "SCHEMA_VALID_BUT_WRONG",
      "text": "constrained decodingでschema validityが高くても、値そのものが誤っている場合があります。\n\n例:\n- 存在する型のcustomer_idだが別顧客\n- enum内のactionだが意図と違う\n- integerの金額だが通貨・桁が違う\n- ISO date-timeだがtimezone/business cutoffが違う\n- required fieldを満たすため未知値を生成\n- tool argumentsはvalidだが対象versionが古い\n\n運用metricはschema-valid率だけでなくsemantic accuracy、executable accuracy、unsafe-accept rateを分離します。"
    },
    {
      "heading": "REFUSAL_AND_FAILURE_STATES",
      "text": "refusal、safety stop、max-token truncation、timeout、tool/runtime errorをschema-valid success objectへ変換しません。\n\nretry対象はfailure classで限定し、schemaを通すためにbusiness meaningを変更しません。retry後も同一idempotency/precondition boundaryを維持します。"
    },
    {
      "heading": "SIDE_EFFECTING_TOOLS",
      "text": "tool argumentがschema-validでも、そのまま実行しません。\n\n実行直前にprincipal、authorization、resource version、business invariant、duplicate/idempotency key、confirmation requirementを再検証します。LLMが生成した「authorized=true」「confirmed=true」のようなfieldを権限証明に使いません。"
    },
    {
      "heading": "SCHEMA_EVOLUTION",
      "text": "schema変更はversioned contractとして扱います。field名を維持したまま意味・単位・nullable semanticsを変えないようにし、producer/consumerの互換fixtureを持ちます。\n\nprovider側structured-output subsetやAPI surface変更時も同じschemaで再試験します。"
    },
    {
      "heading": "OPERATING_CHECK",
      "text": "各provider/model/versionで、malformed JSON、missing/extra field、wrong type/enum、unsupported keyword、deep nesting、refusal、truncation、schema-valid semantic error、stale ID、wrong unit/timezone/currency、unauthorized tool call、duplicate execution、schema-version mismatchを試験します。\n\nparse validity、schema validity、semantic accuracy、executable accuracy、unsafe acceptance、refusal/errorを別metricとして記録します。"
    },
    {
      "heading": "FAILURE_ENVELOPE",
      "text": "unsupported keyword/dialect、schema complexity rejection、refusal、truncation、timeout、schema-valid semantic error、stale ID/version、unit/timezone/currency error、fabricated required value、numeric precision mismatch、format semantics mismatch、regex portability、provider subset drift、unauthorized tool call、duplicate execution、precondition failure、schema evolution mismatch、validator bypass、validation-log leakageを想定します。"
    },
    {
      "heading": "IMPLEMENTATION_STATE",
      "text": "本項は2026-10-05時点のJSON Schema Draft 2020-12、OpenAI/Gemini公式structured-output documentation、および2026年の独立structured-output evaluationsに基づくdesk researchです。production schemaやlive provider callは未検査です。"
    },
    {
      "heading": "SAFE_WORDING",
      "text": "Structured Output／JSON Schemaは構造適合を強化しますが、正しい答え、安全なtransaction、認可済み操作を保証しません。providerごとのschema subset/dialect/versionを固定し、application側でsemantic validation、authorization、precondition、idempotencyを別gateとして実施してください。"
    },
    {
      "heading": "OPEN_UNKNOWN",
      "text": "対象provider/model/API revision、organization schema、Anthropic current subset、streaming/refusal contract、validator implementation/version、schema registry、business invariants、authorization、idempotency、numeric precision、logging/retentionは未確認です。"
    },
    {
      "heading": "STOP_CONDITION",
      "text": "schema-validをsemantic-validやexecution-safeへ昇格させず、five-gate modelとprovider subsetを監査可能な形で固定します。organization固有schemaが必要な場合はexact contractに対するfixtureを追加します。"
    }
  ],
  "human_url": "/tools/ea-240-structured-output-schema-validation",
  "markdown_url": "/agent/article.md?path=%2Ftools%2Fea-240-structured-output-schema-validation",
  "json_url": "/agent/article.json?path=%2Ftools%2Fea-240-structured-output-schema-validation"
}