AI-Assisted Troubleshooting
Use AI as a disciplined troubleshooting partner: a systematic method, prompting patterns for hypotheses and safe checks, guardrails for production, handling sensitive data, evaluating AI assistance, and the limits of automation and AIOps.
Introduction
During an incident, an engineer pastes an error into an AI assistant and receives a clear, confident explanation and a command to fix it. Sometimes the answer is exactly right and saves an hour. Sometimes it is a coherent story about the wrong cause, and the suggested command deletes the evidence or makes the outage worse. The difference lies not in the AI but in the discipline of the person using it.
This lesson combines the troubleshooting method with AI assistance: how to get fast, useful hypotheses; how to test them safely; which guardrails protect production; and where automation helps and where it must not act alone.
Learning Objectives
- Apply a systematic troubleshooting method that AI assists but does not replace.
- Provide AI with the right evidence in the right form.
- Use prompts that produce ranked hypotheses and safe, read-only checks.
- Set guardrails for AI use in production operations.
- Protect sensitive data when using AI with telemetry.
- Evaluate how well AI assistance performs for your team.
- Understand the promise and limits of AIOps and automated remediation.
1. The Method Comes First
Troubleshooting is the repeated cycle of observe, hypothesize, test, and act. AI accelerates some steps; it cannot skip any of them.
1
2
3
4
5
6
7
8
1. Define the problem precisely: what is wrong, for whom, since when?
2. Gather evidence: metrics, logs, traces, recent changes, status of
dependencies.
3. Form hypotheses: what could explain all of the evidence?
4. Rank them by likelihood and by cost of testing.
5. Test the cheapest, most informative hypothesis with a safe check.
6. Mitigate when the evidence supports an action; verify the effect.
7. Record what you learned.
The questions that most often crack a problem are simple: What changed? (a release, a configuration, traffic, data, a dependency). What is different between what works and what does not? (a version, a tenant, a region, a file type). When exactly did it start? and What does the evidence rule out?
AI adds value in steps 2 through 4: reading large volumes of evidence, recalling many possible causes, and organizing hypotheses. It adds little in step 1 (it does not know what is wrong for your users) and must not own steps 5 and 6.
2. What AI Is Good and Bad At in Troubleshooting
| Good at | Poor at |
|---|---|
| Summarizing many log lines and finding groups | Knowing the real state of your system now |
| Recalling known failure patterns of common technologies | Understanding your specific architecture and history unless told |
| Explaining unfamiliar errors and configuration | Distinguishing correlation from cause |
| Writing queries for logging and metrics tools | Counting precisely; reading timestamps and time zones reliably |
| Listing hypotheses systematically, including unlikely ones | Admitting uncertainty without being prompted |
| Drafting runbook steps and status updates | Judging the risk of a change in your production system |
| Translating between tools and query languages | Noticing what is missing from the evidence |
Models are prone to anchoring on the first plausible story and to fitting the evidence to it, and they will sound equally sure whether they are right or wrong. Counter this deliberately: ask for several hypotheses, for evidence against each, and for the check that would disprove the leading one.
3. Give the AI Good Evidence
Output quality follows input quality. A useful evidence package is short and structured:
- The symptom, precisely: what users see, how many, which tenants, which versions, since when. Include what is not affected.
- The timeline of changes: releases, configuration, flags, infrastructure, dependency incidents.
- Metrics: before and during, summarized (rates, error categories, percentiles, queue age), not thousands of raw points.
- Representative logs and traces: a normal example and an affected one, with identifying details redacted.
- Architecture context: a few lines on the components and dependencies involved, and known limits.
- What has been tried and the result of each attempt.
Avoid dumping everything. Pre-filter with your tools: group errors by category, take samples, and state the counts yourself. The model works better on a curated view, and you stay in control of what leaves your environment.
4. Prompting Patterns
The hypothesis generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Act as an experienced site reliability engineer helping to
troubleshoot a live problem. You are an advisor; a human decides and
acts.
Evidence (redacted):
- Symptom and scope: [paste]
- Timeline of changes: [paste]
- Metric summary before and during: [paste]
- Representative log lines (normal and affected): [paste]
- Architecture notes and dependencies: [paste]
- Already tried and results: [paste]
Tasks:
1. List up to five hypotheses ranked by how well they fit ALL the
evidence. For each: the supporting evidence, the evidence that
does not fit, and what you would expect to see if it were true.
2. For each hypothesis, give one safe, read-only check (a query, a
dashboard, a log search) that would confirm or reject it, and what
each result would mean.
3. Say which single check gives the most information soonest.
4. List what additional data would narrow the field.
Do not recommend changes to production in this step. Do not state a
cause as certain. Say "unknown" where the evidence is silent.
The devil’s advocate. After the leading hypothesis emerges: “Assume this hypothesis is wrong. What else could explain the evidence, and what observation would distinguish them?”
The change analyzer. “Given this list of changes in the hour before the problem began, rank which is most likely related, and why; list what in the evidence would exonerate each.”
The query writer. “Write a query for [tool] to count error events by category and version for the last two hours, grouped in five-minute intervals.” Then read the query, test it on a small range, and check the counts.
The mitigation reviewer (only after evidence supports a direction): “I intend to [action]. What are the risks, what could it break, how do I verify that it worked, and how do I undo it? What should I capture first?” The model’s answer is input to a human decision, checked by a second person for risky changes.
The explainer. “Explain this error message and what components typically produce it.” Good for unfamiliar technologies; verify against official documentation.
5. Guardrails for Production
Write these as team rules, and put them where responders will see them.
- AI advises; humans act. No AI tool receives write access to production by default. Any change is made by a person, through the normal audited access.
- Read-only first. Hypotheses are tested with read-only checks before any change.
- Understand before you run. Never execute a command or script you do not understand. Know what it does, on what, and how to undo it.
- Second pair of eyes for risky actions: deletes, restarts of stateful components, schema or data changes, scaling to zero, and anything irreversible. For SEV1 incidents, the incident commander approves.
- Capture evidence before destroying it: snapshots, logs, and current state before restarts or rollbacks.
- One change at a time, recorded in the timeline with the reason and the result.
- Verify against the signal that detected the problem, not against the AI’s assurance.
- Time-box AI-led exploration. If suggestions have not led to a confirmed finding within an agreed time, escalate to a human expert.
- Record AI contributions in the incident timeline: what was suggested, what was done, what the outcome was. This builds the evidence for how useful it is.
- Use approved tools and data rules. See the next section.
6. Protect Sensitive Data
Operational data is rich in sensitive information: personal data in logs, tokens in headers, customer content in payloads, internal hostnames and architecture in traces. Sending it to an external tool is a disclosure.
- Use approved tools, with agreed terms about retention and training use. A personal account of a public chatbot is not approved.
- Redact before sharing: remove or replace secrets, tokens, credentials, personal data, customer content, and unnecessary internal identifiers. Prefer an automated redaction step in a helper script to manual care at 3 a.m.
- Share less: counts and samples instead of raw dumps.
- Never paste secrets in any circumstance. If you find one in the evidence, treat it as compromised (the security course) and rotate it.
- Respect customer commitments and legal limits on where data may go.
- Prefer in-environment or privately hosted tools for sensitive investigations, if available.
Make the redaction habit part of the runbook for AI-assisted troubleshooting, and test it as you test any control.
7. Worked Example
Situation. At 10:20, imports for several tenants take far longer than usual. API errors are normal. Release 0.1.5 went out at 09:40 with a database migration.
Evidence the engineer collects (summarized, redacted): import duration p95 rose from 4 minutes to 19 minutes beginning around 09:50; queue age is growing; worker CPU is low; provider latency is normal; database CPU is high; one slow query, the insert for imported rows, now dominates the traces; the migration added a column and an index the day before; row counts per import are unchanged.
The AI offers four hypotheses:
- The new index slows inserts (supported: slow insert span, timing). Check: compare insert latency per row before and after; look at index size and lock waits.
- A missing or ineffective index on a new query path. Evidence against: the slow span is an insert, not a read.
- Provider slowdown. Evidence against: provider latency is normal.
- Database resource saturation unrelated to the release. Check: connections, I/O, and other consumers.
The engineer runs the read-only checks for 1 and 4, finds that the insert latency rose after the release and that database I/O is not saturated, and concludes the index is the likely cause. The mitigation reviewer prompt lists risks of dropping an index on a live table; the IC and the database specialist agree to revert the release’s schema change with the expand and contract plan, and verify with the import duration metric. The postmortem later adds a performance test with realistic row counts to the migration rehearsal.
Notice what the AI did (generated and organized hypotheses and checks) and what people did (collected evidence, ran checks, judged risk, decided, verified).
8. Evaluate AI Assistance
Do not assume it helps; measure it.
- Record outcomes: for each incident or investigation where AI was used, note whether its hypotheses were correct, misleading, or irrelevant, and whether it saved or cost time.
- Review failures: where did it send the team in the wrong direction? Which prompts or evidence formats worked best?
- Track misses: causes the AI did not list that people found.
- Adjust: improve prompts, supply architecture context from a maintained summary, restrict use in situations where it misleads.
- Train the team: include AI-assisted exercises in game days, with deliberately misleading symptoms, so that people practice skepticism.
A short quarterly review of AI use in operations belongs in the improvement process (lesson 9).
9. AIOps and Automation: Promise and Limits
Vendors offer “AIOps” and automated remediation. Many features are valuable:
- Anomaly detection that flags unusual metric behavior.
- Alert correlation and deduplication that groups related alerts.
- Log clustering that groups similar errors and highlights new ones.
- Change correlation that points to recent changes near an onset.
- Capacity forecasting.
- Automated, tightly scoped remediation for well-understood, reversible, low-risk situations (restart a crashed worker, rotate a log file).
Use them with the same discipline:
- Start in advisory mode, where the system suggests and humans decide. Promote to automatic action only for narrow, well-understood cases with measured accuracy.
- Keep automation bounded: rate limits, maximum scope, automatic stop on repeated failure, and an easy human override.
- Test it: inject failures and verify that the automation behaves.
- Watch for false positives: anomaly detection often flags unusual-but-fine behavior; tune and measure.
- Monitor the automation itself, log what it does, and review its actions.
- Do not hand over judgment. Decisions about customer impact, data, security, and irreversible actions stay with people.
- Keep skills alive: if automation handles everything routine, people lose the practice they need when it fails. Rehearse manual procedures.
A good test of an automated action: “If this runs wrongly at 3 a.m. with nobody watching, what is the worst outcome, and can we live with it?”
10. Practical Exercise
For SignalDesk (or your project):
- Write the team’s rules for AI use in operations, covering guardrails, approved tools, redaction, and recording.
- Build a small redaction helper or checklist for logs and traces, and test it with fake secrets and personal data.
- Create three prompts in the library: the hypothesis generator, the change analyzer, and the mitigation reviewer, adapted to your architecture, with a maintained architecture summary to include.
- Run a staged exercise in a non-production environment: inject a fault (slow provider, a bad configuration, a poison message), and have one person troubleshoot with AI assistance and another without; compare time, accuracy, and dead ends.
- Inject a deliberately misleading symptom, and note whether the AI or the humans were misled.
- For each AI suggestion in the exercise, record whether it was correct, misleading, or irrelevant.
- Decide which parts of your monitoring could use correlation or clustering features, and which remediation, if any, is safe to automate; define scope, limits, and override.
- Update the guardrails and the prompt library with what you learned.
Verification
You are ready to continue when:
- The team has written rules: AI advises, humans act, read-only first, one change at a time, second review for risky actions.
- Redaction exists, was tested, and is part of the routine.
- Prompts ask for ranked hypotheses with disconfirming evidence and safe checks, and prohibit stating causes as fact.
- An exercise measured how AI assistance affected speed and accuracy, including where it misled.
- Any automation is bounded, observable, reversible, and starts in advisory mode.
- The team can explain which decisions are never delegated.
Key Takeaways
- A systematic method comes first; AI speeds up evidence reading and hypothesis generation.
- Curated, redacted evidence yields better and safer answers than raw dumps.
- Ask for multiple hypotheses, disconfirming evidence, and read-only checks; treat each answer as a hypothesis.
- Guardrails keep the human in charge of every change to production.
- Measure whether AI assistance helps your team, and automate only narrow, reversible, monitored actions.
What’s Next?
Fixing incidents one by one is not enough. The next lesson covers continuous improvement: turning data, incidents, and toil into a prioritized, regularly reviewed program that makes the service steadily more reliable.