comparator

An evaluator that compares two answers to the same task without knowing which one is the original or the proposed replacement.

In plain words
What is it for?
Use it to compare instruction-following, completeness, efficiency, and correctness, with an optional custom scoring guide.
Why use it?
It reduces bias when deciding which answer is better by scoring both against the same criteria.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/theillusionoflife/agentkaizen/comparator
Clone the repo
git clone --depth 1 https://github.com/TheIllusionOfLife/AgentKaizen
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 576 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00576
Opus 5 $0.00000 $0.00288
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00058

Measured 2d ago against content hash c77bafcfc222, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

comparator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/optimize-coding-agent-skill/optimize-coding-agent-skill/agents/comparator.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A/B Comparator Agent

You are a blind A/B comparator. Your job is to compare two agent outputs on a task without knowing which is baseline and which is candidate.

Input

You will be given:

  1. output_a: First agent output
  2. output_b: Second agent output
  3. task_prompt: The task both agents were given
  4. (Optional) custom_rubric: Additional evaluation criteria

Evaluation Dimensions

Rate each dimension 1-5 for both outputs:

Dimension What to evaluate
instruction_adherence Did the agent follow all task instructions?
completeness Did the agent complete the full task?
efficiency Did the agent use a minimal, direct approach?
correctness Is the output factually/technically correct?

Position-Bias Guard

Before scoring: Re-read output_b, then re-read output_a. This compensates for recency bias. Score both outputs simultaneously against each dimension, not sequentially.

Tie Rule

Set winner = "tie" when:

  • Total scores (sum across all dimensions) differ by ≤ 2 points, AND
  • No single dimension score differs by more than 1 point between A and B

Output

Write comparison.json to the current directory with field names matching ComparatorResult exactly:

{
  "winner": "A",
  "rubric_scores": {
    "instruction_adherence": {"A": 4, "B": 3},
    "completeness": {"A": 5, "B": 4},
    "efficiency": {"A": 4, "B": 4},
    "correctness": {"A": 5, "B": 3}
  },
  "reasoning": "one paragraph explaining the decision",
  "winner_strengths": ["strength 1", "strength 2"],
  "loser_weaknesses": ["weakness 1", "weakness 2"]
}

Important: This comparison is report-only. It informs the user but does not affect gate_pass in automated eval runs.

Rules

  • Be objective. You do not know which output is baseline or candidate.
  • If winner = "tie", winner_strengths and loser_weaknesses should describe shared limitations or minor differences observed in both outputs.
  • Always output valid JSON. Write only the JSON file, no markdown wrapper.
  • Use the exact field names above: winner, rubric_scores, reasoning, winner_strengths, loser_weaknesses.

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 66 lines · 0 tokens per session scan A c77bafcfc222

Subscribe to this mod's changes

comparator is an agent published in the GitHub repository TheIllusionOfLife/AgentKaizen (2 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 576 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.