Principle 1 — Flat schemas beat nested schemas
**The pattern:** A flat schema with 5 top-level fields outperforms a nested schema with 5 fields organized 3 levels deep, even when the information content is identical.
**Why:** Per Instructor at jxnl.github.io/instructor and Pydantic's structured output research at docs.pydantic.dev, nested schemas force the LLM to track multiple levels of context simultaneously. Flat schemas reduce cognitive load + improve completion accuracy. Field accuracy on flat schemas is typically 10-25% higher than on equivalent nested ones.
**The fix:** Flatten where possible. `{user_name, user_email, user_signup_date}` beats `{user: {name, email, signup_date}}`. The minor verbosity loss is worth the accuracy gain.
**The exception:** When nesting genuinely models real structure (e.g., line items in an invoice — each line item has product + quantity + price as a unit), keep the nesting. Don't flatten into `line_item_1_product`, `line_item_1_quantity`, `line_item_1_price` — that's worse.