Course Objective & Scope
When LLM output feeds another system, database or workflow, free text is not enough: you need schema-compliant, verifiable data. The course covers JSON Schema design, OpenAI Structured Outputs strict mode, schema-bound output via tool use in Anthropic models, Gemini response schemas, type-safe models with Pydantic and Zod, and the Instructor library.
For open-weight models, constrained decoding is applied with vLLM guided decoding, Outlines and XGrammar. Participants build an extraction and classification pipeline on invoice, contract or form samples from their organisation and measure its error rate.
Who Should Attend?
- Backend developers integrating LLM output into applications
- AI engineers on document processing and data extraction projects
- Data scientists using LLMs for classification and labelling
- Prerequisite: Python or TypeScript and basic LLM API usage
Key Takeaways
- Design LLM-friendly JSON Schemas and Pydantic/Zod models for a use case
- Configure structured output features correctly across providers
- Apply constrained decoding with open-weight models
- Build retry and repair loops that catch validation errors
- Create an eval set that measures extraction accuracy per field
Curriculum
Why Structured Output?
- Free text vs JSON mode vs strict schemas
- Typical use cases: extraction, classification, routing
Schema Design with JSON Schema and Pydantic/Zod
- Impact of enums, required fields, nested objects and descriptions
- Schema design patterns that improve model quality
Structured Outputs Across Providers
- OpenAI strict mode, Anthropic tool use, Gemini response schema
- Provider-agnostic usage with Instructor
Constrained Decoding with Open-Weight Models
- vLLM guided decoding, Outlines and XGrammar
- Quality and speed impact of grammar-based generation
Validation, Repair and Error Handling
- Retry and re-ask strategies on validation errors
- Modelling refusals, missing information and uncertainty
Hands-On: Document Extraction Pipeline
- End-to-end extraction on organisational documents
- Per-field accuracy measurement and error analysis
Other Courses in This Category
-
LLM Tool Use and Function Calling
How to let LLMs safely call APIs, databases and internal systems via tool/function calling: tool schema design, parallel calls, MCP servers, error handling and permission boundaries.
- Live Course
- 6 modules
-
Prompt and Context Architecture for LLM Applications
Context engineering for LLM applications: designing how system prompts, templates, few-shot examples, retrieved content, memory and tool definitions fill the context window, with versioning and eval-driven iteration.
- Live Course
- 6 modules
-
Long-Context LLM Engineering and Context Window Management
Solving lost-in-the-middle degradation, KV cache cost and latency in large context windows through context compression, hierarchical memory, prompt caching and needle-in-a-haystack evaluation.
- Live Course
- 6 modules
-
Model Routing and Multi-Model Architecture Design
Engineering programme on dynamic model routing, cascades, fallbacks and LLM gateways to balance quality, cost and latency across frontier and small models without single-provider lock-in.
- Live Course
- 6 modules
-
Building Multimodal LLM Applications: Vision, Documents and Audio
Hands-on programme for building multimodal LLM applications that process images, scanned documents, charts, audio and video using frontier VLM APIs, open-weight vision models and structured extraction.
- Live Course
- 6 modules
-
Mixture of Experts (MoE) LLMs: Architecture, Serving and Fine-Tuning
Advanced programme on sparse Mixture of Experts (MoE) LLMs, covering gating networks, active vs total parameters, VRAM sizing, expert parallelism in vLLM/SGLang and MoE fine-tuning.
- Live Course
- 6 modules
Get in touch