LEAP
LEAP builds skills through two pipelines: Branch A distills a skill from raw data, while Branch B combines multiple skills into one. It is called by the main…
Decomposed, multi-criteria metric design for LLM pipelines. The metric IS the model — change the metric and the optimizer changes behavior. Decompose by default; bool during compile, float during eval; calibrate against human; mitigate judge bias. Search keywords: LLM-as-judge,
$ npx -y skills add agentsope/SkillAlchemy --skill agentsop-metric-design --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/agentsop-metric-designContext preview
The summary Claude sees to decide when to auto-load this skill.
Decomposed, multi-criteria metric design for LLM pipelines. The metric IS the model — change the metric and the optimizer changes behavior. Decompose by default; bool during compile, float during eval; calibrate against human; mitigate judge bias. Search keywords: LLM-as-judge,
name: agentsop-metric-design version: 0.1.0 phase: D tier: core frequency: high status: opinionated description: >- Decomposed, multi-criteria metric design for LLM pipelines. The metric IS the model — change the metric and the optimizer changes behavior. Decompose by default; bool during compile, float during eval; calibrate against human; mitigate judge bias. Search keywords: LLM-as-judge, llm as judge, eval metric, evaluation score, scoring function, rubric, RAGAS, G-Eval, judge bias, verbosity bias, how to evaluate LLM output.
> "It's unproductive to launch optimization runs using a poorly designed program or a bad metric." > — DSPy core team [dspy.ai/learn/optimization/overview/]
> "LLM judges exhibit self-preference, recency, rubric-order, score-ID, and length biases." > — Synthesized from [arxiv.org/pdf/2506.02592, arxiv.org/pdf/2509.26072]
This is a **tool skill**. It produces a metric function (and a calibration receipt) that other skills consume — DSPy compilers (MIPROv2 / GEPA / BootstrapFewShot), LlamaIndex `FaithfulnessEvaluator`/`RelevancyEvaluator`/`RetrieverEvaluator`, LangGraph eval judges, RAGAS, TruLens. The metric is the optimization target. Get it wrong and every downstream optimizer is theatre.
---
Activate when **any** of these is true:
**Do NOT activate for:**
---
A DSPy/GEPA/MIPRO optimizer is a black-box search that maximizes `metric(pred, example)`. Whatever the metric rewards, the compiled prompt will produce. If the metric prefers verbose, hedged answers (which an LLM judge will, by default — judges over-prefer length [arxiv.org/pdf/2506.02592]), the optimizer will produce verbose, hedged answers. **A bad metric beats a good optimizer every time.**
Three corollaries:
1. **Decompose by default.** A single holistic LLM-as-judge call ("is this answer good? rate 1-5") collapses orthogonal axes (factuality, tone, length, relevance) into one noisy scalar. Decompose into N orthogonal yes/no sub-judges, then aggregate. Same number of LM calls in the limit, vastly less noise. 2. **Bool during compile, float during eval.** Same metric function, two return types based on the `trace` argument. Compile-time `bool` prevents the optimizer from chasing noise in the middle of the distribution; eval-time `float` gives gradient for reporting and debugging. [dspy.ai/learn/evaluation/metrics/] 3. **The metric must be calibrated against humans.** ≥20 spot-checks where you (the human) rate the same examples the metric does. If metric disagrees with human on >20% of cases, **fix the metric before any compile**. Otherwise the optimizer just learns the metric's bias.
| Bias | What it does | Source | |---|---|---| | Length bias | Judges prefer longer answers regardless of quality | [arxiv.org/pdf/2506.02592] | | Self-preference | A judge from family X prefers outputs from family X | [arxiv.org/pdf/2506.02592] | | Recency / position | Last option in a pairwise rated higher | [arxiv.org/pdf/2509.26072] | | Rubric-order | Criteria listed first weighted more | [arxiv.org/pdf/2509.26072] | | Score-ID | "5" and "10" anchor differently across rubrics | [arxiv.org/pdf/2509.26072] | | Provenance | Knowing the source model biases the rating | [arxiv.org/pdf/2506.02592] |
Full catalog in `references/R2-judge-bias-catalog.md`.
---
0. Confirm activation criteria (§1) 1. DECOMPOSE: list orthogonal criteria 2. CHOICE: bool vs float per criterion 3. WRITE: implement sub-judges + aggregator 4. BIAS-TEST: probe for length, position, self-preference 5. CALIBRATE: ≥20 human spot-checks; agreement ≥80% 6. SHIP: hand metric to optimizer / eval loop
Write down the criteria the user *actually* cares about. For an open-ended Q&A:
For RAG specifically, copy LlamaIndex's triad: **Faithfulness** (answer entailed by context), **Relevancy** (answer addresses query), **Retriever quality** (MRR / hit-rate on labeled QA pairs). See `references/R1-source-evidence.md`.
**Output of this stage**: a checklist of 3–6 sub-criteria, each with type (`bool` / scalar) and aggregation rule (AND for hard gates, weighted sum for soft).
Per [dspy.ai/learn/evaluation/metr
Turn people, methods, and experience into installable, reusable agent skills. SkillAlchemy is an open-world agent skill creation system that turns underspecified skill briefs and open-world sources into installable, reusable agent skills.
LEAP builds skills through two pipelines: Branch A distills a skill from raw data, while Branch B combines multiple skills into one. It is called by the main…
Lens — Add a cognitive lens to any problem. It accepts a task description and produces an enhanced description that surfaces hidden dimensions, prerequisites,…
Cross-framework enhancement overlay for choosing a multi-agent topology BEFORE writing any agent. A binary-question rubric — is single-agent + tools enough? do…
SOP for terminal-based, git-native AI pair programming with Aider (git work-tree + tree-sitter repo-map + edit-format + human-in-loop REPL). Use when editing…
Screens biomedical / life-science papers for signs of data fabrication, image manipulation, and statistical anomalies, using the detection techniques distilled…
Universal discipline for any LM-driven loop — agent retries, plan-act-observe, multi-agent handoffs, optimiser passes, test-fix cycles. Encodes the one rule…