Agent skill · Data & Analytics

agentsop-metric-design

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.

agentsopegithub.com/agentsopeGitHub ↗
claude-codeMIT
Install
npx skills add agentsope/SkillAlchemy --skill agentsop-metric-design --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 25 KB
Bundled scripts: none
Version: 0.1.0
Path: skills/agentsop-metric-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 255
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Produces a metric function (and a calibration receipt) that other skills consume to guide optimization in LLM pipelines. It emphasizes decomposing evaluation into orthogonal sub-judges, with a bool return during compile and a float return during evaluation. It prescribes calibrating the metric against human judgments and mitigating judge biases.

How it works

  • Activate when optimization runs, RAG evaluation, agent benchmarks, prompt tuning with quantitative metrics, or production regression tests.
  • Decompose into 3–6 orthogonal sub-judges (e.g., factuality, on-topic, non-hedging, length considerations, and source-citation if needed). For each criterion, create a sub-judge using a dedicated predictor call and define an aggregation rule (AND for hard gates; weighted sum for soft scores).
  • Define a single metric function that returns a bool when trace is not None (compile mode) and a float otherwise (eval mode). The bool return enforces hard constraints; the float return provides a gradient-friendly score.
  • Implement a deterministic length penalty separate from the sub-judges (explicit length_score), and multiply it into the final float to counteract length bias.
  • Include a bias test (length, self-preference, position, rubric-order) on a dev set before calibration.
  • Calibrate with human spot-checks (≥20, ideally 30) and require per-sub-judge and aggregate agreement ≥80% before shipping.
  • Ship the metric function and a calibration receipt documenting spot checks, bias probes, judge/model IDs, and dates; pair with an optimizer like GEPA or MIPROv2 depending on whether textual feedback is used.

When to use it

  • Use when an optimization/benchmarking pipeline consumes metric(example, pred) -> bool|float and where the metric will gate downstream decisions (chunking, retrievers, prompting, etc.).
  • Activate before production changes that rely on a quantified evaluation signal to avoid bias-driven artifacts.

What it can touch

  • Tools and concepts named exactly in the skill: the metric function, sub-judges via dspy.Predict(Assess), and the compile/eval modes (trace not None vs None) to switch bool/float semantics.
  • It references outputs like a calibration receipt, a JSON artifact next to the compiled artifact, and potential optimizers such as dspy.GEPA or MIPROv2.

Caveats

  • The metric is the optimizer’s objective; a wrong metric leads to biased or undesired downstream behavior.
  • Requires careful calibration (≥80% agreement) before compilation; otherwise, compilation is refused.
  • Length penalties are deterministic and must not be delegated to the LLM judge.
  • Bias probes and cross-family judge strategies are recommended to reduce self-preference and length biases.
From the SKILL.md

# metric-design — Decomposed, Multi-Criteria Metrics for LLM Pipelines > "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. --- ## 1. 何时激活 (When to Activate) Activate when **any** of these is true: - **Optimization runs**: a DSPy / OpenAI-Evals / RAGAS / TruLens job is about to consume a `metric(example, pred) -> bool|float`. The metric drives gradient-free search; bias propagates into the artifact. - **RAG evaluation**: deciding chunk size, reranker, hybrid alpha, retriever-k. A bad metric here picks the wrong chunking strategy and you ship it. -

What's inside
Steps it walks through
  1. 1. 何时激活 (When to Activate)
  2. 2. 核心心智模型 (Core Mental Model)
  3. "The metric IS the model. Change the metric, change the behavior."
  4. Why holistic judges fail (the catalog)
  5. 3. SOP (Standard Operating Procedure)
  6. Stage 1 — Decompose
  7. Stage 2 — Bool vs Float Choice (per criterion)
  8. Stage 3 — Write the Judge
  9. Stage 4 — Bias Test
  10. Stage 5 — Human Calibration
  11. Stage 6 — Ship
  12. 4. 操作模型 (Operations)
  13. OP-M01 — DecomposeMultiCriteria
  14. OP-M02 — BoolDuringCompileFloatDuringEval
Ships with 4 files
  • README.md
  • intermediate/operation_candidates.json
  • references/R1-source-evidence.md
  • references/R2-judge-bias-catalog.md
More from SkillAlchemy
All skills →
About this skill
What does the agentsop-metric-design skill do?

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.

How do I install it?

Run `npx skills add agentsope/SkillAlchemy --skill agentsop-metric-design --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From agentsope/SkillAlchemy, a repository with 255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going