Jev knowledge base·verified Sep 22, 2026

jev vs rules

Choose deterministic rules for exact invariants and Jev for bounded semantic ambiguity, then combine both with auditable ordering and tests.

the short answer

Use deterministic rules whenever the condition can be computed exactly: permissions, paths, schemas, amounts, allowlists, rate limits and required fields. Use Jev only when the decision depends on the meaning of text and can be expressed as a bounded question. In mixed systems, run hard rules first, let Jev evaluate the remaining semantic condition, and keep final action logic in code.

Rules
Exact, reproducible conditions
Jev
Probabilistic semantic judgment
Safe order
Validate, authorize, judge, decide, log
Never delegate
Permission or exact invariant
Hybrid benefit
Rules bound the model’s authority

Ask Whether Code Can Know the Answer Exactly

ConditionUseReason
Path resolves outside workspaceRuleCanonicalize and compare deterministically
Refund exceeds authorized amountRuleExact numeric and permission check
Message contains a known credential formatRule firstPattern and DLP detectors are reproducible
Message reveals confidential intent indirectlyJev may add a signalMeaning depends on context
Tool choice matches the user’s stated goalJev candidateBounded semantic appropriateness

Run Deterministic Boundaries Before Semantic Judgment

A high Jev probability cannot grant a permission absent from the allowlist. A low probability should not override a mandatory statutory rule. This ordering limits both accidental errors and adversarial attempts to persuade the model.

01NormalizeParse paths, identities, amounts and schemas.
02Deny rulesReject exact forbidden conditions immediately.
03AllowlistRemove unavailable or unauthorized candidates.
04JevJudge one semantic condition on the remaining action.
05Policy codeApply tested thresholds, fallback and logging.
A model may refine an allowed action; it must not manufacture permission.

Rules Fail Differently from Semantic Models

Rules are predictable but can become a brittle patchwork when language is expressed many ways. Jev can generalize across wording, but it introduces probabilistic errors, provider dependency and version drift. Count rule exceptions, false matches and change frequency alongside Jev errors, review load and cost.

Do not replace a long ruleset solely because it is long. Some complexity represents real policy. First separate exact constraints, taxonomic lookup and semantic interpretation; only the last category is a plausible Jev target.

Worked Example: Screen a Proposed Refund Action

This ordering prevents Jev from answering questions the database already knows and prevents a semantic result from creating authority. It also makes failures diagnosable: a bad date check is a rule defect, missing conversation evidence is a projection defect, and disagreement with reviewed intent labels may be a Jev instrument defect. The agent tool-call evaluation guide uses the same evidence separation.

LayerQuestionImplementation
SchemaAre amount, currency and order ID present and valid?Deterministic parser and schema validation
AuthorizationMay this actor refund this order and amount?Identity, role, ownership and amount rules
Business invariantWas the order already refunded or outside the allowed window?Ledger and date logic
Semantic judgmentDoes the conversation show that the customer requested this refund?One Jev Noul over the relevant messages
DecisionShould the action proceed, wait for review or be rejected?Code-owned threshold and fallback

Determinism Is Especially Valuable at Trust Boundaries

TypeSafe documents adversarial steering as a Jev 1.13 weakness. Untrusted text can influence a semantic result, so use sandboxing, least privilege, argument validation and output encoding regardless of the score. Rules also need canonicalization because attackers exploit encodings, path aliases and parser differences.

Build adversarial fixtures for both layers. A rule test should prove equivalent encodings resolve identically; a Jev test should cover instructions embedded in user content and retrieved documents. The limitations guide supplies model-specific cases.

Compare Total Maintenance and Error Cost

Rules have engineering and review cost even when inference is free. Jev adds request cost, latency, outages and monitoring. Estimate the frequency of policy changes, traffic volume, false allows, false blocks and human escalation before choosing.

At low volume, a human or a clear rule may be simpler. At high volume with stable labeled data, a trained classifier may be cheaper. The alternatives guide frames these options without assuming Jev is always the answer.

Test the Hybrid, Rules-Only and Model-Only Designs

A model-only design is an important negative control even when it should never ship: it reveals which exact constraints the model happens to mimic and where it fails. A rules-only baseline reveals whether semantic inference adds measurable value at all. The benchmark methodology supplies paired analysis and uncertainty reporting.

  1. Freeze representative cases and independent labels, including exact denials and semantic edge cases.
  2. Run the current ruleset, Jev-only candidate and layered hybrid on the same evidence.
  3. Report false allows and false blocks separately for deterministic and semantic conditions.
  4. Measure automation coverage, review volume, p95 latency, provider failures and complete cost.
  5. Perturb encodings, wording and untrusted content to test both canonicalization and model steering.
  6. Promote the smallest architecture that meets the stated risk target and retain rollback fixtures.

Log Which Layer Made the Decision

  • Normalized input and deterministic rule version.
  • Authorization and allowlist result before Jev ran.
  • Jev state, question and resolved model references.
  • Full distribution and code-owned threshold band.
  • Final action, fallback, override and eventual outcome.

FAQ

Can Jev replace regex or schema validation?

No. Use deterministic mechanisms for exact patterns and structural validity. Jev may add contextual interpretation afterward.

Can a Jev score authorize an action?

No. Authorization comes from identity, permissions and policy code. Jev can only contribute a semantic signal.

Are rules always safer?

They are reproducible for conditions they correctly encode, but incomplete or poorly normalized rules can fail. Test the full layered system.

When should I replace a rule with Jev?

When the true condition is semantic, bounded and repeatedly difficult to encode exactly—and only after representative evaluation.

Sources

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

  1. TypeSafe AI docs: System One
  2. TypeSafe AI docs: Primitives
  3. TypeSafe AI docs: Jev 1.13 jaggedness
  4. NIST AI RMF: Measure function
  5. W3C: Rule Interchange Format overview