Zum Inhalt springen
Skillpedia
Agenten29k · #9526

agent-regression-evals

Was er macht

Dieser Skill lässt den Agenten prüfen, ob ein KI-Agent nach einer Änderung besser oder schlechter geworden ist, mit Statistik statt einem einzelnen Lauf. Er ist für Teams gedacht, die Änderungen an KI-Agenten ausliefern und vor der Veröffentlichung ein klares Urteil brauchen.

Wann du ihn nutzt

  • ✓Wenn du eine Änderung an Prompt, Modell oder Werkzeug eines Agenten ausliefern willst.
  • ✓Wenn die Erfolgsquote eines Agenten gesunken ist und du wissen musst, ob das echt ist.
  • ✓Wenn manche Testfälle zufällig bestehen und fehlschlagen und gefunden werden müssen.

Link zum Skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-regression-evals/skills/agent-regression-evals/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-regression-evals/skills/agent-regression-evals/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wir haben das Modell hinter unserem Support-Agenten geändert. Führe die Tests mehrmals aus und sag mir, ob die neue Version wirklich schlechter ist.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent führt jeden Testfall mehrmals auf der alten und der neuen Version aus und prüft die Schritte, die der Agent über seine Werkzeuge gegangen ist. Er findet unzuverlässige Fälle, dann vergleicht ein statistisches Tor beide Versionen Fall für Fall und gibt ein Urteil ab.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Agent Regression Evals — prove the change did not make it worse

Portability: 3 stdlib scripts, no APIs, no LLM calls. You run the agent; these grade, count and gate.

"Pass rate went from 82% to 79%" is not a finding until you know whether three points is outside the noise. Agents are non-deterministic, so one trial per case cannot tell a regression from a coin flip, and a final answer can be right while the path to it called a tool it never should have.

Workflow

# 0 - Run every case k times (k >= 3) on baseline and candidate, from a clean
#     environment per trial. Write one JSONL row per trial:
#     {"case_id": "refund-lookup", "trial": 1, "passed": true, "critical": true,
#      "cost_usd": 0.012, "trajectory": [{"tool": "get_order", "args": {...}}]}
# 1 - Grade the path where the path matters (safety, required lookups).
python scripts/trajectory_checker.py --spec cases.json --results candidate.jsonl
# 2 - Separate flaky cases from stable ones before trusting any comparison.
python scripts/flake_detector.py --results candidate.jsonl --k 3 --quarantine-out q.json
# 3 - Gate: paired per-case comparison against baseline. Exit 4 blocks the merge.
python scripts/regression_gate.py --baseline baseline.jsonl --candidate candidate.jsonl --quarantine q.json

Step 1 uses match modes strict | unordered | subset | superset. Default to superset (required steps present, harmless exploration allowed); grade the outcome, not the path, unless order is the requirement. forbidden tools block in every mode.

Step 2 reports pass@k (succeeds at least once in k) and pass^k (succeeds all k times). A user meets every trial, so pass^k is the reliability number. Cases marked critical are never quarantine candidates.

Step 3 averages trials within each case first (trials of one case are correlated), then tests paired per-case differences with a t-based 95% CI and a one-sided exact McNemar test. When the drop is real but the sample is too small to show it, the gate says how many cases it would take.

The gate blocks on

  1. A statistically significant drop (CI upper bound below zero, or McNemar p < 0.05).
  2. A critical case that passed every baseline trial and failed any candidate trial.
  3. A baseline case missing from the candidate run. Dropping a case is the cheapest fake fix.
  4. A quarantine entry with no owner or expiry, or covering a critical case.
  5. A forbidden tool call (trajectory checker, exit 4).

It warns, and a human decides, on an underpowered drop above --tolerance or a cost rise above --max-cost-increase.

Hard rules

  • Never compare single trials. Under 3 trials per case the flake detector refuses (exit 4).
  • Never pool trials as independent samples. Average per case, then compare cases.
  • Never quarantine without owner and expiry. An expired entry re-enters the gate automatically.
  • Never delete a failing case to go green. The gate counts what is missing.
  • Never call "no significant drop" a pass on 8 cases. Report the power note with the verdict.
  • Start the suite from real failures (20-50 cases), balanced between "should do" and "should not do".

Scripts

Script Role Exit codes
scripts/trajectory_checker.py Grades tool-call paths: match modes, args modes, forbidden tools, call ceilings 0 · 2 deviations · 3 bad input · 4 forbidden tool
scripts/flake_detector.py STABLE_PASS / STABLE_FAIL / FLAKY per case, Wilson CI, pass@k, pass^k, quarantine stubs 0 · 2 flaky · 3 · 4 too few trials
scripts/regression_gate.py Paired CI, exact McNemar, critical cases, dropped cases, quarantine validity, cost 0 PASS · 2 WARN · 3 · 4 BLOCK

All support --sample and --output json.

References and assets

Häufige Fragen

Warum jeden Fall mehrmals ausführen?

Agenten antworten bei verschiedenen Läufen unterschiedlich. Ein einziger Versuch kann keine echte Verschlechterung zeigen.

Prüft er, wie der Agent zu seiner Antwort kam?

Ja. Er prüft den Weg der Werkzeugaufrufe, etwa ob eine nötige Abfrage stattgefunden hat.

Kann eine fehlgeschlagene Prüfung einen Merge blockieren?

Ja. Das Tor gibt einen Fehlercode zurück, der einen Merge blockieren kann.

Details

Originalbeschreibung des Autors

Use before shipping any agent, prompt, model or tool change, or when a pass-rate drop needs a verdict. Runs repeated trials, gates candidate vs baseline with paired statistics in regression_gate.py, checks tool-call trajectories and finds flaky cases.

repo: alirezarezvani/claude-skills

Beliebtheit

GitHub-Sterne
29k
Platz im Ranking
#9526
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills