Keeping answers tight with explicit output contracts
Field Notes on Google Gemini

Keeping answers tight with explicit output contracts

Gemini's default instinct is to be thorough. Thorough and correct is a feature. Thorough and unreviewable is a cost you pay on every single response.

I noticed the pattern before I had a name for it: I’d ask Gemini something with a single clean answer, get back four paragraphs weighing considerations I hadn’t asked about, and end up doing more reading to extract the answer than I’d have spent writing the code myself.

That’s not a model failing at the task. It’s a model succeeding at a task I never actually specified. Ask a broad question and you get a broad answer; the thoroughness is doing exactly what thoroughness is supposed to do. The fix isn’t a better prompt in the sense of more polite phrasing. It’s specifying the shape of the answer before asking for its content, which is a different kind of instruction entirely.

An output contract is a shape, not a suggestion

The term I’ve landed on for this is an output contract: a short, explicit statement of exactly what form the answer should take, given before the actual question, treated as a hard constraint rather than a stylistic preference.

Concretely, that means stating the length limit as a number rather than a vibe, “under 100 words” rather than “be concise,” because “be concise” is exactly the instruction the model already believes it’s following when it gives you four paragraphs. It means stating the format explicitly: a single code block with no surrounding prose, a table with exactly these three columns, one sentence starting with either “yes” or “no.” And it means stating what to omit as plainly as what to include: no caveats, no alternative approaches, no explanation of the reasoning unless the reasoning was actually asked for.

The difference between asking a question and asking a question with a contract attached isn’t subtle once you’ve tried both back to back. The contracted version answers what was asked and stops. The uncontracted version answers what was asked, several things adjacent to it, and a disclaimer.

Why this matters more with Gemini specifically

Every model has some version of a default register, and Gemini’s leans further toward comprehensive by default than what I get from other tools at an equivalent prompt length, in my experience running the same tasks across a few of them side by side.

That’s not a criticism, comprehensive is frequently the correct choice, especially for genuinely open-ended or ambiguous requests where a terse answer would just be wrong. But it means the cost of skipping an explicit contract is higher here specifically: the same lazy prompt that gets you a usably tight answer elsewhere gets you a wall of caveated options here, and you pay the reading tax on every single response until you build the habit of specifying the shape upfront.

Where it earns its keep

The contract pays off most in the moments that repeat constantly through a working day: quick lookups where you already know roughly what you’re expecting and just need it confirmed or produced, not re-derived and explained.

“What’s the regex for a UUID v4, code block only, no explanation” gets you the regex. Without the contract you get the regex, a paragraph on what UUID v4 is, a note about version variations, and a caveat about case sensitivity you didn’t ask about and don’t need for this particular task.

It pays off just as clearly for anything you’re about to paste directly into code or a config file. An explicit “output only the function body, no markdown fencing, no explanation” saves you the manual cleanup step of stripping commentary and formatting out of the response before it can actually go anywhere.

Where it actively hurts

The contract is the wrong move for genuine exploration, and forcing brevity onto an ambiguous question doesn’t clarify the ambiguity, it just hides it, which is worse than leaving it visible.

If you’re not sure what the right approach is, asking for “one sentence, yes or no” doesn’t produce a well-considered decision. It produces a coin flip dressed up as one. The tight-contract habit is specifically for the moments where you already know the shape of the answer you need and just want it delivered without padding, not for the moments where you’re actually asking the model to help you think something through. Those are different jobs, and worth being honest with yourself about which one you’re actually doing before you clamp the output down.

The one-line version that changes the most

If I had to keep exactly one habit from all of this, it’d be stating the length as a hard number before asking the actual question, every single time the task has a knowable correct shape.

Not because word count is the deepest lever available. Because it’s the cheapest one, it costs a single clause tacked onto the front of a prompt, and it’s the lever that most reliably collapses “comprehensive and hedged” down to “the specific thing I asked for,” which is the entire difference between an answer you can use immediately and one you have to edit down before you can use it at all.

More field notes on Google Gemini

This piece is one entry in a running series on how AI coding tools change day-to-day engineering work. For more practical notes on Gemini specifically, browse the full set at /blog/tag/google-gemini/. For the wider view across every tool in the stack, the AI coding tag collects the whole archive in one place.

Get the next live webinar in your inbox

One email a month: the upcoming live event + free recording access for subscribers. No spam, unsubscribe anytime.