liveBook · Manning

Output format

As explained in Designing AI Systems

A model response constrained to a specified machine-readable structure rather than unconstrained text.

An output format constraint turns a model response into data a service can consume. The request’s `response_format` field can require valid JSON; schema-capable providers can validate against JSON Schema, while others can use basic JSON mode. section 3.1.6

Customer triage

A response such as `{"category":"billing","sentiment":"frustrated","escalate":true}` lets code route, filter, or act on fields directly instead of interpreting a free-form sentence. section 3.1.6

Listing 3.6 Chat request Protocol Buffer definition
message ChatRequest {
  string model = 1;    #A
  repeated ChatMessage messages = 2;    #B
  ChatConfig config = 3;
  repeated ToolDefinition tools = 4;    #C
  optional ResponseFormat response_format = 5;
  string system_prompt_name = 6;    #D
}
 
message ToolDefinition {    #E
  string type = 1;    #F
  FunctionDef function = 2;
}
message FunctionDef {
  string name = 1;
  string description = 2;
  string parameters_json = 3;    #G
}
 

The request definition shows `response_format` alongside messages, tools, and other model-call fields. section 3.1.6

How Designing AI Systems covers it

How deep it goes
Defines valid-JSON constraints, provider-supported JSON Schema validation, and basic JSON-mode fallback when schema validation is unavailable.
Examples
Uses customer-triage fields for category, sentiment, and escalation, contrasting JSON data with a free-form interpretation.
What you can do after
Apply structured responses to route, filter, and act on model results without parsing natural language.
How it connects
Connects response formatting to JSON Schema, provider capabilities, and downstream database storage.

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 Designing AI Systems. The section links point to the parts of the book it draws on.