hermes-rubric
Evidence-first assessment for agent outputs and applications.
Product page: hermes-labs.ai/hermes-rubric
Hermes turns an artifact into cited evidence, dimension scores, honest coverage facts, and caller-controlled feedback. It measures and explains; your application decides what to do next.
from hermes_rubric import FeedbackPolicy, assess
result = assess(
target=agent_output,
intent="Answer accurately and support material claims with checkable evidence.",
context=task_context,
target_type="agent-output",
backend="openai-sdk",
)
print(result.aggregate)
print(result.coverage.status)
print(result.feedback(FeedbackPolicy(minimum_score=7)).to_prompt())
The same call can sit inside LangChain, the OpenAI Agents SDK, Semantic Kernel, PydanticAI, a bespoke loop, a notebook, CI, or a plain Python service. Those frameworks are not core dependencies, and Hermes does not run an agent loop for you.
Install
The base package requires Python 3.10 or newer and PyYAML:
pip install hermes-rubric
For the example above, install the OpenAI extra and set OPENAI_API_KEY:
pip install "hermes-rubric[openai]"
Framework adapters are optional extras too: hermes-rubric[inspect] bundles an Inspect AI scorer and hermes-rubric[openai-agents] grades completed OpenAI Agents SDK runs. See Adapters.
You can instead use local Ollama, Claude Code, another built-in backend, or a backend plugin. Automatic selection checks authenticated Claude Code first, then local Ollama; cloud providers are always explicit opt-ins. See Backends.
Listed in
Inspect AI's extensions gallery lists the Inspect AI scorer adapter (merged UKGovernmentBEIS/inspect_ai#5265, 2026-09-09) — a listing, not an endorsement.
One transaction, three evidence-first stages
Hermes keeps the measuring process separate from runtime policy:
- Synthesize a task-specific rubric, load a bundled deterministic template, or accept a caller-provided frozen rubric.
- Collect and validate citations for each dimension.
- Score only against accepted evidence, applying the existing hedge, no-evidence, and source-authority clamps.
Provider failures and malformed scoring responses do not become fallback scores
or enter an aggregate. Batch mode retries a malformed or incomplete score
response per dimension; if a retry still fails, assess raises
AssessmentError with stage == "score".
The returned AssessmentResult has attribute access plus to_dict() and to_json(). Its JSON preserves the established CLI keys and adds a versioned schema and coverage report.
payload = result.to_dict()
assert payload["schema_version"] == "1.0"
print(payload["evidence_citations"])
print(payload["per_dim_scores"])
print(payload["receipt"])
The aggregate is a signal, not a verdict.
Choose the measuring stick
Synthesize from intent and context when the criteria should be task-specific:
result = assess(
target=answer,
intent="Evaluate whether this answer is accurate and well-supported.",
context="The answer must distinguish observation from inference.",
target_type="agent-output",
)
Reuse a frozen rubric when runs must share the same dimensions:
import json
from hermes_rubric import assess
with open("rubric.json") as handle:
frozen_rubric = json.load(handle)
result = assess(target=answer, rubric=frozen_rubric)
Use a bundled deterministic artifact class for common publishing surfaces:
result = assess(target=readme_text, artifact_class="repo-readme")
Bundled classes are social-post, show-hn-post, linkedin-post, outreach-email, and repo-readme.
Coverage is part of the result
Version 1.1 uses the existing UTF-8-safe prefix strategy for evidence collection. The default target window is 8,000 bytes. Hermes reports coverage.status as complete or partial, includes visible and total byte facts when they are knowable, discloses directory source limits, and lists plain-language limitations.
if result.coverage.status == "partial":
for limitation in result.coverage.limitations:
print(limitation)
partial means relevant material may not have been inspected. It must not be translated into “the evidence is absent.” Full chunked retrieval is a later engine capability, not a v1.1 claim.
Feedback without hidden policy
Hermes distinguishes three next-step types:
quality_gap: inspected evidence supports a score below a threshold you supplied.evidence_gap: accepted evidence is absent or hedged.coverage_gap: the relevant material may not have been inspected.
No pass/fail threshold is built in. FeedbackPolicy(minimum_score=...) is caller policy, and to_prompt() only creates deterministic instructions—it never mutates a runtime or retries an agent. A coverage-only gap asks for wider inspection, not an automatic rewrite.
File and CLI workflows
Use assess_path() for a file or directory:
from hermes_rubric import assess_path
result = assess_path(
"paper.md",
intent="Evaluate publication readiness.",
context_path="STYLE-GUIDE.md",
target_type="paper",
)
The CLI is the equivalent file and automation surface:
hermes-rubric \
--intent "Evaluate publication readiness" \
--context STYLE-GUIDE.md \
--target paper.md \
--out result.json
Existing flags, output keys, and stage exit codes remain available. See the full CLI reference.
Async wrappers keep synchronous providers off the event loop:
from hermes_rubric import assess_async
result = await assess_async(answer, rubric=frozen_rubric)
They use asyncio.to_thread; cancellation cannot interrupt a provider call already running in its worker thread.
When to use Hermes
Use it when:
- an agent or application needs cited, inspectable assessment rather than a raw judge score;
- weak or missing evidence must remain visible;
- the same assessment contract should work across different runtimes;
- receipts and frozen rubrics matter for reviewing repeated runs.
Use a deterministic validator instead when the rule can be expressed exactly. Do not use Hermes as proof of factual truth, as a compliance certification, or as an automatic release decision. If the artifact is longer than the inspected window, review coverage before acting on missing evidence.
For directly comparable re-grades, pass --pin-rubric prior-result.json to
reuse the prior result's rubric without changing its hash.
Evaluation and deployment engineering
For evaluation or deployment engineering around a specific application, contact roli@hermes-labs.ai.
Documentation
- Quickstart
- Python API
- Architecture and product boundary
- Adapter contract
- Backends
- CLI
- Benchmarks and evidence limits
- v1.2.3 release notes
- v1.2.2 release notes
- v1.2.1 release notes
- v1.1.1 release notes
- v1.1.0 release notes
Contributing
git clone https://github.com/hermes-labs-ai/hermes-rubric
cd hermes-rubric
pip install -e ".[dev]"
pytest
The adversarial tests in tests/test_adversarial.py are release gates. See CONTRIBUTING.md.
License
Copyright 2026 Hermes Labs. Licensed under Apache-2.0. See LICENSE.
Metadata
Release files for hermes-rubric 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hermes_rubric-1.2.3.tar.gz | 273.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hermes_rubric-1.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 342.5 kB
Release files / hermes_rubric-1.2.3.tar.gz
| Download URL | hermes_rubric-1.2.3.tar.gz |
|---|---|
| Size | 273.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29247d9918119171ffa102477ddc4354e9478a7c4dedc6da5e2984cf45b374c6
|
|
BLAKE2b-256 checksum How to use checksums |
6478a04ce1adda907c97a4e2326fdff20dbcdb0c2d04317e67c18603b0bf59fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / hermes_rubric-1.2.3-py3-none-any.whl
| Download URL | hermes_rubric-1.2.3-py3-none-any.whl |
|---|---|
| Size | 69.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da23d5044ca23092c9db9d066d0d4234383dba4fae3c793c31920ef298bc252d
|
|
BLAKE2b-256 checksum How to use checksums |
f59bb9bdfa7112916c4035dcb38bf40d5ad173230d0886362e47cf7169caa417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log