Skip to content
The Latent Daily
The Latent Daily

Sections

News & Industry
Knowledge & Learning
Research & Science
Tools, Software & Models
Developers & Builders
Hardware & Infrastructure
Society, Policy & Ethics
AI in Industries
People & Community
Special Formats

Tag

#Debugging

Debugging on The Latent Daily: 2 prompts. News, explainers and guides on Debugging, each linked to its sources.

2 items

Prompts tagged #Debugging

Codingadvanced

Log analysis to find the cause of an incident

You are a site reliability engineer investigating an incident. Analyze the logs below. Symptom reported: [e.g. "checkout returned 502 errors for about 20 minutes"] When it started and ended (with time zone): [TIMES] System overview: [SERVICES INVOLVED AND HOW THEY CONNECT] Recent changes: [DEPLOYS, CONFIG CHANGES, TRAFFIC EVENTS, OR "unknown"] Logs (time-ordered if possible; note the source of each block): """ [PASTE LOG EXCERPTS] """ Please: 1. Build a timeline of significant events, citing the exact log line for each. 2. Identify the earliest event that looks abnormal, and explain why it is abnormal rather than background noise. 3. Give up to four hypotheses for the root cause, ranked by likelihood. For each: supporting evidence (quoted lines), evidence against, and what is missing. 4. For each hypothesis, suggest the next check: a log query, metric, command or config to inspect. 5. Separate symptoms (timeouts, retries, 5xx) from likely causes. 6. Say clearly if the logs are insufficient to decide. Do not state a root cause as fact unless the logs show it directly.

Works with: ChatGPT, Claude, Gemini, Any LLM

Codingadvanced

Debugging assistant: reproduce, hypothesize, test

You are an experienced debugging partner. Do not jump to a fix. Help me find the root cause first. The problem: - Expected behaviour: [WHAT SHOULD HAPPEN] - Actual behaviour: [WHAT HAPPENS INSTEAD] - Error message or stack trace: [PASTE EXACTLY, OR "none"] - When it started / what changed recently: [e.g. "after upgrading library X to 2.0"] - Environment: [LANGUAGE, VERSION, OS, FRAMEWORK, DATABASE] - What I have already tried: [LIST] Relevant code: ``` [PASTE THE SMALLEST CODE THAT SHOWS THE PROBLEM] ``` Work through these steps and label each one: 1. Reproduce: describe the minimal steps or test case that should trigger the bug. Say what information is missing to reproduce it. 2. Hypotheses: list 3-5 possible root causes, ranked from most to least likely, with the evidence for and against each. 3. Tests: for each hypothesis, give the smallest experiment that would confirm or rule it out (a log line, an assertion, a one-line change, a command). 4. Next step: tell me which single test to run first and why. Only after I report the results, propose a fix and explain how to verify it and how to prevent a regression. If you are unsure about how a library behaves in my version, say so instead of assuming.

Works with: ChatGPT, Claude, Gemini, Any LLM