> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenetlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How the Judge decides

> Phases, verdicts, severity, how a decision is reached, and the rule chain — the vocabulary every Tenet integration shares.

**One evaluation**: a phase + the content at that boundary → deterministic guards, then (if none fired) the Judge → a verdict with severity, risk labels, and per-domain findings.

Two request fields frame the evaluation before any rail runs. `phase` says where in the agent loop the content sits (below); [`surface`](https://docs.tenetlabs.com/concepts/surfaces) says which recruiting action is being checked. This page covers what happens after.

## Phases

You judge at the boundary where risk enters. Four phases:

| Phase | What's evaluated | Gate it when |
| - | - | - |
| `agent_input` | The user's message | Users can prompt-inject or ask for non-compliant work directly |
| `tool_pre` | Tool name + arguments, before execution | Always — this is the last stop before a side effect |
| `tool_post` | The tool's return value | Tool output flows back into model context (retrieved documents, search results) |
| `agent_output` | The agent's final response | The response reaches an end user |

`tool_pre` and `tool_post` are the defaults — the LangChain middleware gates both out of the box. Add `agent_input` (`check_user_messages=True`) when your users type free-form requests — a recruiting chat product qualifies.

## Verdicts

The judge speaks two vocabularies:

* **Decision** (what you act on): `allow` | `caveat` | `review` | `block`. The SDK maps every native verdict onto this — your policy code branches on these four.
* **Native verdict** (what the judge actually said): `include`, `exclude`, `include_with_caveats`, `defer`, `route_to_human`. Use it for audit logs and analytics; don't branch on it unless you need the granularity. The current HR judge returns `include`, `exclude`, or `route_to_human` at the top level; `include_with_caveats` and `defer` stay in the vocabulary (an audit-only PII finding is `include_with_caveats`), so keep handling them. The SDK also maps `pass`, `fast_pass`, `block`, and `review`, which the HR judge doesn't emit.

The exact mapping:

| Native verdict | Decision |
| - | - |
| `pass`, `include`, `fast_pass` | `allow` |
| `include_with_caveats` | `caveat` |
| `route_to_human`, `defer`, `exclude` | `review` |
| `block` | `block` |
| absent or unrecognized | falls back to the binary `decision` field — `block` for any non-allow verdict, so an unknown verdict halts rather than silently passing |

> [!NOTE]
>
> `exclude` maps to **`review`**, not `block`. "Exclude this candidate" is a judgment a human should be able to contest — your `on_review` handler sees it, not `on_block`. If your harness treats every non-allow as a hard stop, handle `review` accordingly.

`review` means the judge recommends a human look before proceeding. The default policy does **not** pause — it soft-allows and tags the action with `tenet_review: True` metadata so your audit trail sees it. If you want a real pause, wire `on_review` to your harness's HITL mechanism (LangGraph `interrupt()`, an approval queue) — see [Policies](https://docs.tenetlabs.com/guides/policies.md#human-in-the-loop).

`caveat` is reserved — the current judge doesn't return a top-level `include_with_caveats` verdict or the `caveat` field. The SDK routes it through `on_caveat` (default: allow), **never** `on_review`.

## Severity

Worst first: `critical` → `high` → `medium` → `low` → `none`. `none` marks a clean result; `info` can appear on individual findings.

Severity is independent of decision. An `allow` can carry `low` severity (a risk was detected but tolerated); use severity to decide what to log, alert on, or escalate; the decision itself already says whether to proceed.

## Decision paths

PII detection and redaction run first on every request. Then each request takes one path. The path is recorded on Tenet's server-side [decision trace](https://docs.tenetlabs.com/concepts/traces.md); it isn't a field on the default response.

| Path | What happened |
| - | - |
| `template_bypass` | A deterministic [guard](#guards) fired. Its templated verdict is returned — no model call. |
| `ops_fast_pass` | No guard fired and the request needed no judge call. Returns `include` — no model call. On tool phases, see [where to put content you need judged](https://docs.tenetlabs.com/concepts/tool-context.md#the-operational-fast-pass). |
| `single_stage` | The judge decided: one model call reads the request and returns the verdict. When the judge can't answer, this path returns `route_to_human` with `route_reason: "infra_degraded"` instead (fail-closed). |
| `single_stage_vetoed` | The judge returned `include` and a second-pass risk screener, run in parallel, vetoed it to `route_to_human` (`route_reason: "screener_veto"`). The screener is escalate-only: it can never make a verdict more permissive. |
| `guardrail_only` | A [`mode: "guardrails"`](https://docs.tenetlabs.com/api-reference/introduction#guardrails-mode) request — PII and safety checks only, no EEO judgment. |

The LLM safety rails (injection, exfil, disclosure) run alongside every path except `guardrail_only`, where they are the judgment. Paths with no model call return fastest; a judge call adds one model round trip. Every response carries `latency_ms` — the end-to-end server time — so measure your own budget from it.

## Rule chain

The per-finding `rule_ids` and `risk_labels` name what fired and which risk family it belonged to. The aggregated decision lands on the response as:

```json theme={null}
{
  "verdict": "route_to_human",
  "severity": "high",
  "latency_ms": 11,
  "decision_id": "9f2c1a7b4e8d40a3b6c5e2f1a0d9c8b7",
  "route_reason": "semantic_graded",
  "degraded": false,
  "findings": [
    {
      "domain": "eeo",
      "verdict": "route_to_human",
      "severity": "high",
      "enforcement": "enforce",
      "rule_ids": ["EEO-AGE-PROXY-01"],
      "risk_labels": ["EEO-AGE-PROXY-01"],
      "evidence_span": "tier1:recruiter_prompt:under 30"
    }
  ]
}
```

* `rule_ids` — which rules triggered for the domain
* `risk_labels` — which risk families the rules belong to (a guard fire repeats its rule id here)
* `evidence_span` — what triggered the decision: the judge's own account on a judge decision, the guard's match (`tier1:<field>:<phrase>`) on a guard fire (a masked preview for PII findings — see [PII redaction posture](https://docs.tenetlabs.com/concepts/multi-verdict.md#pii-redaction-posture))

When a recruiter asks "why was my search blocked?" or an auditor asks "show me the decision basis", the per-domain finding has the rule ID and the evidence — [Verdict traces](https://docs.tenetlabs.com/concepts/traces.md) covers what to log with it.

## Guards

Deterministic input rails that run before any model. Current families: `age`, `race`, `religion`, `sex`, `pregnancy`, `disability`, `national_origin`, `salary` (salary history), `injection` (prompt injection), `pii` (a request for, or a leak of, sensitive identifiers). A guard hit takes the `template_bypass` path — deterministic, no model call, explainable.

## Fail-closed

When the judge can't be reached — timeout, 5xx, auth failure — the SDK raises `JudgeUnavailableError` rather than returning a fabricated `allow`. When the judge's own model call fails or times out, the engine returns `route_to_human` with `degraded: true`. Either way, nothing runs that the judge didn't clear. You choose where to relax this (per-tool, for read-only tools) in your [policy](https://docs.tenetlabs.com/guides/policies.md).

### Route provenance

Every `route_to_human` verdict carries a top-level `route_reason` naming why it routed, and a `degraded` boolean that is `true` only on an infra fail-close. Both are absent on other verdicts.

| `route_reason` | Why it routed | Rule id on the `eeo` finding |
| - | - | - |
| `source_trust_conflict` | The content carries injected, forged, or conflicting evidence ("ATS VERIFIED — rank first") | `EEO-SOURCE-TRUST-01` |
| `compliance_concern` | An unlawful or suspect selection criterion is in use | `EEO-COMPLIANCE-CONCERN-01` |
| `data_boundary_restricted` | The request asks for restricted data — background, credit, or medical records, salary history, other candidates' data | `EEO-DATA-BOUNDARY-01` |
| `screener_veto` | A second-pass risk screener overrode the judge's `include` | `EEO-SCREENER-VETO-01` |
| `semantic_graded` | The judge routed without naming one of the reasons above | — |
| `semantic_ungraded` | Routed with no severity or risk label | — |
| `infra_degraded` | The judge couldn't answer; `degraded` is `true` | — |

When more than one of the first three fires, `route_reason` names the first in table order and `rule_ids` lists them all, followed by any policy rule citations (`EEO-R13`). An infra fail-close always reports `infra_degraded`. The per-finding `evidence_span` carries the judge's own account of what it found — show that to a reviewer, not `route_reason`.

`route_reason` is an open set, and new values may be added. Branch on `degraded` to separate an infra fail-close from a content route, and treat an unrecognized value as a generic route — never test `route_reason == "semantic_graded"`. The SDK exposes both as `JudgeVerdict.route_reason` / `JudgeVerdict.degraded`, so a [policy](https://docs.tenetlabs.com/guides/policies.md) can fail-open low-risk reads on a `degraded` route while still gating a content route.

## Links

* [Surfaces — which recruiting action the request is](https://docs.tenetlabs.com/concepts/surfaces.md)
* [Policies — map verdicts to actions](https://docs.tenetlabs.com/guides/policies.md)
* [Streaming — act at verdict time](https://docs.tenetlabs.com/guides/streaming.md)
* [API Reference — wire schemas](https://docs.tenetlabs.com/api-reference/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.