Launch offer+40%Claim →

Jev guardrails: check every LLM draft before it reaches a user

Ask several yes/no verification questions about a draft response in one parallel call, and block or regenerate when any probability crosses your line.

Run this example

4 questions · no key needed

The problem

Verifying LLM output usually means a second LLM pass (doubling cost and latency) or a pile of brittle regexes that miss anything semantic.

How Jev handles it

Because questions run in parallel against one state, a battery of checks costs about what one costs. Put it on the way out, between generation and the user.

python
response = client.system_one(
    model="jev-latest",
    state=draft_response,
    questions={
        "answers": Noul(
            instructions="Does this answer the user's question?",
            criteria=NoulCriteria(true="Directly addresses the ask",
                                  false="Evasive or off-topic"),
        ),
        "no_pii": Noul(
            instructions="Is this free of personal data?",
            criteria=NoulCriteria(true="No names, emails, addresses or IDs",
                                  false="Contains personal data"),
        ),
        "on_brand": Noul(
            instructions="Is the tone professional?",
            criteria=NoulCriteria(true="Courteous and appropriate",
                                  false="Rude, flippant or off-brand"),
        ),
        "no_promise": Noul(
            instructions="Is this free of commitments we cannot keep?",
            criteria=NoulCriteria(true="Makes no guarantee about dates or outcomes",
                                  false="Promises a refund, date or result"),
        ),
    },
)

a = response.answers
if a["no_pii"].noul < 0.9 or a["answers"].noul < 0.7:
    return regenerate_or_escalate()
Measured outputtypesafe/jev-1.13 · 2026-09-18

State sent the example loaded in Run this example above, as it first appears.

Answers returned

answers0.75
no_pii0.01
on_brand0.89
no_promise0.06
Latency (median of 3)
499.3ms
Minus network floor (198.8ms)
≈301ms
Input tokens
474
Cost
$0.00001991

A draft that should fail two checks at once: it leaks PII and guarantees a date.

Phrasing the checks for Jev guardrails

Point every check the same way. In the sample each Noul's true side is the safe outcome — answered, no personal data, on-brand, no promise — so one rule, "block if any check falls below its threshold", reads them all. Mixing directions invites a quietly inverted threshold, and you cannot patch one by subtracting from 1: TypeSafe's own example has a question scoring 0.72 while its negation scores 0.47, and the two need not sum to one.

Make each check atomic and name what it looks for. "Is this free of commitments we cannot keep?" works because the criteria spell out what a commitment is — a refund, a date, a result. Jev guardrails worded that concretely caught both problems in the measured draft, no_pii at 0.01 and no_promise at 0.06, while the tone check passed at 0.89.

What to put in the state

A Jev guardrails call can only check against what the state contains, so send the draft and the user message it replies to. The measured state held only the draft, and the "answers the question" check returned 0.75 — a hedge, since nothing in the state said what the question was. Label the two parts and name them in the instruction ("Does draft answer user_message?") so the model knows which text is which.

For policy checks, add the few facts the draft must respect as a short labelled block — refund window, delivery times, what agents may promise. Only the lines the checks need; a whole policy handbook in every call buries them.

What one decision costs

Jev guardrails bill for reading the draft and nothing for the verdicts, so cost follows the length of what you check. First line: the measured draft with four checks. Second: an assumed 1,200 tokens for a longer reply plus the user's message and a policy block. Third: 200,000 replies a month at that larger size.

arithmetic
# the measured draft, four checks
474 tokens × $0.042 / 1M = $0.0000199

# a longer reply with its question and a policy block
1,200 tokens × $0.042 / 1M = $0.0000504

# 200,000 replies a month at that size
200,000 × 1,200 = 240,000,000 tokens × $0.042 / 1M = $10.08

Regenerations add calls. If one draft in ten fails and is rewritten once, the check runs 1.1 times per reply, so budget for that rather than for replies sent.

Jev's answers on the measured call — answers: 0.75; no pii: 0.01; on brand: 0.89; no promise: 0.06, $19.91 per million calls

When not to use Jev for this

Where it fits in your stack

Jev guardrails sit between generation and delivery. The LLM drafts, a Jev guardrails call runs every check, and a failure either triggers a regeneration with the failed check named in the prompt ("remove the customer's email address") or escalates to a person once a retry limit is reached. Cap the retries so a stubborn failure escalates instead of looping.

Pair them with deterministic filters for what code does perfectly — email addresses, card numbers and phone formats by regular expression — and leave Jev the judgements a pattern cannot make, such as whether a sentence amounts to a promise.

Notes from the field

Common questions

Why not use a second LLM as the checker?

Speed, cost and a number you can threshold. Checking the measured draft five times per model, structured output on and sampling at its defaults, GPT-5 nano's "answers" check came back 0.92, 0.0, 0.92, 0.2 and 0.92, and Gemini 2.5 Flash Lite returned only hard 0s and 1s. Jev returned 0.74 to 0.76 every time, at 358 ms median against 960 ms and 8,853 ms.

How many checks can a Jev guardrails call run?

As many as you can word distinctly within the 64k-token request budget. Server time barely moves with the count: 70 ms for a one-question call against 81 ms for these four checks, measured on the first-party API.

Should failed drafts go back to the LLM or to a person?

Both, in that order. Regenerate first with the failed check named; after the retry limit, hand the draft to a person with the scores attached, so they can see which check failed and by how much.