Context Engineering and Prompt Management
Structured Output Contracts — References
Structured output contracts › References
The schema language, the serialisation underneath it, and the published work on making generation conform to a grammar.
The declaration
- JSON Schema — the current draft and its keyword vocabularies; most relevant here is the distinction between assertion and annotation keywords, which decides whether a declared constraint is enforced or merely documented.
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format — the wire format a response is parsed from; the interoperability clauses on number precision and repeated member names decide whether the producer and the consumer agree that an object conforms at all.
Constraining generation
- Willard and Louf, 2023, on efficient guided generation for large language models — the finite-state formulation behind grammar-constrained decoding, and the reason the enforceable subset of a schema language is smaller than the language itself. Cited by name; the arXiv path was not verified.
Accepting what arrives
- RFC 1122: Requirements for Internet Hosts — section 1.2.2 states the robustness principle. Worth reading against this capability as the case to be argued with: being liberal in what you accept from a model is exactly how a conformance problem becomes invisible.
- Protocol Buffers documentation — the field-presence and compatibility rules, as a worked example of evolving a payload shape while old and new consumers coexist. Cited by name; the documentation paths have changed between releases.
No verified reference is recorded for response-shape design against model capability, for refusal branches inside an output contract, or for first-attempt conformance measurement. These are engineering practice; the published work covers how to enforce a grammar rather than which grammar a model can satisfy comfortably.