# Failmap: know how your AI feature fails, then guard it

> Samples real traces, notes each failure in plain words and groups them into named modes with counts, then adds code checks, one binary judge per mode validated against human labels, and a golden set that gates CI.

Failmap: know how your AI feature fails, then guard it is a paid AI agent skill on Agensi by MAJI, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [MAJI](https://www.agensi.io/creators/maji)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/failmap-know-how-your-ai-feature-fails-then-guard-it
- Tags: llm-ops, testing, quality-assurance

## About this skill

When an AI feature "feels off", nobody can say how often it fails or how. Teams reach for a generic helpfulness score, one judge prompt that grades everything and was never checked against people, and prompt changes that break something nobody notices. Failmap replaces that with named failure modes found in your real traces, counted, checked automatically and guarded on every change.

### What it does
- **Real traces first:** inputs, outputs, tool calls and metadata exported to a local JSONL outside the repo, personal data stripped. No users yet: 20 to 50 realistic inputs.
- **Diverse sample:** clusters on cheap features and adds about a third random picks, 20 to 30 records for the first pass.
- **Open coding:** a plain-words note on the first thing that went wrong in each record.
- **Failure taxonomy:** named modes with a definition, a count and two example record ids.
- **Code checks first:** schema, regex, required fields, citations, tool arguments, output language, each tested on pass, fail and borderline cases.
- **One binary judge per mode:** only where code cannot decide, with Pass and Fail definitions, labelled examples and a pinned dated model.
- **Judge validation:** true positive and true negative rates on a held-out split; aim for both above 90%, below 80% is not ready.
- **Golden set and CI gate:** one eval command that fails the run when a mode drops below its baseline, with cost bounded by caching and a per-run budget.

### How it works
1. **Collect, sample and open-code** traces.
2. **Group into modes** and re-read earlier records.
3. **Fix prompt gaps** before building any evaluator.
4. **Write code checks, then judges**, and validate each judge.
5. **Freeze the golden set** and wire the eval command into CI.

### Frameworks & tools
Any tracer or log that can export traces. The gate runs as `npm run eval` or `pytest evals/` in CI.

### Why this beats prompting it yourself
Asking a model to "evaluate my chatbot" produces a Likert score and a generic checklist. This process starts from your own failures, keeps judge examples out of the test split and refuses to trust a judge that has no measured agreement with people.

### Use cases
- **Chat, extraction or classifier features** with no failure rates.
- **Before a prompt, model or retrieval change.**
- **RAG and tool-using agents**, with retrieval or per-step modes.

### Known limitations
Not for match scoring with have, partial and missing labels, or for uptime, error alerts and spend caps. Reading traces and labelling by hand is required; the skill does not skip that step.

## Requires

- npm or pytest (eval command)
- CI pipeline

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Failmap: know how your AI feature fails, then guard it skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does it need?

Exported traces from your AI feature (inputs, outputs, tool calls, metadata), or 20 to 50 realistic inputs if there are no users yet, plus time to read and label records by hand.

### Does it give my AI a quality score?

No. It produces named failure modes with counts and binary pass or fail checks per mode, not a 1 to 5 or helpfulness score.

### How is this different from asking an LLM to evaluate my outputs?

Failure modes come from reading your traces, code decides whatever it can, and each LLM judge covers one mode and must show measured agreement with human labels before it gates anything.

### What is in the zip?

SKILL.md, the instructions your agent follows, and LICENSE.md.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
