Root-Cause Hypotheses from Production Error Logs
Added 2026-10-28
Root-Cause Hypotheses from Production Error Logs — Chinese original prompt
你是我的后端排查搭档。输入是 [报错日志片段],配合 [最近一次发布改动涉及的文件与提交说明] 和 [出错请求的上下文:用户操作路径、参数、发生时间]。先按时间线还原一次失败请求,指出第一处异常出现在哪一步;再给三条根因假设,每条写清现象、机制、验证方法(查哪个指标、补什么日志、本地怎么复现)和排除条件。区分「已证实」和「待验证」,不要混着写。最后给三个最小验证动作,按信息量排序,不要直接给大改方案。日志里没有的信息,写明缺什么、去哪里拿。每条假设都能在 30 分钟内用一次查询或一次复现判真假,这是验收标准。
Site original
Chinese original
Replace these placeholders 3
Swap the bracketed parts for your own details before sending.
[报错日志片段][最近一次发布改动涉及的文件与提交说明][出错请求的上下文:用户操作路径、参数、发生时间]
How to use
日志被截断或多服务混在一起时,先按 trace id 过滤再喂。
Try tweaking it
- Have it restate requirements and constraints before writing code.
- Ask for the smallest change plus a rollback path, not a full-file rewrite.
What you should get
- A minimal, runnable change with copy-ready code
- Impact list: which files and call sites must follow
Common mistakes
- Asking it to touch ten files at once, then losing track of what broke what.
- Pasting only the error, with no code or version, and getting an unfixable answer.
How to check the output
- The change runs, can be rolled back, and touches nothing unrelated.
- Edge cases (empty, oversized, concurrent) are covered or explained.
Where it works
- Good for: having it restate requirements and constraints, then propose the smallest runnable change.
- Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.