Explore Library
AI Engineering / Working with LLMsStructured Outputs & Parsing

65 items

1

Stripping code fences with strip()

Code Quiz
2

Nested Pydantic Model Field Bug

Code Quiz
3

Handling Pydantic ValidationError

Code Quiz
4

Enabling Strict Mode

Code Quiz
5

Parsing a List of Items

Code Quiz
6

Constrained Enum Value Field

Code Quiz
7

additionalProperties for Strict Schemas

Code Quiz
8

Casting Field Types After Parsing

Code Quiz
9

Required vs Optional Fields

Code Quiz
10

Schema Design Best Practices

Slides / Video
11

Streaming and Parsing Partial Structured Output

Slides / Video
12

Retry and Repair Strategies

Quiz
13

Validating Against a Schema

Quiz
14

Handling Malformed JSON

Quiz
15

What Structured Output Means

Quiz
16

Parsing the Returned JSON String

Quiz
17

Pydantic for Output Definition

Quiz
18

Defining a JSON Schema

Quiz
19

Why Structured Outputs Matter

Quiz
20

Schema-Enforced Structured Outputs

Quiz
21

JSON Mode / Response Format

Quiz
22

Constraining with Enums

Quiz
23

Streaming Partial Outputs

Quiz
24

Limitations of Structured Outputs

Quiz
25

Extracting into Typed Objects

Quiz
26

Common Output Formats

Quiz
27

Extracting Structured Data from Text

Slides / Video
28

Nested and Complex Structured Schemas

Slides / Video
29

Enums for Classification Fields

Slides / Video
30

Retry and Reprompt on Parse Failure

Slides / Video
31

Handling Malformed or Incomplete JSON

Slides / Video
32

Validating Parsed Output Against a Schema

Slides / Video
33

Parsing Streamed JSON Output

Code Quiz
34

Retry Loop on Parse Failure

Code Quiz
35

Field Descriptions for Extraction

Code Quiz
36

Using create instead of parse

Code Quiz
37

Catching a nonexistent JSON exception

Code Quiz
38

JSON object mode missing keyword

Code Quiz
39

Reading content instead of parsed

Code Quiz
40

JSON schema response_format structure

Code Quiz
41

Pydantic field annotation mistake

Code Quiz
42

json.loads on the wrong value

Code Quiz
43

Parsing Model JSON in Code

Slides / Video
44

Constrained Decoding Basics

Slides / Video
45

Pydantic Models for Output Structure

Slides / Video
46

Validating Parsed Output

Flashcard
47

Pydantic Models for Schemas

Flashcard
48

Constrained Decoding Basics

Flashcard
49

Handling Malformed JSON

Flashcard
50

Retry and Repair Strategies

Flashcard
51

Extracting Data from Unstructured Text

Flashcard
52

Enums and Constrained Values

Flashcard
53

Nested and Complex Structures

Flashcard
54

What Structured Outputs Are

Flashcard
55

Defining a JSON Schema

Flashcard
56

Native Structured Output Features

Flashcard
57

JSON Mode vs Free-Text Output

Flashcard
58

Defining Output Schemas with JSON Schema

Slides / Video
59

Structured Generation Failure Modes

Flashcard
60

Parsing Partial Streamed JSON

Flashcard
61

JSON Mode vs Function Calling vs Prompt

Flashcard
62

Token Cost of Schemas

Flashcard
63

Non-JSON Structured Formats

Flashcard
64

JSON Mode vs Strict Structured Output

Slides / Video
65

Why Structured Outputs Matter

Slides / Video
FlashcardIntermediate

Nested and Complex Structures

Schemas can nest objects and arrays to represent complex hierarchical data.

Question

How do schemas represent nested or complex object structures?

Click to reveal answer