Structured output (XML / JSON)
Instead of getting a free-flowing paragraph back, you can ask the model to format its response in a strict structure like JSON (for code/apps to read) or XML tags (to clearly separate different parts of a long prompt or response). This turns messy natural language into something a program can reliably parse.
XML tags are especially useful inside prompts themselves - wrapping instructions, examples, and data in distinct tags (e.g. <instructions>, <document>) removes ambiguity about which part of a huge prompt is "the rule" vs. "the content to act on." JSON output is used when the model's response needs to plug directly into other software - an app can't safely parse a conversational paragraph, but it can parse a JSON object with fixed fields.
Ask Claude to output a movie recommendation as a JSON object with fields "title," "genre," "one_line_reason." Then try asking without specifying a format and see how much messier and harder-to-reuse the plain-text version is.
Why ask a model to output JSON instead of a free-flowing paragraph?