CertPrep
Domain 4 · Lesson 4.5 · 8 min read

Isolating Root Causes from Logs and Traces

Exam skillRoot-Cause Isolation from Logs and Traces

Isolating the root cause of a failing Claude system from its logs or traces among prompt failure, retrieval failure, hallucination, tool or subagent error, and model mismatch, and specifying the corrective action.

Read a failing system's logs and traces to tell prompt failures, retrieval failures, hallucinations, tool or subagent errors and model mismatches apart, and apply the corrective action that fits the cause.

What you need to know

When an AI system misbehaves, the tempting fix is the biggest lever: a new model, a longer prompt. The exam rewards the opposite habit: classify the failure first, then apply the smallest fix that addresses its cause.

A failure taxonomy

FailureWhat you seeTypical causeFirst action
Prompt failureInconsistent format or behaviour; the model does something reasonable but not what was wantedAmbiguous or missing instructionsMake the instruction specific; add an output contract or examples
HallucinationFluent, confident, unsupported facts (prices, dates, policy terms, citations)The model was not given the facts, or not told to rely only on themGround it: tool call or retrieval for the facts; allow "I don't know"; require citations
Retrieval failureAnswers based on the wrong passage, or "not found" when the answer existsChunking, index or filter problemsInspect what was retrieved; fix chunking, filters or index type
Model mismatchConsistently shallow or incomplete work on hard cases; fine on easy onesTier too small for the task (or too slow or costly for it)Evaluate another tier on the failing slice
Context problemQuality degrades late in long sessions; truncated outputsCluttered or overflowing contextTrim, compact, or split the work (lesson 2.4)
Orchestration failureIncomplete reports, missing pieces, silent gaps in multi-agent outputA subagent failed and synthesis carried onTrace across agents; validate results; reconcile coverage
Integration failureErrors, timeouts, empty tool results treated as answersDownstream outage, bad tool error handlingRetries, clear tool errors, fallbacks

Diagnose from evidence

  • Read the trace, not the summary: what was in the context, which tools ran, what they returned, what the stop reason was. A response cut off at the output limit is not a reasoning problem.
  • Find the slice. Does it fail on all inputs or a category (long documents, one product line, one language)? A slice-specific failure points to data, retrieval or model fit; a universal one points to the prompt or configuration.
  • Check what changed. Prompt version, model version, index refresh, tool change. Most sudden regressions follow a change.
  • Reproduce, then fix, then add a test. Every diagnosed failure becomes a case in the golden dataset.

Walk the trace in order

A trace records each step of a request. Read it from the first step to the last and stop at the first step whose output is already wrong; that step holds the root cause, and every later step only inherits the error.

  1. Input and prompt: which prompt version and instructions the model received.
  2. Retrieval: which passages came back, and whether the one holding the answer was among them.
  3. Tool and subagent calls: each call's arguments, status and result, including errors that were swallowed and empty results treated as answers.
  4. Model output: the stop reason, and whether each claim is supported by something earlier in the trace.
  5. Model and configuration: which model version served the request, and whether it matches the one the evaluation tested.

In the exam

Root-cause items give you logs or a trace from a failing system and ask what caused the failure and what to do. Classify it as a prompt failure, a retrieval failure, a hallucination, a tool or subagent error, or a model mismatch, using the evidence: what was retrieved, what each tool returned, the stop reason, which slice fails, which model version served it and what changed recently. Then pick the corrective action for that cause. A model change is rarely the first answer, and a fix applied downstream of the failing step does not hold.

Check your understanding

Question 1

An assistant states a product warranty of 5 years; the real warranty is 2. Logs show no warranty passage was retrieved for the question. What type of failure is this, and what is the first fix?

Show answer

Answer: B. The model filled a gap it should not have had. Getting the right passage into context, and permitting an honest "not found", addresses the cause.

Question 2

Reports from a multi-agent research system sometimes omit whole topics, with no error raised. What should be checked first?

Show answer

Answer: A. Silent gaps in multi-agent output usually mean a subagent failed and synthesis carried on. Tracing and coverage reconciliation find and prevent that.

Question 3 · select 2

Summaries end mid-sentence on long documents. Which TWO checks come first?

Show answer

Answer: B, C. Truncation is usually an output limit or a full context window, both visible in the stop reason and token usage. It is not a prompting or retrieval issue.

Apply it: Triage Prairie State's first month

Exercise · about 15 minCase: Prairie State Mutual

Prairie State's intake system has been live for a month. The operations team reports four problems:

  • (a) Some acknowledgements tell customers their excess is $500 when their policy says $1,000.
  • (b) About one claim in fifty is created with no date of loss, although the email clearly gives one.
  • (c) After a prompt update last Tuesday, acknowledgements became noticeably longer and more formal.
  • (d) Extraction quality is fine on emails and web forms but poor on scanned mail.
  1. Classify each problem using the taxonomy, with the evidence you would look for to confirm it.
  2. Give the first action for each.
    Done when: no first action is "switch to a bigger model" without evidence.
  3. Say how each fix is protected against coming back.
Check your work
Show model answer
ProblemClassificationEvidence to checkFirst action
(a) Wrong excessHallucination: excess is not in the claim, so the model filled it inTrace shows no excess value from Policy Admin in the contextRemove excess from the drafted text, or insert it from Policy Admin by code
(b) Missing date of lossPrompt or schema failure, possibly an extraction edge caseCompare the failing emails: are dates written in words, or relative ("last Friday")?Specify date handling and relative dates in the prompt with examples; make the field required in the schema and route failures to a handler
(c) Longer, formal acknowledgementsPrompt failure from a changePrompt version in the logs changes on TuesdayRoll back or fix the prompt; add tone and length checks to the evaluation
(d) Poor on scanned mailInput-quality or model-fit problem on one sliceCompare OCR output to the scans; check confidence by channelImprove OCR first; if the text is good and extraction still fails, evaluate a stronger tier for the scanned slice only

Protection. Each failing case goes into the golden dataset under its own slice (policy facts in drafts, relative dates, tone, scanned mail). Code checks block any acknowledgement that contains a policy figure not supplied by Policy Admin, and the evaluation runs on every prompt change before release.

Key termsGroundingHallucinationObservabilityStop reason

Sources