CertSafari
    Anthropic Claude Certified Associate – Foundations (CCAO-F)· Lessons

    Domain 2 · Lesson 10/30

    Structured Data Output: When to Ask Claude for a Fixed Format

    Organize and curate information and select appropriate output formats (artifacts, inline, structured data)

    7 min read
    3.5% of exam
    3 sources
    Published 4 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Choose structured data when another tool or process will consume the output
    • Specify an output format precisely enough that Claude follows it consistently
    • Explain what a schema guarantees and what it does not
    • Choose between prose and lists for readers

    1.Choose the format for where the output goes

    The third format option is structured data: output in a fixed shape, with the same fields every time. A useful question to ask is where the output goes next. If a person will read it, prose or an artifact usually fits. If it goes into a spreadsheet, a database or another program, structure matters more than style. Think of a coordinator who wants thirty training bookings to sort and filter in a spreadsheet. A paragraph describing the bookings fails them, however well written. They need one record per booking, with the same named fields in each row.

    Getting that shape reliably starts with asking for it explicitly. Anthropic's guidance on consistent output says to define the format precisely, naming the exact keys or columns you expect, and its general prompting advice says to be specific about the desired output format and constraints. A worked example shows a customer-feedback request that names its keys (sentiment, key_issues, action_items) and the allowed values for sentiment. Examples help as well: a few good examples are one of the most reliable ways to steer format, tone and structure.

    Checkpoint 1 of 5· Check yourself

    A coordinator needs a list of training bookings that she can sort and filter in her spreadsheet. Which request fits best?

    Checkpoint 2 of 5· Exam question

    A project manager asks Claude to map out a five-stage approval workflow with branching decision points so the team can reference it during a planning meeting. What is the best way for Claude to present this?

    Sources12

    2.How a schema enforces the shape

    In a chat, a clear request is usually enough. When output goes straight into software, developers can go further with the structured outputs feature, which makes Claude's response follow a specific schema. The documentation lists typical uses: extracting data from images or text, generating structured reports, and formatting API responses. You don't need to write the code yourself to see the point. The schema is simply a list of the fields you expect and the type of each one.

    A schema written as a Pydantic model: four named fields, each with a typepython
    class ContactInfo(BaseModel):
        name: str
        email: str
        plan_interest: str
        demo_requested: bool

    The documentation is frank about why this matters. Without enforcement, careful prompting can still produce broken structure.

    What structured outputs change, in the documentation's own terms
    Without structured outputsWith structured outputs
    Parsing errors from invalid JSON syntaxAlways valid: no more JSON.parse() errors
    Missing required fields; inconsistent data typesType safe: guaranteed field types and required fields
    Schema violations requiring error handling and retriesReliable: no retries needed for schema violations

    Checkpoint 3 of 5· Fill the gap

    This sample pulls invoice data into a typed object. Which attribute holds the result after parsing?

    response = client.messages.parse(
        model="claude-opus-5-5",
        max_tokens=4096,
        output_format=Invoice,
        messages=[
            {"role": "user", "content": f"Extract invoice data from: {invoice_text}"}
        ],
    )
    
    print(response. ? )

    Sources3

    3.Valid structure is not verified content

    A neat table looks authoritative, and that's the risk. Structure guarantees the shape of the output: valid syntax, required fields present, the right types. It says nothing about whether a figure was copied correctly from the right report. A table that goes straight into a board deck can carry a wrong number with full confidence. Checking those values belongs to the verification skills covered elsewhere in this domain. The format decision here is to remember that tidy structure doesn't replace that check.

    Even the shape guarantee has limits. Structured outputs don't guarantee the capitalisation of fixed category values. Claude may return a label that differs from the allowed one only in case, so anything that compares labels should ignore capitalisation.

    Checkpoint 4 of 5· Check yourself

    Which statement about schema-constrained output is accurate?

    Sources3

    4.Formatting for readers: prose or lists

    Not every inline answer needs bullets, and not every report needs headings. Anthropic's prompting guidance includes a sample instruction for long-form content such as reports, documents and analyses: write in clear, flowing prose and keep lists for truly discrete items, or for when the user explicitly asks for a list or ranking. The aim is text that guides the reader through the ideas rather than breaking them into isolated fragments.

    This is guidance to tune, not a fixed rule. The same page notes that Claude Fable 5.1 already formats less than earlier models, so on that model a heavy anti-list instruction can strip out structure the content actually needs. The practical approach is to look at the output, decide whether its structure matches the content (discrete items as a list, an argument as prose), and say so explicitly if it doesn't.

    Checkpoint 5 of 5· Check yourself

    A user asks Claude for an analytical report and gets a long run of very short bullet points. Which adjustment fits the guidance?

    Sources2

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.If Claude's table or JSON matches the requested structure, the figures in it can go straight into a deck.Why is that wrong?

      Structured output guarantees schema compliance, meaning syntax, fields and types. It doesn't guarantee that the values match the source documents.

      Covered in Valid structure is not verified content

    2. 2.A well-written prose summary is good enough for data that someone will sort and filter in a spreadsheet.Why is that wrong?

      Data that a tool will consume needs a precisely defined format with consistent fields, not narrative text.

      Covered in Choose the format for where the output goes

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Precisely define your desired output format using JSON, XML, or custom templates so that Claude follows every output formatting element you require.”
      ↩︎ Choose the format for where the output goes
    2. 2.
      “Examples are one of the most reliable ways to steer Claude's output format, tone, and structure.”
      ↩︎ Choose the format for where the output goes
      “Claude Fable 5.1 already formats less than earlier models”
      ↩︎ Formatting for readers: prose or lists
      “Be specific about the desired output format and constraints.”
      ↩︎ Exam trap 2
      “write in clear, flowing prose using complete paragraphs and sentences”
      ↩︎ Checkpoint
    3. 3.
      “Get Claude's response in a specific JSON format, for example to extract data from images or text, generate structured reports, or format API responses.”
      ↩︎ How a schema enforces the shape
      “Without structured outputs, Claude can generate malformed JSON responses or invalid tool inputs that break your applications.”
      ↩︎ How a schema enforces the shape
      “Compare enum values case-insensitively, and avoid enum values that differ only in capitalization.”
      ↩︎ Valid structure is not verified content
      “Structured outputs guarantee schema-compliant responses through constrained decoding”
      ↩︎ Exam trap 1
      “Structured outputs guarantee schema-compliant responses through constrained decoding”
      ↩︎ Prediction
      “Structured outputs don't guarantee the capitalization of string enum and const values”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.