Diagnose Why an Agent Keeps Failing in Production
Analyze an agent's failing traces to classify root causes — prompt, tools, model, or data — and prescribe the highest-leverage fix.
Turn a pile of bad runs into a ranked list of root causes and concrete fixes instead of guessing what to tweak.
At a glance
Access
Free prompt
Open to copy — no account or payment needed.
Prompt objective
Turn a pile of bad runs into a ranked list of root causes and concrete fixes instead of guessing what to tweak.
Real use case
An agent's success rate dropped from 90% to 70% after a model upgrade. The team has 30 failing transcripts but no idea which knob to turn.
Customize these fields first
Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.
Prompt
Act as an AI agent reliability analyst. I will give you failing runs; classify the root causes and prescribe fixes. Agent purpose: [PURPOSE] What "success" means: [DEFINITION] Failing runs (each with input, agent steps/tool calls, final output, and why it was wrong): [PASTE 5-30 TRANSCRIPTS] Analyze: 1. Classify each failure into a root-cause category: prompt/instruction gap, tool error or bad tool description, missing/incorrect context or retrieval, model limitation, or user-input problem. 2. Tally the categories and rank them by frequency and impact. 3. For the top 2-3 categories, give the specific fix (exact prompt edit, tool-description change, retrieval fix, guardrail, or model/setting change) and the failing runs it would resolve. 4. Estimate expected lift and any risk each fix introduces. 5. Recommend one eval to add so this class of failure is caught automatically next time. Be concrete and evidence-based — cite specific runs. Avoid generic advice.
Open directly in an AI — the text is pre-filled:
How to use this prompt
- 1Replace the key placeholders first: PURPOSE, DEFINITION, PASTE 5-30 TRANSCRIPTS.
- 2Replace any bracketed placeholders like [this] with your own context.
- 3Add extra background information when you want more tailored results.
- 4Combine multiple prompts in one conversation when you need a richer output.
- 5Save your best-performing prompts so they are easy to reuse later.
Next best step
Open the guide first, then branch only if you still need more.
A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.
If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.
Related prompts
View allBuild an Eval Suite for an Agent Before You Trust It
Create a structured evaluation set with test cases, scoring rubric, and pass thresholds so you measure an agent instead of vibe-checking it.
Best for
Replace "it seems to work" with repeatable evals that catch regressions when you change the prompt, model, or tools.
Add Guardrails Before an Agent Gets Write Access
Design layered guardrails — input filters, action confirmation, output checks, and kill switches — for an agent that can take real actions.
Best for
Make an action-taking agent safe to deploy by adding controls around what it can do, when, and with what oversight.
Explore other prompt categories
Move sideways into adjacent libraries when the current category is not the full answer.
Every prompt here is free. The course teaches the thinking behind them.
Copy as many prompts as you like. When you want to move from single prompts to a repeatable AI workflow, Learn AI in 30 Days walks through it, one day at a time.
Buy the course once ($15/$20 by length), or go all-access for $10/mo with a verifiable certificate.