Soft directives like 'be brief' are surprisingly weak (~30-50% non-compliance); max_tokens is hard but truncates mid-sentence. Combine both and eval the output-length distribution.
Picture asking a chatty friend to keep their answer short. They mean well, but they get carried away and ramble for a full minute anyway. Now picture setting a kitchen timer for 30 seconds; the timer cuts them off, but often mid-word. The answer is to do both: ask for brevity AND set the timer, with the timer set generously enough that they finish their sentence on normal questions but get cut off on truly runaway ones. Then check a recording of ten real conversations to see if the strategy is actually working.
Detailed answer & concept explanation~4 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: why soft directives leak + how max_tokens truncates + the soft+hard combo + structured output guarantee + the length-distribution eval pattern.
Real products, models, and research that use this idea.
- Voice assistants like Alexa and Google Assistant cap responses tightly because text to speech latency scales with length; they layer prompt directives with hard caps and tight evaluation.
- GitHub Copilot Chat uses soft brevity directives in its system prompt and a generous max_tokens, then eval-checks response length against UX guardrails.
- Customer-support copilots running on Claude Opus 4.7 and GPT-5.5 typically pair 'answer in under 3 sentences' with max_tokens around 300 to allow graceful endings.
- Production teams running OpenAI Structured Outputs or Anthropic's tool-use schema avoid raw max_tokens entirely for JSON returns; the schema constrains decoding and guarantees a complete object.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy do instruction-tuned models systematically over-produce length even when told to be brief?
QHow would you guarantee a JSON response fits within a strict size budget?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Relying on 'be brief' alone and being surprised when production outputs run 3x longer than asked; the directive shapes intent, not behavior, and 30-50% of responses ignore it.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.