Module 3 of 6Lesson 2 of 2~15 min
Let the model say "I don't know" in the schema
A schema that forces every field to be filled pushes the model to make things up. This lesson helps you plan how to express missing or uncertain information, think about the order of fields and judge when a confidence score really helps and when it misleads the people relying on it.
Lesson objective
By the end of this lesson, you will be able to plan in a schema how to express missing information (null, "unknown" value, extraction status), choose the order of fields and judge the use of a confidence score.
Topics covered
- hallucinations
- null values
- confidence score
- schema design
In the glossary
Where it fits
Design the schema
Which fields, which types and which allowed values, and how do I let the model say "I don't know"?
Lessons in this module
- Write the spec of every field in the schema
- Let the model say "I don't know" in the schema (this lesson)
What you will learn in this module
This lesson is part of the course Get reliable, product-ready AI outputs (JSON, schemas, function calling)
- Design an output schema (types, enums, required fields, nullable fields, descriptions, "unknown" values) where every field serves a consumer.
Related courses
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Build an AI assistant for your product
3 hr
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Design a RAG architecture that fits your product
3 hr 30 min
- AI & ProductAdvancedRegular practice: you already use the tools or work on this topic.
Evaluate an AI feature: test sets, metrics and LLM judges
3 hr