PrepGenAICerts

The Reproduce-Inspect-Localize Procedure

Core

Isolate integration-layer failures from model-output failures · Difficulty 2/5

0%
isolation-proceduredebuggingstop-reasonroot-cause

Explanation

A Reliable Isolation Procedure

When a Claude application fails, a repeatable procedure isolates which layer owns the bug:

  1. Reproduce with the exact request that failed (same messages, params, tools, model).
  2. Inspect the raw response -- status code, `stop_reason, usage`, and the full content blocks -- *before* any of your post-processing runs.
  3. Localize:

- Error/non-2xx status → integration layer (request/transport). Check payload, auth, rate limits.

- 2xx but your code throws → parsing/validation layer. The model returned something; your consumer was too strict.

- 2xx, parses fine, but content is wrong → model-output layer. Now it's a prompt/context/model-fit problem.

Why Inspecting Before Post-Processing Matters

The raw response is the only reliable evidence. If you only ever look at your code's already-transformed view of the response, you cannot tell whether a problem originated in what the model actually sent or in how your code touched it afterward. Step 2 exists specifically to preserve that evidence before it's lost.

Common exam traps

  • Assuming that because your code raised an exception, the model must be at fault. A 200 status with a clean `stop_reason (e.g., end_turn`) means the model responded successfully -- a parse crash on top of that is your consumer being too strict, not the model being wrong.
  • Skipping reproduction and jumping straight to a fix based on the symptom alone, which risks fixing a coincidence rather than the actual failing request.

Key Takeaways

  • Reproduce with the exact failing request before attempting any fix
  • Inspect the raw response -- status, stop_reason, usage, content blocks -- before any post-processing runs
  • Non-2xx status localizes to the integration/transport layer; 2xx-but-throws localizes to parsing/validation; 2xx-and-parses-but-wrong localizes to model output
  • A 200 status with a clean stop_reason means the model responded; a parsing exception on top of that is on your consumer, not the model

Glossary Terms

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.