An output format is the required structure of an LLM response. Specifying it narrows the model’s choices so results can serve downstream systems, not just human readers. section 6.2.1
Make the expected structure explicit, including details a parser or downstream component would otherwise have to guess:
- Choose a representation, such as JSON, XML, a table, a list, or prose. section 6.2.1 section 6.4.1
- For structured output, specify the schema and decisions such as field names, units, ordering, and how to represent missing values. section 6.2.1
- Do not rely on the model’s default Markdown prose: its shape can vary between runs and models, and may not suit a parser. section 6.2.1
Examples in the prompt can demonstrate the desired input-output pattern and improve consistency. In a structured prompt, output formatting is placed near the end, close to the generated response. section 6.2.1 section 6.4.1
Listing 6.1 Example of a user prompt following the 10-step prompt structure
Task context: You are assisting a customer support team. Tone context: Clear and empathetic. Background data: Refund policy: refunds are allowed within 30 days. Detailed task description and rules: Write a short reply explaining whether a refund is possible. Do not exceed 50 words. Examples: Style: "Thanks for reaching out. Here's what I can do." Conversation history: Q: "I bought an item 40 days ago. Can I get a refund?" Immediate request: Respond to the user. Reasoning guidance: Verify the purchase date against the policy before answering. Output formatting: One short paragraph. Prefilled response: "Here's your refund update: ____"
The customer-support prompt shows an output-format instruction alongside the task, examples, conversation history, and other prompt components. section 6.4.1













