RAG Debug Triage: Find Why Your Bot Missed the Answer

    by Vijay Kumar

    1

    When a RAG chatbot gives a wrong or "I couldn't find it" answer, the usual reaction is to rewrite the prompt or try a bigger model.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+23 more

    What it does

    • Prints the retrieved chunks first and checks whether the answer text is in them at all
    • Runs a known-answer probe to separate "never indexed" from "badly ranked"
    • Detects answers split across neighbouring chunks and chunks stripped of their context
    • Names one failure type from a six-row table and suggests the single first fix to try
    • Makes you re-measure each fix on a golden set so changes are proven, not assumed
    • Tests abstention honestly with missing, misleading and unanswerable cases, plus controls

    Who it's for

    Product managers running a help center chatbot

    Find out exactly why your chatbot is giving wrong answers before you pay for more expensive models.

    Try asking: “My support bot says it cannot find our return policy even though the document is uploaded. Help me debug this.”

    AI engineers and developers building search tools

    Stop guessing which part of your search system is broken with a technical triage that checks every layer.

    Try asking: “Debug why my RAG system is hallucinating about the latest API pricing.”

    Business owners using custom AI tools

    Fix your AI tools when they start missing facts or making mistakes without breaking the things that work.

    Try asking: “I have a RAG system for my shop but it keeps getting shipping dates wrong. Triage this failure.”

    RAG Debug Triage: Find Why Your Bot Missed the Answer

    Example session with this skill installed

    My support bot answered "I couldn't find pricing for the Pro plan" for "What does the Pro plan cost per seat?". The real text is "EUR 12 per seat per month". Here is the retrieval export. Triage it.

    • Read your context and instructions
    • Compiled the rag debug triage
    $ python3 scripts/triage_probe.py examples/case_boundary_miss.json
    Question: What does the Pro plan cost per seat?
    Bad answer: I couldn't find pricing for the Pro plan.
    
    Step 1 - top-5 retrieved (answer phrase marked with *)
         1 security-002     score=0.74  security.md#2  pro plan customers can enable sso with saml and review audit logs.
         2 pricing-014      score=0.71  pricing.md#14  pro plan. includes sso, audit logs and priority support. the pro plan costs eur 12 per
         3 faq-003          score=0.62  faq.md#3  how do i change my plan? open settings, choose billing and pick a plan.
         4 legal-001        score=0.55  legal.md#1  fees are non-refundable except where required by law. per seat charges apply.
         5 pricing-013      score=0.5  pricing.md#13  plans overview. free plan: up to 3 users. team plan: billed annually.
      Answer text in top-5? NO
    
    Step 2 - known-answer probe
      phrase NOT found in any single indexed chunk.
    
    Step 3 - boundaries and context
      phrase is SPLIT across neighbours pricing-014 | pricing-015 in pricing.md
    
    Step 4 - suggested label
      Failure: Chunk-boundary miss
      First fix to try (ONE change, then re-measure on your golden set): Parent/child (auto-merging) retrieval, chunk overlap, or structure-aware chunking.
    

    Agent report:

    Failure: chunk-boundary miss (the price sentence is cut between pricing-014 and pricing-015)
    Do NOT: raise top-k or change the prompt first.
    Fix to try (one change, then re-measure on your golden set): parent-window retrieval that returns neighbouring chunks.
    Then: re-run the golden set; keep the fix only if Recall@5 rises with no regressions.
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    When a RAG chatbot gives a wrong or "I couldn't find it" answer, the usual reaction is to rewrite the prompt or try a bigger model. Most of the time the right text never reached the model. Those fixes cost days and change nothing.

    RAG Debug Triage gives your agent a strict order of operations. First, print what was retrieved and ask one question: is the answer text in there? Second, take a phrase copied word for word from the source and search for it: if it is found in the index but your question does not retrieve it, you have a ranking or vocabulary problem; if it is nowhere, it was never indexed. Third, look at chunk boundaries: is the answer cut in half between two chunks, or does the chunk lack the product name or date that gives it meaning?

    Then it names the failure from a table (true miss, rank miss, chunk-boundary miss, context-stripped chunk, synthesis failure, misleading context), tells you what not to try first, and proposes one fix. You apply it, re-run your golden set and keep the change only if the numbers improve without hurting other questions.

    A helper script automates the first four steps from a JSON export of your retrieval results. The skill also includes a guide to testing "answer or abstain" gates honestly, because many look great on lazy tests and fail on misleading context.

    You end up with a named root cause, one targeted fix, and before and after numbers.

    Works best on plain text. Scanned PDFs or complex tables might need manual checking if the text doesn't match the saved chunks perfectly.

    Files: `SKILL.md`, `README.md`, `scripts/triage_probe.py` (about 7 KB, standard library only, reads one JSON file, prints a report), `references/fixes.md`, `references/abstention-tests.md`, `examples/` (three cases: boundary miss, rank miss, not indexed). Permissions to expect in the scan: file read only, no network.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    This skill helps you find out why your document search AI gives wrong or missing answers. It uses a six step technical checklist to see if the information was never saved correctly, if the search failed to rank it, or if the answer was split between two different pages.

    You need to give your AI agent the question that failed, the incorrect answer it gave, and the document that contains the right information. You also need to provide the search results, including the text chunks and their scores, so the skill can analyze what went wrong.

    The skill provides a clear report identifying the exact failure, such as a chunk boundary miss or a rank miss. It then recommends one specific fix to try and gives you a way to measure the results to see if the problem was actually solved.

    It works best with plain text documents. If your documents are scanned images or have complex tables where the text is hard to extract, your AI agent might need you to look at those parts manually to help with the triage.

    You can start by telling your AI agent that your search is giving wrong answers or that it cannot find a specific fact. Mention that you want to run the six step retrieval triage to find the breakdown before changing any prompts.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.