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

    Domain 2 · Lesson 7/21

    Adapting Claude output: audience, artifacts, JSON, exact results and Skill documents

    Output Adaptation and Format Selection

    18 min read
    5% of exam
    6 sources
    Published 18 Nov 2026
    Docs as of 18 Nov 2026

    What you will be able to do

    • Put the steps for turning a raw Claude output into a finished piece in order: reader and channel, format, edit, then a fact check of the final wording
    • Decide when content belongs in an artifact rather than an inline chat reply
    • Ask for structured data that another system can import without manual repair
    • Get calculated figures from code execution instead of estimates, and read them from the tool result
    • Know where Skills can produce Word, Excel, PowerPoint and PDF documents and what each surface needs

    Key concept

    Destination-driven format — The person who reads an output and the channel it travels through decide its form: prose, an artifact, schema-bound JSON, a figure from executed code or a generated document. The first raw text Claude returns is material to shape for that destination. It is not yet the finished piece.

    1.Start from the reader and the channel

    A correct Claude output can still be the wrong thing to send. A contract summary that reads well in chat may be useless as a one-page brief for a legal team. An accurate refund explanation full of idioms fails customers who read English as a second language. Adaptation is the work between the raw output and what someone actually receives. It starts with two questions: who reads it, and through what channel?

    The channel sets rules that the content alone never would. The prompting guidance gives a sharp example. Instead of a bare "NEVER use ellipses", tell Claude that a text-to-speech engine will read the response aloud and cannot pronounce ellipses. Claude can then apply the reason to other things a speech engine will stumble on. Maths notation is another case. Recent models write equations in LaTeX by default. That looks right in some interfaces but arrives as backslashes and dollar signs in an email or a plain-text field. A plain-text channel therefore needs an explicit instruction to write maths with ordinary characters.

    Once you know the reader and the channel, the order of work is fixed. First, choose a format that suits them, such as short headed sections with a table of key dates for a legal brief. Next, edit the raw output into that format. Cut filler and move the key risks to the top. For non-native readers, rewrite long idiomatic sentences as short plain ones. If a draft is correct but sounds robotic, make it warmer. Remove leftover framing such as an opening "Here is the summary" in the same pass. If an occasional preamble still gets through, strip it in post-processing. Only then check names, dates and figures against the source. Any rewording can introduce an error, so the check must cover the words that will actually be sent. That check has its own lesson: checking facts against the source.

    Checkpoint 1 of 7· Check yourself

    A team sends Claude's loan-repayment explanations to customers as plain-text emails. The figures are correct, but customers see backslashes, dollar signs and fragments like \frac{}{} where the formulas should be. What is the most likely cause, and what is the fix?

    Checkpoint 2 of 7· Exam question

    Ines receives a raw Claude summary of a long contract review that will go to the legal team as a one-page brief. Her rule is that the audience and channel decide the format, and that facts are checked after the final wording is set. Which sequence of steps follows her rule?

    Sources4

    2.Inline reply or artifact

    An artifact is the right home for content that has a life beyond the current reply. In Claude apps, an artifact is something you would put in front of someone, such as a document, deck, dashboard or small tool. It opens beside the conversation, and you can edit it, come back to it and share it. Everything else belongs in an inline reply: answers, explanations and short snippets that are read once and left in the chat.

    When Claude puts content in an artifact instead of the chat reply
    CriterionWhat it means in practice
    Significant and self-contained, typically over 15 linesA one-page checklist qualifies; a two-line answer does not
    Likely to be edited, iterated on, or reused outside the conversationA document the team revises over several rounds
    Stands on its own without extra context from the conversationSomeone who never saw the chat can still use it
    Likely to be referred back to or used laterA template reused every quarter

    The problem that sends people to artifacts is a document pasted again into every reply. After four rounds of revision there are four checklists in the chat. Nobody is sure which one is current, and copying it out means scrolling to find the right one. An artifact gives you one living document instead. It updates as you ask for changes, you can edit it directly, and it is saved to the Artifacts tab so you can find it from any conversation. In a doc you can highlight a passage and choose Edit with Claude, and the change lands exactly where you marked it.

    The alternatives each fail for a different reason. Reposting the full text inline after every round creates exactly the scattered copies an artifact removes. Converting a checklist to JSON gives each item its own field, but JSON is a format for software to parse, not for a team to read and revise together. Cutting the checklist to five bullets so it fits in one reply changes the content to suit the container, which is backwards. When the document is finished, artifacts made from a template export to formats colleagues already use: docs go to Word, PDF, Markdown and Google Docs, and decks go to PowerPoint and PDF.

    Checkpoint 3 of 7· Check yourself

    After four rounds of revisions to a 30-line onboarding checklist, the chat holds four versions of it, and the team keeps copying out an older one by mistake. The checklist will be revised again next quarter. What should they ask Claude to do?

    Checkpoint 4 of 7· Exam question

    Dana, an operations manager, asks Claude in chat for a one-page onboarding checklist. She will revise it with her team over several rounds and reuse it every quarter. Claude keeps pasting the full checklist into each chat reply. Which adaptation fits best?

    Sources1

    3.Structured data for systems, not people

    When the reader is software, the format must be exact, not roughly right. A project tracker importing action items, a CRM taking in extracted contacts and an API returning a response all break on one missing field or a number sent as a string. Asking for "a table" or "some JSON" leaves Claude to guess the shape. The consistency guidance is direct: define the output format precisely using JSON, XML or a custom template. Name every key and its allowed values, for example owner, task and due date columns for each action item.

    On the API, structured outputs go further than instructions can. Without them, Claude can produce malformed JSON, leave out required fields or mix data types, and each of those needs error handling and retries. When you send a schema in output_config.format, constrained decoding guarantees that the response parses and matches the schema. SDK helpers such as client.messages.parse() take a Pydantic model, send its schema and return a parsed object.

    A JSON schema passed in output_config.format: every field typed and required, no extra properties allowedpython
        output_config={
            "format": {
                "type": "json_schema",
                "schema": {
                    "type": "object",
                    "properties": {
                        "name": {"type": "string"},
                        "email": {"type": "string"},
                        "plan_interest": {"type": "string"},
                        "demo_requested": {"type": "boolean"},
                    },
                    "required": ["name", "email", "plan_interest", "demo_requested"],
                    "additionalProperties": False,
                },
            }
        },

    Before structured outputs, a common way to force JSON was prefill: you write the opening of Claude's reply yourself, for example just an opening brace {, as a partial assistant message, and Claude continues from it. Because the reply has to start with the brace, there is no friendly preamble and the structure is set from the first character.

    One schema detail catches people out when they use a Pydantic model. If a field is typed as a plain dict, for example address: dict, the SDK turns it into a JSON object with empty properties. Every object in the sent schema also gets additionalProperties: false, so no key is allowed inside it, and Claude can only ever return {} for that field. The extraction looks successful, but the field is silently empty. When you know the keys, describe them as a nested model instead: define class Address(BaseModel) with street: str and city: str, then type the field address: Address. Claude now sees named, typed fields to fill.

    Checkpoint 5 of 7· Fill the gap

    A sales team wants every contact Claude extracts to parse and match a fixed shape before it goes into their CRM. Which request parameter carries the JSON schema in this call?

         ? ={
            "format": {
                "type": "json_schema",
                "schema": {
                    "type": "object",
                    "properties": {
                        "name": {"type": "string"},
                        "email": {"type": "string"},
                        "plan_interest": {"type": "string"},
                        "demo_requested": {"type": "boolean"},
                    },
                    "required": ["name", "email", "plan_interest", "demo_requested"],
                    "additionalProperties": False,
                },
            }
        },

    Sources234

    4.Figures that must be exact come from code execution

    A number that will be quoted in a memo or report should be calculated by code, not written out by the model. The code execution tool lets Claude write and run Python and Bash in a sandboxed container. An average over 5,000 orders is then calculated by the interpreter instead of being generated as text. The tool also gives you something to check. The response alternates server_tool_use blocks, which hold the commands Claude ran, with their result blocks, and Claude's text comes after them.

    When Claude chooses to run code and when it answers directly
    Claude runs code forClaude answers directly for
    Non-trivial math: large numbers, many steps, precision-sensitive resultsSimple arithmetic and well-known math facts
    Data analysis, file parsing, or visualizationFactual, conversational, or creative requests
    Explicit requests to run, compute, or executeSimple unit conversions or translations

    Claude decides for itself whether code would help, so a borderline request may get a direct answer. When the figure must be exact, say so and ask Claude to run code to verify it. For your own data, upload the CSV or Excel file through the Files API and reference it in the request. State which column holds the value and which rows to exclude: a correctly run calculation over the wrong rows is still wrong.

    Requesting a calculation with the code execution tool enabledpython
    response = client.messages.create(
        model="claude-opus-5-5",
        max_tokens=4096,
        messages=[
            {
                "role": "user",
                "content": "Use the code execution tool to calculate the mean and standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]",
            }
        ],
        tools=[{"type": "code_execution_20250825", "name": "code_execution"}],
    )

    The working order has four steps. Upload the file with precise instructions. Have Claude run the calculation and show the code with its output. Compare the result with an independent spot check, such as a spreadsheet average over a sample of rows. Only then write the figure into the document, naming the file and the exclusions behind it. Sometimes Claude's prose summary and the executed output disagree, for example 1.84 million in the text against 1.48 million in the tool result. In that case the prose got the figure wrong when it restated it. Take the figure from the result block and confirm it; do not average the two or pick one by preference.

    Checkpoint 6 of 7· Check yourself

    With the code execution tool enabled, an analyst asks Claude for the percentage change between two quarterly revenue totals. The reply states the figure in prose, and the response contains no server_tool_use blocks. The figure will go into a board report. What should the analyst do?

    Sources5

    5.Skill-produced documents

    When the destination is a file a colleague will open in Word, Excel or PowerPoint, a Skill can produce that file directly. An Agent Skill packages instructions, metadata and optional scripts or templates, and Claude loads it only when a task needs it. Anthropic provides pre-built Skills for common document tasks. Organisations can add custom Skills that carry their own formats and conventions, so the house style does not have to be repeated in every prompt.

    Where pre-built document Skills are available and what they need
    SurfacePre-built document Skills (pptx, xlsx, docx, pdf)
    claude.aiActive when you create documents, with no setup required
    Claude APIReferenced by skill_id in the container parameter; requires the code execution tool
    Claude CodeNot available; custom Skills only

    On the API, Skills run inside the code execution container, which has no network access and cannot install packages at runtime. Generated files come back as references, not as text. Files saved to the top level of $OUTPUT_DIR are returned as file_id entries in the tool result, and you download them with the Files API. A file written anywhere else in the container is never returned, which is a common reason a requested spreadsheet seems to vanish. The document that arrives is still a raw output. Before it is sent, it gets the same treatment as any other output: reader, format, edit and fact check.

    Checkpoint 7 of 7· Match them up

    Your team wants Claude to produce Word and Excel files with the pre-built document Skills. Match each surface to how those Skills work there.

    Tap a term, then the definition that fits it.

    Sources65

    Sources

    (6)

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

    1. 1.
      “It opens beside your conversation, and you can edit it, come back to it, and share it with others.”
      ↩︎ Inline reply or artifact
      “significant and self-contained, typically over 15 lines”
      ↩︎ Inline reply or artifact
      “Docs export to Word, PDF, Markdown, and Google Docs.”
      ↩︎ Inline reply or artifact
      “likely to want to edit, iterate on, or reuse outside the conversation”
      ↩︎ Exam trap 1
      “It's something you're likely to want to edit, iterate on, or reuse outside the conversation.”
      ↩︎ Checkpoint
    2. 2.
      “Precisely define the output format you want using JSON, XML, or custom templates so that Claude follows every output formatting element you require.”
      ↩︎ Structured data for systems, not people
    3. 3.
      “Without structured outputs, Claude can generate malformed JSON responses or invalid tool inputs that break your applications.”
      ↩︎ Structured data for systems, not people
      “The SDK sends a dict field as an object with empty properties, so Claude can only return {} for it.”
      ↩︎ Structured data for systems, not people
      “Add additionalProperties: false to all objects”
      ↩︎ Structured data for systems, not people
    4. 4.
      “prefilled responses (providing a partial assistant message for Claude to continue from)”
      ↩︎ Structured data for systems, not people
      “Your response will be read aloud by a text-to-speech engine, so never use ellipses”
      ↩︎ Start from the reader and the channel
      “default to LaTeX for mathematical expressions, equations, and technical explanations”
      ↩︎ Start from the reader and the channel
      “If the occasional preamble slips through, strip it in post-processing.”
      ↩︎ Start from the reader and the channel
      “Be specific about the output format and constraints you want.”
      ↩︎ Key concept
      “The structured outputs feature is designed specifically to constrain Claude”
      ↩︎ Exam trap 2
      “Claude’s latest models default to LaTeX for mathematical expressions, equations, and technical explanations.”
      ↩︎ Checkpoint
      “Requests with prefilled assistant messages to these models return a 400 error.”
      ↩︎ Prediction
    5. 5.
      “The response interleaves server_tool_use blocks (the commands Claude ran) with their tool result blocks”
      ↩︎ Figures that must be exact come from code execution
      “Non-trivial math (large numbers, many steps, precision-sensitive results)”
      ↩︎ Figures that must be exact come from code execution
      “To analyze your own data files (such as CSV, Excel, or images), upload them through the Files API and reference them in your request.”
      ↩︎ Figures that must be exact come from code execution
      “When the command completes, the files at the top level of that directory are captured and returned as the file_id entries”
      ↩︎ Skill-produced documents
      “If you want Claude to run code for a borderline request, ask explicitly”
      ↩︎ Exam trap 3
      “If you want Claude to run code for a borderline request, ask explicitly”
      ↩︎ Checkpoint
    6. 6.
      “Anthropic provides pre-built Agent Skills for common document tasks (PowerPoint, Excel, Word, PDF), and you can create your own custom Skills.”
      ↩︎ Skill-produced documents
      “Prerequisites: Using Skills through the API requires the code execution tool, whose container Skills run in.”
      ↩︎ Skill-produced documents
      “The pre-built document Skills (PowerPoint, Excel, Word, PDF) are not available in Claude Code”
      ↩︎ Exam trap 4
      “Claude Code supports custom Skills. The pre-built document Skills (PowerPoint, Excel, Word, PDF) are not available in Claude Code”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise Anthropic Claude Certified Associate – Foundations (CCAO-F) - December 7 onwards in quiz mode.

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