# Send Llm As Judge to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "reddi-llm-judge",
    "name": "Llm As Judge",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/nissan/reddi-llm-judge",
    "canonicalUrl": "https://clawhub.ai/nissan/reddi-llm-judge",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/reddi-llm-judge",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=reddi-llm-judge",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "reddi-llm-judge",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T06:06:29.233Z",
      "expiresAt": "2026-05-09T06:06:29.233Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=reddi-llm-judge",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=reddi-llm-judge",
        "contentDisposition": "attachment; filename=\"reddi-llm-judge-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "reddi-llm-judge"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/reddi-llm-judge"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/reddi-llm-judge",
    "downloadUrl": "https://openagent3.xyz/downloads/reddi-llm-judge",
    "agentUrl": "https://openagent3.xyz/skills/reddi-llm-judge/agent",
    "manifestUrl": "https://openagent3.xyz/skills/reddi-llm-judge/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/reddi-llm-judge/agent.md"
  }
}
```
## Documentation

### LLM-as-Judge

Build a cost-efficient LLM evaluation ensemble for comparing and scoring generative AI outputs at scale.

### When to Use

Evaluating generative AI outputs across multiple models at scale (100+ runs)
Comparing local/OSS models against cloud baselines in shadow-testing pipelines
Building promotion gates where models must prove quality before serving production traffic
Any scenario where deterministic tests alone can't capture output quality

### When NOT to Use

One-off evaluations (just read the output yourself)
Tasks with deterministic correct answers (use exact-match or unit tests)
When you can't afford any external API calls (this pattern uses Claude/GPT as judges)

### Layer 1: Deterministic Validators (Free, Instant)

Run on 100% of outputs. Zero cost. Catches obvious failures before burning judge tokens.

JSON schema validation — does the output parse? Does it match the expected schema?
Regex checks — required fields present, format constraints met
Length bounds — output within acceptable min/max character count
Entity presence — do required entities from the input appear in the output?

If Layer 1 fails, score is 0.0 — no need to invoke expensive judges.

### Layer 2: Heuristic Drift Detection (Cheap, Fast)

Run on 100% of outputs that pass Layer 1. Minimal cost (local computation only).

Entity overlap — what fraction of entities in the ground truth appear in the candidate?
Numerical consistency — do numbers in the output match source data?
Novel fact detection — does the output introduce facts not present in the input/context? Novel facts suggest hallucination.
Structural similarity — does the output follow the same structural pattern as ground truth?

Layer 2 produces heuristic scores (0.0–1.0) that contribute to the final weighted score.

### Layer 3: LLM Judges (Expensive, High Quality)

Sampled at 15% of runs to control cost. Forced to 100% during promotion gates.

Two independent judges (e.g., Claude + GPT-4o) score the output. Each judge evaluates all 6 dimensions independently.

Tiebreaker pattern: When primary judges disagree by Δ ≥ 0.20 on any dimension, a third judge is invoked. The tiebreaker score replaces the outlier. This reduced score variance by 34% at only 8% additional cost.

### The 6 Scoring Dimensions

DimensionWeightWhat It MeasuresStructural accuracy0.20Format compliance, schema adherenceSemantic similarity0.25Meaning preservation vs ground truthFactual accuracy0.25Correctness of facts, numbers, entitiesTask completion0.15Does it actually answer the question?Tool use correctness0.05Valid tool calls (when applicable)Latency0.10Response time within acceptable bounds

Weights are configurable per task type. Tool use weight is redistributed when not applicable.

### Critical Lesson: None ≠ 0.0

When a dimension is not sampled (LLM judge not invoked on this run), record the score as null, not 0.0. Unsampled dimensions must be excluded from the weighted average, not treated as failures.

Early bug: recording unsampled dimensions as 0.0 created a systematic 0.03–0.08 downward bias across all models. The fix: null means "not measured", which is fundamentally different from "scored zero".

# WRONG — penalises unsampled dimensions
weighted = sum(s * w for s, w in zip(scores, weights)) / sum(weights)

# RIGHT — exclude null dimensions
pairs = [(s, w) for s, w in zip(scores, weights) if s is not None]
weighted = sum(s * w for s, w in pairs) / sum(w for _, w in pairs)

### Cost Estimate

With 15% LLM sampling, average cost per evaluated run: ~$0.003

Layer 1 + Layer 2: $0.00 (local computation)
Layer 3 (15% of runs): ~$0.02 per judged run × 0.15 = ~$0.003
Tiebreaker (fires ~12% of judged runs): adds ~$0.0003

At 200 runs for promotion: total judge cost ≈ $0.60 per model per task type.

### Worked Example: Summarisation Evaluation

from evaluation import JudgeEnsemble, DeterministicValidator, HeuristicScorer

# Layer 1: must be valid text, 50-500 chars
validator = DeterministicValidator(
    min_length=50,
    max_length=500,
    required_format="text",
)

# Layer 2: check entity overlap with source
heuristic = HeuristicScorer(
    check_entity_overlap=True,
    check_novel_facts=True,
    check_numerical_consistency=True,
)

# Layer 3: LLM judges (sampled)
ensemble = JudgeEnsemble(
    judges=["claude-sonnet-4-20250514", "gpt-4o"],
    tiebreaker="claude-sonnet-4-20250514",
    sample_rate=0.15,
    tiebreaker_threshold=0.20,
    dimensions=["structural", "semantic", "factual", "completion", "latency"],
)

# Evaluate
result = ensemble.evaluate(
    task_type="summarize",
    ground_truth=gt_response,
    candidate=candidate_response,
    source_text=original_text,
    validator=validator,
    heuristic=heuristic,
)

print(f"Weighted score: {result.weighted_score:.3f}")
print(f"Dimensions: {result.scores}")  # {semantic: 0.95, factual: 0.88, ...}
# None values for unsampled dimensions

### Tips

Start with Layer 1 — you'd be surprised how many outputs fail basic validation
Log everything — store raw judge responses for debugging score disputes
Calibrate on 50 runs — before trusting the ensemble, manually review 50 outputs against judge scores
Watch for judge drift — LLM judges can be inconsistent across API versions; pin model versions
Force judges at gates — 15% sampling is fine for monitoring, but promotion decisions need 100% coverage on the final batch
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: nissan
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T06:06:29.233Z
- Expires at: 2026-05-09T06:06:29.233Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/reddi-llm-judge)
- [Send to Agent page](https://openagent3.xyz/skills/reddi-llm-judge/agent)
- [JSON manifest](https://openagent3.xyz/skills/reddi-llm-judge/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/reddi-llm-judge/agent.md)
- [Download page](https://openagent3.xyz/downloads/reddi-llm-judge)