Jev knowledge base·verified Sep 22, 2026

jev for llm and agent guardrails

Use Jev for narrow semantic checks on model input, output and tool calls while deterministic systems retain authorization and enforcement.

the short answer

Jev can provide bounded semantic checks on an LLM input, output or proposed tool call, such as whether text discloses protected context or violates one policy definition. It is one signal inside a guardrail, not the enforcement system. Keep permissions and exact rules deterministic, test adversarial state, define outage behavior and shadow the check before blocking actions.

Semantic decision
Evaluate one semantic risk before input, output or a proposed action crosses a boundary.
Likely primitive
Noul for one violation; Choice for one policy category; Score for explicit severity levels.
Relevant state
the smallest untrusted content and trusted policy context needed for the check.
Keep deterministic
Code enforces identity, permissions, exact secret patterns, allowed actions, timeout behavior and the final decision.

The Useful Jev Decision

Evaluate one semantic risk before input, output or a proposed action crosses a boundary. Jev should receive only the state needed for that judgment: the smallest untrusted content and trusted policy context needed for the check. The application defines the possible answers before inference and consumes the typed result; Jev does not own the surrounding workflow.

An outbound-message gate can run exact DLP first and then ask whether the remaining text reveals confidential project context. This is a design pattern, not evidence that every implementation will perform well. Test the exact state, question, model version and action against representative outcomes.

Architecture: Evidence in, Judgment Out, Action in Code

The source record and projected state are not interchangeable. If decisive evidence never enters state, the model cannot recover it; if irrelevant or adversarial text is copied wholesale, it can move the result. Give the projection its own version and test it with the question. The state-design guide shows how to separate trusted fields, untrusted content and derived values.

01Source evidencethe smallest untrusted content and trusted policy context needed for the check.
02Deterministic preparationValidate fields, remove irrelevant context and construct only permitted candidates.
03Jev judgmentEvaluate one semantic risk before input, output or a proposed action crosses a boundary. Use Noul for one violation; Choice for one policy category; Score for explicit severity levels.
04Application decisionCode enforces identity, permissions, exact secret patterns, allowed actions, timeout behavior and the final decision.
05Observed outcomeRecord what happened after the action so the configured evaluator can be measured.
A jev for llm and agent guardrails system should expose each boundary instead of treating Jev as the whole application.

What Remains in Code

Code enforces identity, permissions, exact secret patterns, allowed actions, timeout behavior and the final decision. Exact checks should run before the model when they can narrow or reject candidates. After Jev returns, code applies thresholds, permissions, fallbacks and the final action. Store the raw distribution rather than only the selected label so later evaluation can distinguish a close decision from a concentrated one.

Version the Complete Decision Instrument

A final label alone is not enough to investigate a regression. The same label can come from a clear distribution or a near-tie, and it may have been produced by a different candidate set or projection. Keep the record append-only so a later threshold change can be replayed without rewriting history. The evaluator scorecard defines validity, robustness, calibration and utility checks for this complete instrument.

ComponentWhat to record
Evidence unitThe source record and projection used for: the smallest untrusted content and trusted policy context needed for the check.
Question contractEvaluate one semantic risk before input, output or a proposed action crosses a boundary.
Primitive and criteriaNoul for one violation; Choice for one policy category; Score for explicit severity levels.
Inference identityRequested model, resolved model, provider, timestamp and request ID
Raw resultSelected answer, complete distribution, confidence where defined, latency and failure state
Application outcomeThreshold branch, review or fallback, final action and later ground truth

How to Evaluate This Use Case

  1. Collect representative examples and define the observable outcome before tuning the question.
  2. Split broad quality into independently useful Choice, Score or Noul judgments.
  3. Pin the Jev model, question, criteria and state projection.
  4. Measure class-level errors, calibration, coverage, latency and cost against the simplest baseline.
  5. Add review or fallback behavior, then monitor drift and real downstream outcomes.

Run a Decision-Level Baseline Experiment

Compare the Jev design with the simplest credible existing method: deterministic rules, a keyword or embedding classifier, the current LLM prompt, or human-only handling. Hold the evidence unit and outcome definition constant, but allow each method to use its native interface. Include invalid responses, timeouts, retries and review work in the result instead of scoring only successful model calls.

The primary metric should reflect the cost of getting “Evaluate one semantic risk before input, output or a proposed action crosses a boundary.” wrong. Report class or rubric errors by important slice, calibration where the output supports it, automation coverage at the proposed threshold, p50/p95 latency and total workflow cost. Use grouped or time-based splits when related records could leak across train and test. The benchmark methodology gives a reproducible protocol.

Main Failure Mode

TypeSafe warns that adversarial content can steer Jev 1.13, so it cannot be the sole prompt-injection or authorization boundary. Jev 1.13 can also read instructions literally, lose accuracy in irrelevant long state and be steered by adversarial content. Keep state narrow, define boundary cases and never treat model confidence as authorization.

FAQ

Is Jev a good fit for guardrails?

Jev can provide bounded semantic checks on an LLM input, output or proposed tool call, such as whether text discloses protected context or violates one policy definition. It is one signal inside a guardrail, not the enforcement system. Keep permissions and exact rules deterministic, test adversarial state, define outage behavior and shadow the check before blocking actions.

Which Jev primitive should I start with?

Noul for one violation; Choice for one policy category; Score for explicit severity levels. Start from what the answer means: Choice for one option, Score for ordered levels and Noul for one independent yes/no condition.

What should not be sent to Jev?

Do not send fields irrelevant to the decision. Code enforces identity, permissions, exact secret patterns, allowed actions, timeout behavior and the final decision. Keep secrets and regulated data within the deployment's approved data-handling design.

How do I know whether the integration works?

Compare it with a deterministic or existing baseline on held-out outcomes. Report errors and coverage at the operating threshold, not only average accuracy or a demo result.

Sources

Checked against the sources below on September 22, 2026. Model versions, prices and limits change.

  1. TypeSafe AI docs: Example use cases
  2. TypeSafe AI docs: How to build with System One
  3. TypeSafe AI docs: Primitives
  4. TypeSafe AI docs: Confidence
  5. TypeSafe AI docs: Jev 1.13 jaggedness
  6. Community index: awesome-jev