Logo Agent Bad Response Triage And Root Cause Classification

Agent Bad Response Triage And Root Cause Classification

Cộng đồng
selvarajmurugesan90
agent-bad-response-triage-and-root-cause-classification

Guides triaging a single reported bad, wrong, or harmful agent response: reproducing it deterministically and classifying the root cause into one of five buckets — prompt issue, tool failure, retrieval issue, model behavior change, or genuine edge case — so the fix targets the actual cause instead of the symptom. Use when a user asks to "investigate this bad agent response," "why did the agent say/do that," "triage this reported hallucination/harmful output," "figure out if this is a prompt bug or a model regression," or files an incident about a single problematic agent interaction that needs root-causing before a fix ships.

Tổng quan

Nhà phát hànhselvarajmurugesan90
Kho mãops-engineering-skills
Tên kỹ năngagent-bad-response-triage-and-root-cause-classification
Sao
44
Bản fork
18
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được selvarajmurugesan90 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Agent Bad Response Triage And Root Cause Classification trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/ai-agent/skills/agent-bad-response-triage-and-root-cause-classification
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/selvarajmurugesan90/ops-engineering-skills.git /tmp/ops-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/ops-engineering-skills/plugins/ai-agent/skills/agent-bad-response-triage-and-root-cause-classification .claude/skills/agent-bad-response-triage-and-root-cause-classification
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Agent Bad Response Triage And Root Cause Classification trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Agent Bad Response Triage And Root Cause Classification ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Agent Bad Response Triage And Root Cause Classification với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Agent Bad Response Triage and Root Cause Classification

Purpose

A single reported bad response — a wrong answer, a fabricated fact, an unsafe or off-policy reply, an action that shouldn't have happened — looks identical on the surface regardless of why it happened, but the fix is completely different depending on the cause. Patching a prompt in response to what was actually a tool timeout fixes nothing and adds prompt cruft; rolling back a model version in response to what was actually a stale retrieval index wastes an incident cycle and hides the real problem. This skill is a triage runbook: reproduce the exact conditions that produced the bad response, then work through a deliberate decision tree to classify the root cause into one of five buckets — prompt issue, tool failure, retrieval issue, model behavior change, or genuine edge case — before deciding on a fix. It assumes an eval harness and guardrail layer already exist (or should); this skill is what happens between "someone reported a bad response" and "here's the regression case and the fix," which agent-evaluation-and-guardrails covers on the prevention side.

When to use

  • A user, support ticket, or monitoring alert reports one specific bad, wrong, or harmful agent response and it needs root-causing before a fix is proposed.
  • Deciding whether an observed failure is a one-off (genuine edge case) or a systemic issue (prompt, tool, retrieval, or model) that will recur.
  • A stakeholder is pressuring for an immediate prompt patch and you need to first confirm the prompt is actually the cause.
  • After a model provider version bump, a tool schema change, or a retrieval-index update, and a report comes in that might be linked to that change.
  • Building or refining an incident-response runbook specifically for agent/LLM output issues, distinct from traditional application incidents.

Prerequisites & environment

  • Access to the full transcript of the reported interaction: every model call (system prompt, user input, prior turns), every tool call and its raw result, and the final output — not just the final answer shown to the user. If your agent doesn't log this today, treat "add full transcript logging" as a blocking prerequisite, not optional polish.
  • The ability to reproduce a call with pinned inputs: the exact prompt version, tool-schema version, model version/identifier, and (for RAG-backed agents) the retrieval index snapshot or timestamp in effect at the time of the original response.
  • A changelog of recent changes to the system: prompt edits, tool schema changes, model version bumps or provider-side model updates, and ingestion/re-indexing runs — with timestamps, so they can be correlated against when the bad response occurred.
  • Access to the eval suite (see agent-evaluation-and-guardrails) so a confirmed root cause can be turned into a permanent regression case.

Step-by-step guidance

  1. Capture the report faithfully before touching anything. Record the exact user input, timestamp, session/request ID, the full output shown, and precisely what was wrong about it (factually incorrect, unsafe, off-policy, unhelpful, took an unwanted action). Do this before attempting any fix or even a reproduction attempt — a report that gets paraphrased or summarized early loses the detail that root-causing depends on.

  2. Pull the full transcript for that request ID, not just the final answer: every LLM call's input and output, every tool call's arguments and raw (untruncated) result, and, if retrieval was involved, exactly which chunks were retrieved and in what order. Most triage dead-ends happen because someone tries to root-cause from the final answer alone.

  3. Attempt a pinned reproduction. Re-run the same input against the exact prompt version, tool-schema version, model version, and retrieval index snapshot that were live at the time of the original response (not today's versions). Three outcomes are possible, and each points the investigation differently:

    • Reproduces identically — the cause is deterministic given that exact configuration; proceed to the classification tree below.
    • Reproduces only sometimes — the model's inherent sampling variance is a factor; treat this as a signal to check prompt ambiguity and edge-case framing, not to conclude "the model is just random and unfixable."
    • Does not reproduce at all — check whether something changed between the original request and now (model version, tool backend, index) even though you tried to pin it; an unpinnable dependency (e.g. a managed model endpoint with no version pinning available) is itself a finding to report upstream.
  4. Work through the root-cause decision tree in this order — later checks are more expensive, so rule out cheaper explanations first:

    CheckSignal that confirms this bucket
    Tool failureA tool call in the transcript errored, timed out, returned malformed/truncated data, or returned a stale/wrong result that the model then reasoned over as if correct.
    Retrieval issue(RAG-backed agents only) The retrieved chunks were missing the correct source, contained outdated content, or a relevant chunk existed but wasn't in the top-k returned.
    Prompt issueTool calls and retrieval were all correct, but the system prompt is ambiguous, missing an explicit instruction for this case, or contradicts itself — the model did a reasonable thing given what it was told.
    Model behavior changeThe prompt, tools, and retrieval are all unchanged and were confirmed working before a specific date/model version, and the failure correlates with a provider-side model update or your own version bump.
    Genuine edge caseReproduces deterministically, every upstream component (tools, retrieval, prompt) is confirmed correct and unambiguous, and the input is a legitimately novel scenario the system was never designed to handle.
    python
    def classify_root_cause(transcript, changelog):
        if any(t.tool_result.error or t.tool_result.is_stale for t in transcript.tool_calls):
            return "tool_failure"
        if transcript.used_retrieval and not correct_source_in_topk(transcript):
            return "retrieval_issue"
        if prompt_has_ambiguity_or_gap(transcript.system_prompt, transcript.input):
            return "prompt_issue"
        if changelog.model_version_changed_since(transcript.last_known_good_date):
            return "model_behavior_change"
        return "genuine_edge_case"  # only after the above are actively ruled out, not by default

    Treat this function as a starting checklist, not a black box — each branch needs a human to actually inspect the evidence, not just a boolean flag.

  5. For a tool failure, check whether the dispatcher surfaced the failure as a structured error the model could react to, or let it look like success (see agent-tool-use-patterns). If the agent got stuck retrying the same failing call, this may overlap with a tool-call loop — see agent-tool-call-loop-diagnosis-and-circuit-breaking.

  6. For a retrieval issue, check separately whether the failure is a recall problem (right chunk exists but wasn't retrieved in top-k) or a freshness problem (index is stale relative to the source) — the fixes differ (re-ranking/chunking tuning vs. re-indexing cadence). See rag-pipeline-design for the retrieval-quality pattern and vector-database-ingestion-pipeline-for-rag for freshness/re-indexing mechanics.

  7. For a prompt issue, resist the urge to patch the live production prompt immediately.

    Warning: Editing a production system prompt directly in response to one incident, with no staged rollout and no rollback path, risks trading one failure mode for another that a quick spot-check won't catch. Change the prompt in a branch/staging config, re-run the full eval suite (not just the failing case) against it, and only then promote it — with the previous version kept as an immediate rollback target — per agent-evaluation-and-guardrails.

  8. For a model behavior change, confirm the correlation with actual evidence (a version/date match in provider release notes or your own deployment log), not just suspicion after ruling out other causes. Where the model version is pinnable, that pin itself is the immediate mitigation; where it isn't (a "latest" alias endpoint), treat the lack of pinning as a finding to fix independent of this specific incident.

  9. For a genuine edge case, do not treat "nothing is broken" as closing the ticket. A genuine edge case still needs a decision: is this rare enough to accept, or common enough to warrant new prompt guidance, a new tool, or a guardrail? Either way, it becomes a new eval case.

  10. Regardless of root cause, add the case to the eval suite as a permanent regression test (see agent-evaluation-and-guardrails) and, if the response was unsafe or policy-violating rather than merely low-quality, add or tighten a runtime guardrail as defense-in-depth independent of whatever upstream fix is applied.

  11. Track root-cause category over time, not just per-incident fixes. If "tool failure" or "retrieval issue" keeps recurring as the classification, that's a signal the underlying tool reliability or index freshness needs a structural fix, not another one-off patch.

Best practices

  • Classify before fixing — resist pressure to ship an immediate patch before the root-cause tree has actually been worked through; a fast wrong fix costs more triage time later than a slightly slower right one.
  • Keep the pinned-reproduction environment (versioned prompts, tool schemas, model identifiers, index snapshots) as a standing capability, not something assembled ad hoc during each incident.
  • Prefer the cheapest, most falsifiable checks first (tool errors in the transcript, retrieval top-k contents) before reaching for the more expensive and less certain "maybe the model changed" explanation.
  • Write the root-cause classification and evidence into the incident record even when the fix is obvious — the pattern across many incidents is often more valuable than any single fix.
  • Treat "genuine edge case" as a real category with its own decision (ship a guardrail/prompt update or explicitly accept the risk), not a euphemism for "we don't know and are closing this."
  • When a model behavior change is confirmed, report it upstream (provider changelog cross-check, internal deployment log entry) so the next similar report can be resolved faster.

Common pitfalls

  • Symptom: The team patches the system prompt the same day a bad response is reported, the report stops recurring, and it's marked resolved — then a different but related bad response appears weeks later. Fix: The original patch likely treated a symptom (this exact phrasing) rather than the root cause (an ambiguous instruction that produces this whole class of bad response). Re-run the full classification tree, and validate the fix against the eval suite's adversarial/edge-case subset, not just the one reported case.

  • Symptom: Investigation stalls because the transcript only contains the final answer, not the intermediate tool calls or retrieved chunks, so there's no way to tell whether the failure was upstream. Fix: Treat full transcript logging (every model call, every tool call and raw result, every retrieved chunk) as a blocking prerequisite for this skill, not an optional nicety — retrofit it before attempting root-cause work on future incidents.

  • Symptom: A reported bad response is blamed on "the model got worse" without evidence, a model version is rolled back, and the same class of bad response happens again on the old version. Fix: Confirm model-behavior-change as the cause with an actual version/date correlation before rolling back — check tool failures and retrieval quality first, since both are far more common causes than an actual model regression and a rollback that doesn't fix anything wastes an incident cycle while hiding the real cause.

  • Symptom: A tool silently returned stale or partially-truncated data (no error raised), the model reasoned over it as if correct, and the investigation initially looks like a "hallucination" because the transcript shows the model confidently stating something false. Fix: Always inspect raw tool results in the transcript before concluding the model fabricated something — a model that accurately reports bad tool data isn't hallucinating, and the fix belongs in the tool/dispatcher layer (see agent-tool-use-patterns), not the prompt.

  • Symptom: The same reported issue is re-triaged from scratch multiple times because no eval case was added after the first investigation. Fix: Make "add a regression case to the eval suite" a mandatory, non-optional last step of every triage, regardless of how the root cause was classified.

Worked example

Report: A user asks the internal support agent "What's the refund window for orders placed during the holiday sale?" and the agent confidently answers "90 days," which is wrong — the correct policy (30 days for holiday-sale orders, per an updated policy page) exists in the knowledge base.

Triage:

  1. Full transcript pulled for the request ID: system prompt (unchanged in 3 months), one retrieval call, no other tool calls, final answer "90 days, per our standard policy."
  2. Pinned reproduction: re-running the same query against the retrieval index snapshot from the time of the report reproduces the same wrong answer identically.
  3. Decision tree: no tool errors present (no tool calls other than retrieval) → not a tool failure. Retrieval top-6 chunks inspected: contain the old refund policy chunk (90 days, general orders) but not the newer holiday-sale-specific policy chunk, even though the newer chunk exists in the source CMS.
  4. Root cause classified as retrieval issue, specifically a freshness problem, not a recall problem — the corpus's ingestion job runs weekly and the holiday-sale policy page was published 4 days before the report, so the new page hadn't been re-indexed yet.
  5. Immediate action: manually trigger a re-index of the changed page rather than patching the prompt (which would have wrongly targeted a prompt issue that wasn't the cause).
  6. Structural fix: per vector-database-ingestion-pipeline-for-rag, move ingestion from a weekly batch schedule to the CMS's on-publish webhook so policy changes are searchable within minutes, not up to a week later.
  7. A new eval case is added: query "refund window for holiday sale orders" with expected source doc-holiday-refund-policy, run against the ingestion pipeline's freshness check going forward.

Cross-references

Câu hỏi thường gặp

Kỹ năng AI Agent Bad Response Triage And Root Cause Classification làm được gì?

Guides triaging a single reported bad, wrong, or harmful agent response: reproducing it deterministically and classifying the root cause into one of five buckets — prompt issue, tool failure, retrieval issue, model behavior change, or genuine edge case — so the fix targets the actual cause instead of the symptom. Use when a user asks to "investigate this bad agent response," "why did the agent say/do that," "triage this reported hallucination/harmful output," "figure out if this is a prompt bug or a model regression," or files an incident about a single problematic agent interaction that ne...

Vì sao nên dùng Agent Bad Response Triage And Root Cause Classification trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Agent Bad Response Triage And Root Cause Classification là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Agent Bad Response Triage And Root Cause Classification trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/ai-agent/skills/agent-bad-response-triage-and-root-cause-classification. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Agent Bad Response Triage And Root Cause Classification?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Agent Bad Response Triage And Root Cause Classification với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Agent Bad Response Triage And Root Cause Classification với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Agent Bad Response Triage And Root Cause Classification có miễn phí không?

Có. Kỹ năng này được selvarajmurugesan90 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇