prompt extract {"name", "score"} from review 3 mechanisms
JSON MODE
valid json, no schema
{ "name": "Alice", "score": "high"}// type drifted: string
94.2%schema compliance
FUNCTION CALLING
model decides to invoke
tool_call: name: save_review args: { name: "Alice" }or: plain text reply
8.4tool-use reliability (claude)
STRUCTURED OUTPUTS
schema-constrained tokens
{ "name": "Alice", "score": 8.4}// grammar-enforced
100%schema adherence