All writing
4 Nov 2025 · 1 min read
AI/Engineering

Schemas beat prompts

The shape of the output matters more here than clever prompt wording.

If your model can return prose sometimes, JSON sometimes, and a tool call sometimes — your client cannot trust any of them. So you write defensive parsers, fallback paths, and the dreaded try to extract a timeline from this paragraph regex. Each of these is a future bug.

Switching to schema-bound outputs collapses the surface area. The model returns a typed object or it errors. The client reads exactly one shape. Prose, when needed, becomes a derived view — generated from the same structured object, never the source of truth.

Define the shape before you write the words

I now design every model-call as a schema first. The prompt is a thin wrapper that names the schema and explains the task. If the schema feels awkward to write, the feature is wrong — and that's a useful signal much earlier than at integration time.

End · 4 Nov 2025
Next post
9 Sept 2025 · 1 min

The case for resumable pipelines

Why I think long-running workflows should be able to fail without sending you back to the beginning.