Skip to main content

hermes-rubric

Score AI artifacts with receipts, not vibes.

PyPI Python License: MIT CI Hermes Seal

For builders shipping AI artifacts (papers, PRs, prompts, cold emails, lead dossiers) where you need a defensible score with citations, not an unaudited LLM judgment. Built for the case where "the model said 8.7" doesn't survive review.

Install

pip install hermes-rubric

Quick start

hermes-rubric \
  --intent "rate this paper for publication-readiness" \
  --context STYLE-GUIDE.md \
  --target paper.md \
  --out result.json

Truncated output:

{
  "aggregate": 8.7,
  "max_possible": 10.0,
  "hedge_dims": ["Reproducibility"],
  "hedge_note": "1 dimension had thin evidence - score less reliable: Reproducibility",
  "per_dim_scores": [
    {"dim_id": "claim_density", "score": 8, "rationale": "..."}
  ],
  "evidence_citations": [
    {
      "dim_id": "claim_density",
      "evidence_found": true,
      "citations": [
        {
          "quote": "...",
          "evidence_id": "S1:E1",
          "location": "S1:E1 — Whole document",
          "source_class": "doc"
        }
      ]
    }
  ],
  "dim_summaries": [
    {"dim_id": "claim_density", "name": "Claim Density", "score": 8, "weight": 3, "hedged": false}
  ],
  "receipt": {"backend": "claude-cli", "timestamp_utc": "...", "input_hashes": {...}}
}

What the keys mean:

  • aggregate - weighted score (0-10). Signal, not verdict.
  • hedge_dims - dimensions where evidence was thin. Scores in these dims clamp to [3, 7]. The more hedged dims, the less you should trust the aggregate.
  • evidence_citations - each score carries quoted evidence, its evidence_id, and a runtime-canonicalized location and source class. This is the audit trail.
  • receipt - records backend, timestamp, and input hashes. The demonstrated agreement is batch-versus-per-dimension scoring on five fixtures; Stage-1 synthesis remains non-deterministic.

What it does

Ask an LLM to score something. You get 8.4/10. No audit trail, no idea why, drift on rerun. Fluency outscores substance.

hermes-rubric replaces that with three stages: synthesize a rubric, collect evidence citations, score only against the evidence. Every score ships with a citation list (see the JSON above). Dimensions where evidence is thin get clamped and flagged. Batch and per-dimension scoring agreed within the pre-registered margin on five fixtures; that does not make Stage-1 synthesis deterministic.

Key features

  • Audit trail per dimension. Every score ties to quoted evidence with a runtime-canonicalized location. No more headline numbers without backing.
  • Hedge-on-thin-evidence. Dimensions with weak evidence are clamped to [3, 7] and flagged. The model can't bury weak evidence under a confident number.
  • Adversarial gates. Two tests fail the build if fluency outscores substance, or if fabricated claims outscore evidenced ones.
  • Reproducibility receipts. Record input hashes, backend, and timestamp. The demonstrated result is batch-versus-per-dimension agreement on five fixtures, not a general rerun guarantee.
  • Class-aware mode. --artifact-class social-post uses a fixed rubric template instead of LLM synthesis, for full reproducibility on repeated artifact types.
  • 7 backends out of the box. Claude Code CLI, Ollama (local, free), Anthropic SDK, Google Gemini, OpenAI, Qwen, plus a plugin entry-point for your own.

Numbers

Cross-model Cohen's κ = 0.629 on 96 paired runs across three model families. Per-backend: Gemini 2.5 Flash κ=0.642 (N=47), Qwen-Plus κ=0.621 (N=47), Claude κ=0.527 (N=2, transparency only). 115 tests with two adversarial gates (verify with pytest --collect-only -q | tail -1). Passes the pre-registered ≥0.6 reproducibility floor.

Reproduce the κ claim from raw artifacts in-repo:

git clone https://github.com/hermes-labs-ai/hermes-rubric && cd hermes-rubric
python experiments/batch-equiv-2026-04-25/compute_kappa.py

Expected output:

T1 (paper-quality)        κ=0.671  N=20
T2 (deploy-readiness)     κ=0.612  N=20
T3 (email-quality)        κ=0.604  N=18
T4 (paper-quality-v2)     κ=0.658  N=20
T5 (deploy-readiness-v2)  κ=0.601  N=18

per-backend mean: gemini-2.5-flash=0.642  qwen-plus=0.621
overall mean:     κ=0.629  N=96

If the script's output doesn't match this README, file an issue. The chain is broken and we want to know. Full per-target table at experiments/batch-equiv-2026-04-25/RESULTS.md.

When to use it

  • Scoring artifacts where fluency-vs-substance divergence matters: papers, proposals, PRs, cold emails, lead dossiers
  • You need an audit trail. "The model said 8.7" isn't enough; you need to know why
  • You're calibrating against a specific style guide and generic "quality vibes" won't do
  • You want the same input to produce a score you can reproduce and defend

When not to use it

  • Binary pass/fail gates (use a deterministic linter)
  • Single-sentence inputs (no evidence surface to cite)
  • Volume-over-fidelity scoring where cost matters more than rigor
  • Adversarial scoring where the author controls both the artifact and the rubric synthesis

Documentation

Examples

Three worked examples ship in-repo:

Library usage

from hermes_rubric.synthesize import synthesize
from hermes_rubric.evidence import collect_evidence
from hermes_rubric.score import score_dimensions, compute_aggregate

rubric = synthesize(intent="...", context_summary="...", target_type="paper", target_excerpt="...")
evidence = collect_evidence(rubric=rubric, target_content="...", target_path="paper.md")
scores = score_dimensions(rubric=rubric, evidence_list=evidence)
result = compute_aggregate(rubric=rubric, scores=scores)

Full API reference: docs/API.md.

Contributing

git clone https://github.com/hermes-labs-ai/hermes-rubric && cd hermes-rubric
pip install -e ".[dev]"
pytest

115 tests across 14 files, including two adversarial gates and a doc-consistency gate. See CONTRIBUTING.md.

License

MIT. See LICENSE.

Enterprise

For custom AI-reliability engagements, on-prem deployments, or audit-grade evaluation pipelines: roli@hermes-labs.ai · https://lpci.ai

About

hermes-rubric is part of the Hermes Labs reliability stack for the agent era. Founder: Rolando (Roli) Bosch. See ABOUT.md for the canonical bio and company context. Cite as: Bosch, R. (2026). Hermes Labs: AI reliability infrastructure for autonomous agents. https://hermes-labs.ai

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_rubric-1.0.1.tar.gz (224.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_rubric-1.0.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file hermes_rubric-1.0.1.tar.gz.

File metadata

  • Download URL: hermes_rubric-1.0.1.tar.gz
  • Upload date:
  • Size: 224.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for hermes_rubric-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a3f9c0ab9763fbec3c3a2acc06cf8f4533c2e89d4920079c5d180686c1ff4762
MD5 78c9c1cb5635a3d2e7a63e4248786fba
BLAKE2b-256 d123a2959c77a4676e68670add79a96b874688b4cb5a045d5a8332c8d7d4b2fd

See more details on using hashes here.

File details

Details for the file hermes_rubric-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: hermes_rubric-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for hermes_rubric-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96c7fe2508afebef28e1d3956499d8f0252b01dc3b0a2f1e4ef97c4c69ed1a80
MD5 5643dfe734152256a70b742e4e417023
BLAKE2b-256 5553a3337ad3e6eb5b5fbd2958a1f55683dc38f189a0fab5afdadcb0a19a4642

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page