Companion videos

Structured outputs and function calling — companion videos

The article argues that "the LLM returns JSON" stops being a real claim until you have schemas, validators, retry policy, and a clear story for what happens when the model refuses or invents fields. These two talks are the cleanest case for that style of code: one is the original argument for type-driven LLM programming, the other is OpenAI's own walkthrough of how strict JSON-schema mode and function calling are supposed to compose in production.

Primary pick

17:55
Pydantic is all you need: Jason Liu

AI Engineer

The talk that crystallised the modern "define a Pydantic model, hand it to the LLM, let validation do the rest" pattern, with concrete examples of nested objects, validators that catch hallucinated URLs, and Chain-of-Thought as a typed field. Watch it before re-reading the article's section on validators and you will recognise where its retry and refusal rules come from.

What you should get from this: Learn why schema-first LLM calls need typed objects, validators, retries and explicit handling for malformed or hallucinated fields.

Watch or know first: Comfortable with Python and LLM API calls; Pydantic experience helps but isn't required.

AI Expert note: Kept as the origin of the schema-first pattern — watch it to see where the article's validator, retry and refusal rules come from, then implement with whatever structured-output tooling your stack uses.

Open video page

Also worth watching

40:39
OpenAI DevDay 2024 | Structured outputs for reliable applications

OpenAI

Walks through `strict: true`, the difference from old JSON mode, refusal handling, and how function calling and response-format schemas compose. Useful precisely because it describes the contract the API gives you, which is what the article's production patterns are built on top of.

What you should get from this: You can explain what strict mode guarantees, how it differs from old JSON mode, and how refusal handling fits the structured-output contract.

Watch or know first: Working knowledge of function calling and JSON Schema basics.

AI Expert note: Just under our view bar but canonical — the team that shipped strict mode describing the API contract the article's production patterns are built on.

Open video page