Prompt Engineering in Practice · Structured Outputs and Function Calling
Strict Mode and Constrained Decoding
Structured Outputs and Function Calling
Introduction
How does constrained decoding technically work at the token level? What does OpenAI strict mode guarantee, and what doesn't it? Differences between OpenAI strict, Anthropic tool_use, Gemini responseSchema and open-source (Outlines, guidance, llama.cpp). Edge cases, performance, cost, security implications.