Agentclash challenge pack llm judges

From agentclash/agentclash · View interactive version

Agentclash challenge pack llm judges is an AI agent skill from the GitHub repository agentclash/agentclash. Use when configuring AgentClash LLM-as-judge scoring, judge prompts, rubrics, assertion/reference/n-wise modes, evidence inputs, scorecard dimensions, abstention behavior, and judge result interpretation.

How to use this skill

Skill file

AgentClash Challenge Pack LLM Judges

Purpose

Add LLM-as-judge scoring only where deterministic validators cannot capture the whole evaluation. Judges should complement objective checks, not replace them.

Use this skill after deterministic validators and evidence sources are known. A good judge is narrow, evidence-bound, budget-aware, and wired to one scorecard dimension through source: llm_judge.

Use When

Do Not Use When

Environment

Use hosted production for CLI examples unless the user intentionally targets a local or self-hosted backend.

export AGENTCLASH_API_URL="https://api.agentclash.dev"

agentclash challenge-pack validate calls the hosted API and requires auth plus a workspace. Use agentclash link, --workspace, AGENTCLASH_WORKSPACE, or .agentclash.yaml before validating.

Validation Commands

Validate after changing judge_mode, llm_judges, judge evidence, scorecard judge dimensions, consensus, or judge limits.

agentclash challenge-pack validate path/to/pack.yaml
agentclash challenge-pack validate path/to/pack.yaml --json

Human output prints Challenge pack is valid or Challenge pack has errors. Use --json for structured valid and errors fields.

Minimal Hybrid Shape

Current evaluation specs still require at least one deterministic validator. Use judge_mode: hybrid when judges are paired with validators.

version:
  evaluation_spec:
    name: support-quality
    version_number: 1
    judge_mode: hybrid
    validators:
      - key: mentions_policy
        type: contains
        target: final_output
        expected_from: literal:refund policy
    llm_judges:
      - mode: rubric
        key: helpfulness
        model: gpt-4o
        samples: 3
        context_from:
          - challenge_input
          - final_output
        rubric: |
          Score 1-5 for whether the answer is correct, complete, and easy for a support agent to use.
    scorecard:
      strategy: weighted
      dimensions:
        - key: correctness
          source: validators
          validators:
            - mentions_policy
          weight: 0.5
        - key: helpfulness
          source: llm_judge
          judge_key: helpfulness
          weight: 0.5

Mode coherence rules:

Judge Fields

Every llm_judges[] entry uses this source-backed shape:

llm_judges:
  - mode: rubric
    key: stable_judge_key
    model: gpt-4o
    context_from:
      - final_output
    rubric: Rate the output 1-5.

Fields:

Supported Evidence

Judge context_from and reference_from entries must use supported evidence references:

Each context_from entry is injected into the judge prompt as <reference>:\n<resolved value>. Reference judges also inject reference_answer from reference_from.

If any required judge context or reference evidence is unavailable, the judge result becomes unavailable with a reason; it does not produce a normalized_score.

Rubric Mode

Use mode: rubric for subjective numeric scoring against a written rubric.

llm_judges:
  - mode: rubric
    key: persuasiveness
    model: claude-sonnet-4-6
    samples: 3
    context_from:
      - challenge_input
      - final_output
    score_scale:
      min: 1
      max: 5
    rubric: |
      Score 1-5.
      1: Incorrect, incomplete, or unsupported.
      3: Mostly correct but misses important nuance.
      5: Correct, concise, evidence-bound, and directly useful.
scorecard:
  dimensions:
    - key: persuasiveness
      source: llm_judge
      judge_key: persuasiveness

The judge is instructed to return JSON shaped like:

{"score": 4, "confidence": "low|medium|high", "reasoning": "brief rationale"}

Rubric and reference scores are clamped to the configured score_scale and normalized to 0..1 for the scorecard dimension.

Assertion Mode

Use mode: assertion for yes/no claims such as safety, groundedness, or policy compliance.

llm_judges:
  - mode: assertion
    key: no_hallucination
    model: claude-haiku-4-5-20251001
    context_from:
      - case.payload.source_excerpt
      - final_output
    assertion: The response contains only information supported by the source excerpt.
    expect: true
scorecard:
  strategy: hybrid
  dimensions:
    - key: no_hallucination
      source: llm_judge
      judge_key: no_hallucination
      gate: true
      pass_threshold: 1.0

The judge is instructed to return JSON shaped like:

{"pass": true, "confidence": "low|medium|high", "reasoning": "brief rationale"}

The parser also accepts verdict values such as pass, true, yes, fail, false, or no. Assertion samples aggregate by majority and normalize to 1 or 0.

Reference Mode

Use mode: reference when a gold answer or expected artifact exists.

llm_judges:
  - mode: reference
    key: summary_quality
    model: gpt-4o
    context_from:
      - final_output
    reference_from: case.expectations.reference_summary
    rubric: |
      Compare the response to the reference summary for coverage, faithfulness, and concision.
      Penalize unsupported additions.
scorecard:
  dimensions:
    - key: summary_quality
      source: llm_judge
      judge_key: summary_quality

reference_from must resolve to available evidence. If it does not, the judge is unavailable.

N-Wise Mode

Use mode: n_wise to rank all run agents in the same run against one another.

llm_judges:
  - mode: n_wise
    key: overall_quality
    model: claude-sonnet-4-6
    samples: 3
    position_debiasing: true
    context_from:
      - final_output
    prompt: Rank the candidate outputs from best to worst on correctness, completeness, and clarity.
scorecard:
  dimensions:
    - key: overall
      source: llm_judge
      judge_key: overall_quality

The judge is instructed to return JSON shaped like:

{"ranking": ["<run_agent_id>", "..."], "confidence": "low|medium|high", "reasoning": "brief rationale"}

The parser also accepts ranked_ids. Every candidate must appear exactly once. n_wise requires at least two run agents in the run. The current run agent receives a normalized Borda-style score from its rank.

Multi-Model Consensus

Use models only when you need cross-model agreement. Multiple models require consensus.

llm_judges:
  - mode: rubric
    key: quality
    models:
      - claude-sonnet-4-6
      - gpt-4o
    consensus:
      aggregation: median
      min_agreement_threshold: 0.6
      flag_on_disagreement: true
    rubric: Rate overall quality 1-5.

Consensus rules:

Single-model judges must not include consensus.

Judge Limits

Judge limits live under scorecard.judge_limits.

scorecard:
  judge_limits:
    max_samples_per_judge: 3
    max_calls_usd: 2.50
    max_tokens: 50000

Validation rules:

Current pack validation range-checks these budget knobs. Still keep each judge's samples and models small: every judge times every sample times every model can create one LLM call.

Scorecard Wiring

Each judge-backed dimension must point at exactly one judge key.

scorecard:
  strategy: hybrid
  dimensions:
    - key: deterministic_correctness
      source: validators
      validators:
        - mentions_policy
      weight: 0.5
    - key: groundedness
      source: llm_judge
      judge_key: no_hallucination
      better_direction: higher
      gate: true
      pass_threshold: 1.0
    - key: helpfulness
      source: llm_judge
      judge_key: helpfulness
      weight: 0.5

Rules:

Abstention And Unavailable Results

There is no abstention_rule, abstain, or unable_to_judge field in the YAML authoring surface.

Judges become unavailable when:

An unavailable judge result has no normalized_score; it keeps a reason and payload details such as failed calls or unable_to_judge_count. A source: llm_judge dimension with no normalized score becomes unavailable.

Result Shape

Judge-backed scorecards and replay surfaces can include llm_judge_results with:

payload includes call records, model scores, aggregated score, warnings, and n-wise candidates when applicable.

Security And Anti-Gaming

Common Validation Failures

Authoring Procedure

  1. Keep deterministic validators for hard checks.
  2. Choose the judge mode: rubric, assertion, reference, or n_wise.
  3. Pick the smallest useful context_from evidence set.
  4. Write rubric/assertion/prompt text that tells the judge how to use only that evidence.
  5. Select one model, or use models plus consensus only when cross-model agreement matters.
  6. Keep samples low; use scorecard.judge_limits for budget guardrails.
  7. Wire each judge to one source: llm_judge scorecard dimension with judge_key.
  8. Pair hard gates with deterministic validators or assertion judges.
  9. Validate with agentclash challenge-pack validate path/to/pack.yaml --json.
  10. Report judge keys, modes, evidence refs, model fan-out, budget settings, and any unavailable-evidence risks.

Report Back Format

Judge mode:
Judges:
- key:
  mode:
  model/models:
  samples:
  context_from:
  reference_from:
  consensus:
  score_scale:
  anti_gaming_clauses:
Scorecard dimensions:
Validator pairings:
Judge limits:
Unavailable-evidence risks:
Security review:
Validation command:
Validation result:
Open issues:

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.