Quality and cost

Structured outputs make Claude agents callable by software

If downstream code cannot parse the answer, you do not have an integration. Use schemas, validate, and eval the JSON, not the vibe.

Structured output means Claude returns data that software can parse: JSON that matches a schema, not a paragraph that happens to contain a number. Chat UIs can live on prose. Production agents cannot. The next hop is your API, your queue, your warehouse.

We treat schema failures as test failures. "It usually looks right" is how silent writes go missing.

What to structure

  • Tool arguments
  • Decision records (action, confidence, citations)
  • Extraction from documents
  • Eval labels when a judge model is involved

Leave the user-facing sentence optional and generated after the structured object exists. Do not parse English to recover fields you could have asked for.

Validate in your process, not in the prompt

The prompt can remind Claude of the schema. Your code must reject invalid payloads, retry with a repair pass, or queue a human. See tool schema design and CI eval gates.

Why this also cuts spend

Structured answers are shorter and more cache-friendly than essays. They reduce retries. They make cost per successful task a real number because "success" means "parsed and passed assertions."

If your agent still delivers markdown that a junior then copy-pastes into Salesforce, you do not have an agent. You have a typing assistant. The eval harness engagement is often the fastest way to make that obvious with evidence.

Related notes