If you're building an AI agent, you've probably asked this: should I use structured outputs or tool calling to get data from the model? The answer matters more than most guides suggest. The wrong choice means brittle parsing, wasted tokens on unnecessary steps, or an agent that confidently hallucinates a JSON schema it never actually followed. I've run both patterns in production across dozens of agent workflows. This is the decision framework I use. The Two Patterns Structured Outputs You tell the model: "Respond in this exact format." You supply a schema (Pydantic, JSON Schema, or a system prompt describing fields), and the LLM produces a single response that matches. from openai import OpenAI from pydantic import BaseModel class WeatherResponse ( BaseModel ): city : str temperature_c : float condition : str wind_kmh : float summary : str client = OpenAI () response = client . beta . chat . completions .…