Guide-linked quiz · Medium Level

Structured Outputs Quiz

Test schema-required fields, nulls, extra properties, arithmetic and source checks, refusals, versioning, and why valid JSON can still be wrong.

Related guide pathsStructured Outputs
Question 1 of 8

A JSON Schema declares a property named total. What must also be specified if every response must include it?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. A JSON Schema declares a property named total. What must also be specified if every response must include it?
    • Set its numeric type only
    • Add total to the required-field list
    • Place it first in the schema file
    • Give the object a longer description
  2. Why decide whether additional object fields are allowed?
    • Any extra property always proves hallucination
    • JSON syntax forbids all additional properties
    • Only arrays can contain unexpected fields
    • Unexpected fields can change how downstream code interprets a response
  3. A missing value and an explicit null have different meanings in an integration. What should the schema specify?
    • Their separate allowed behavior and downstream interpretation
    • Treat absence and null as the same without documentation
    • Replace both with a fabricated zero
    • Let every provider choose silently
  4. A receipt has subtotal 50 and tax 5; valid JSON reports total 550. What failed?
    • JSON parsing
    • The total field’s numeric type
    • Factual and arithmetic validation against the source
    • The existence of an object schema
  5. A structured result cites source_id 9, but only IDs 1 through 3 were supplied. What check catches the error?
    • Check that source_id is a string
    • Count the object’s top-level keys
    • Accept any integer because its type is valid
    • Verify that referenced identifiers actually exist in the supplied evidence
  6. How should an application handle a model refusal or truncated response?
    • Assume every schema field was produced
    • Treat it as an explicit non-success case rather than inventing required values
    • Silently fill missing evidence with plausible defaults
    • Ignore the boundary because JSON mode was requested
  7. A stored output uses schema v1 but a consumer expects v2. What should the integration do?
    • Apply v2 assumptions without checking
    • Remove the version field
    • Reject or explicitly adapt the incompatible version
    • Assume schema changes affect only formatting
  8. Two providers offer structured output, one constrains generation and one validates afterward. Which practice remains necessary for both?
    • Check supported schema features and verify the values’ meaning
    • Assume identical enforcement for every schema keyword
    • Skip factual checks when output parses
    • Treat post-validation as a guarantee of truth

Keep testing yourself

More quizzes picked for your level.

View all quizzes