Skip to content
← All guides

Guide · Intermediate · 5 min

Prompt for debugging a production bug

Symptoms, scale, and what changed. Without those three the model is guessing in public.

What changed is the whole game

'It broke after we moved from Node 18 to Node 20 last Tuesday' cuts the search space more than any stack trace. Most production bugs are recent changes meeting old assumptions. If you know what moved, lead with it.

Give the rate, not just the error

'1 in 50 requests, at 200 requests per minute' points at a different cause than 'every request'. Intermittent means contention, pooling or timeouts; total means configuration. The frequency is diagnostic information and costs you one clause.

Ask for a confirmation step per hypothesis

Request causes ranked by probability, each with the one command or log line that would confirm it. This turns a wall of speculation into a checklist you can work through. Add 'ask for code you have not seen rather than guessing at it' — otherwise the model will happily invent your handler and debug the invention.

Try it

Give it symptoms, scale, and what changed. Aim for a score of 85+.

62structure

Target: 85. Keep working the prompt — the score moves as you type.

  • Role / persona: Open with a persona, e.g. "You are a senior backend engineer."
  • Constraints: State limits and do/don't rules, e.g. "Keep it under 200 words. Do not invent APIs."
  • Output format: Specify the exact shape, e.g. "Return JSON: { title, steps[] }" or "Use a markdown table.".