liveBook · Manning

Schema

As explained in The Art of AI Product Development

A specification of the entity types, relationship types, and structural rules in a graph.

A schema is a contract for structured information: it specifies what entities or fields exist, how relationships are represented, and which outputs are acceptable. In language-model applications, schemas make generated data usable by downstream systems instead of leaving every response as free text. section 5.2.3 section 7.3.3

Choose the schema according to the product problem:

  • Use a predefined data schema when an LM must return reliable fields for automation, validation, or model-training data. section 5.2.3
  • Use a graph schema when connected entities matter more than isolated passages, such as companies, products, regulations, and market events. section 7.3.3
  • Enforce the contract through function calling, constrained inference, provider structured-output features, or post-generation validation with Pydantic. section 5.2.3

A finance knowledge graph

A finance-focused GraphRAG system might define nodes for regulations, companies, and market events, then specify relationships such as a company being affected by a regulation. Retrieval can traverse those connections rather than returning unrelated text chunks. section 7.3.3

Figure 5.10 LMs can be used for offline processing, which allows running additional validation of their outputs.
A diagram of a blue cylinder

AI-generated content may be incorrect.

Use the validation workflow to see how offline processing creates an opportunity to check generated outputs against a schema before deployment. section 5.2.3

How The Art of AI Product Development covers it

How deep it goes
Defines fields, entities, and relationships, then names enforcement approaches; stops short of detailed schema design or implementation code.
Examples
Uses predefined LM output formats and finance graphs linking regulations, companies, and market events.
What it assumes
Assumes familiarity with language-model applications, while introducing structured outputs and graph-based knowledge representation.
What you can do after
Apply it via function calling, constrained generation, Pydantic validation, or GraphRAG to produce more reliable structured results.
How it connects
Connects schemas to structured generation, function calling, validation, knowledge graphs, semantic search, and retrieval-augmented generation.

Also explained in

Compare how 44 books explain schema →

Related concepts

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