Skip to main content
When you give an LLM an ambiguous request, it doesn’t pause to ask — it picks an interpretation and runs with it. The result is code that confidently solves the wrong problem. Think Before Coding is the principle that forces explicit reasoning before any implementation begins: surface assumptions, present alternatives, push back when the approach is wrong, and stop when something is genuinely unclear.

The four rules

1

State assumptions explicitly

If the request is ambiguous, name what you’re assuming before writing a single line. If uncertain, ask rather than guess.
2

Present multiple interpretations

When more than one valid reading exists, list them with tradeoffs. Don’t pick silently and hope for the best.
3

Push back when warranted

If a simpler approach exists, say so. If the requested approach will cause problems, name them.
4

Stop when confused

Name what’s unclear and ask for clarification. Proceeding while confused produces expensive mistakes.

Hidden assumptions example

Request: “Add a feature to export user data”
What LLMs do wrong — silently assuming scope, format, and fields
This code assumed: export all users (what about pagination, privacy?), a local file destination, specific fields to include, and CSV fieldnames without checking the actual data structure.
The correct approach — surface every assumption before writing code

Multiple interpretations example

Request: “Make the search faster”
What LLMs do wrong — pick one meaning silently and over-optimize
The correct approach — present each interpretation with effort estimates

When this principle is working

You’ll know Think Before Coding is active when you see:
  • Clarifying questions arriving before implementation, not after a wrong-direction commit
  • Multiple approaches presented with tradeoffs rather than a single confident solution
  • Explicit “I’m assuming X — is that right?” notes in responses
  • The LLM declining to proceed when the request is genuinely ambiguous
These guidelines bias toward caution over speed. For trivial tasks — obvious one-liners, simple typo fixes — use judgment. Not every change requires the full clarification ritual.