liveBook · Manning

Schema

As explained in LLM Customization and Fine-Tuning

A fixed arrangement of fields and separators used to present examples and queries in a consistent format for a model.

A schema is a fixed arrangement of fields and separators that presents examples and queries consistently. In few-shot prompting, the model matches the repeated input-output pattern; changing labels, positions, or separators introduces variability into a system intended to be predictable. section 4.2.3 section 4.2.1

Ticket: My credit card was charged twice for the May invoice.
Category: billing
 
Ticket: I cannot log in after the password reset email.
Category: login

These support-ticket examples use the same two-line shape, field labels, and blank-line separator. section 4.2.3

Apply the same schema to every example and the final query. In a ticket classifier, a system instruction names the task and constrains the output; labeled examples follow, and the final query ends with a Category: marker indicating where the answer belongs. The particular format matters less than using it consistently. section 4.2.3 section 4.2.1

A response schema can also enforce valid JSON or a fixed template at decode time without training. Choose that route when output shape is the problem: format alone does not justify updating model weights, although prompting still incurs inference-token costs. section 1.6.2

Consistent format is not evidence of grounded content. An adapted support model can produce a neat summary and numbered steps while inventing a recovery tool or help-desk URL. Desired behavior such as citing a source, refusing, or escalating requires more than an output template. section 1.6.3

How LLM Customization and Fine-Tuning covers it

How deep it goes
Explains consistent labels and separators and notes decode-time enforcement, without detailing its implementation.
Examples
Uses labeled support tickets and password-recovery answers to illustrate consistent formatting and ungrounded content.
What you can do after
Apply a consistent schema to few-shot ticket classification and evaluate when formatting alone is insufficient.
How it connects
Connects schemas to few-shot prompting, in-context learning, and fine-tuning.

Also explained in

Compare how 54 books explain schema →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLM Customization and Fine-Tuning. The section links point to the parts of the book it draws on.