Flashcardsfor IT Certifications

D6: Output Handling & Structured Output

Claude Certified Developer – Foundations exam practice questions · 10 flashcards

Question
How do you get reliable structured output?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Output Handling & Structured Output practice questions and answers
  1. How do you get reliable structured output?
    Use the structured outputs feature or tool use with a JSON schema, plus clear format instructions.
  2. What is defensive parsing?
    Parsing output with error handling for malformed or unexpected content instead of assuming it's valid.
  3. What should you do with JSON output before using it?
    Parse it, validate it against the expected schema, and handle failures before processing.
  4. Is 'it parsed successfully' enough?
    No. Valid JSON can still miss fields or contain wrong types/values.
  5. Why treat model output as untrusted input?
    It may be wrong, malformed or influenced by injected content.
  6. What does 'skepticism toward confident output' mean?
    Don't trust output because it sounds certain; verify important claims and values.
  7. What should happen when validation fails?
    Retry with error feedback, use a fallback, or flag for human review; never pass bad data downstream.
  8. How can you extract output reliably from text?
    Ask Claude to wrap it in specific tags and extract between them.
  9. Why check stop_reason before parsing?
    max_tokens truncation often leaves incomplete JSON.
  10. Why not render model output as raw HTML/SQL?
    It could contain injected code; escape or use parameterized queries.