liveBook · Manning

Output format

As explained in Context Engineering

An output format is the required structure or representation of a model-generated result.

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

How Context Engineering covers it

How deep it goes
Explains format choices and schema details, including fields, units, ordering, and missing-value behavior.
Examples
Uses JSON, XML, tables, lists, Markdown prose, and a one-paragraph customer-support reply.
What you can do after
Configure prompts to request a specified response structure and schema.
How it connects
Connects output formatting to prompting, few-shot examples, schemas, and context engineering.

Also explained in

Compare how 14 books explain output format →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.