N Noer

Jev Typed Decision Patterns: A Practical Use-Case Catalog

A practical catalog of Jev decision-plane patterns: typed primitives, request design, support routing, LLM routers, agent permissions, RAG filters, guardrails, extraction, search, moderation, CI, games, limits, and adoption checks.

Jev is useful when a product needs a decision, not a paragraph. That sentence is the practical boundary. TypeSafe AI introduced Jev as the first public “System One” model: a model that reads text or structured text state, answers predefined typed questions, and returns probabilities that ordinary code can consume. It is not a chat model, a writing model, or an autonomous agent. It is closer to a fast judgment function that you can place inside a request path, a batch job, a retrieval pipeline, or an agent harness.

The most durable way to evaluate Jev is not to ask whether it is “better than an LLM.” It gives up the part of an LLM that writes arbitrary strings. In exchange, it constrains the answer space in advance. A request supplies state and a map of questions. The answer comes back under the same question IDs. A Choice selects from declared options, a Score places the input on an ordered rubric, and a Noul returns the probability that a yes/no proposition is true. Choice and Score also expose their probability distribution and confidence. That makes Jev a decision-plane component: code owns the workflow, while Jev handles semantic judgments that are too fuzzy for rules and too small to justify another full generative-model call.

This catalog is deliberately practical. It separates official TypeSafe documentation and cookbook examples from community integration demos and from production evidence. The official material documents the model shape, primitives, request patterns, limits, a RAG passage-classification cookbook, confidence routing, and example use-case maps. LangChain, Spring AI, Vercel, and Netlify have published integration or gateway posts. Those are useful adoption signals, but they are not the same as independently verified production case studies. Where a source is a demo, this article calls it a demo.

The architecture pattern: put Jev in the decision plane

In a conventional LLM feature, the model often sits in the middle of the application: it receives a prompt, decides how to respond, and emits prose or tool calls that the rest of the system must parse, validate, and police. Jev fits a different shape. The application builds a normal workflow first, then inserts Jev only at narrow decision points: “Which queue should receive this ticket?”, “Does this passage contain a prompt injection?”, “How severe is this report?”, “Is any tool applicable?”, “Which candidate best matches this query?”

The surrounding software should keep deterministic work in code. Dates are parsed and compared in code. Counts are computed in code. Policy tables, account entitlements, budgets, allowlists, and side effects remain in code. Jev sees the relevant state and answers atomic semantic questions. The program then combines those probabilities with hard rules. This keeps failures observable. If routing is wrong, you can inspect the state, question wording, option descriptions, returned probabilities, thresholds, and final branch logic instead of digging through an unstructured conversation transcript.

The request/response shape encourages this discipline. A single request can ask many independent questions against the same state. The official docs stress that these questions are evaluated in parallel, so decomposition does not require a chain of serial model calls. A support ticket can be classified by department, urgency, refund request, tone, repeat-contact evidence, credential-seeking risk, and policy fit in one call. Code can ignore speculative answers that do not matter on the chosen path. The result looks like ordinary branching logic, but the fuzzy parts are typed probabilities rather than prompt-generated prose.

That is why “decision plane” is a better mental model than “small LLM.” Jev should not own the business process. It should supply calibrated decision signals to a process your application already owns.

The three primitives and how to ask the questions

Choice is for a closed set where one option should win. Use it for support queues, model routes, document categories, language labels, tool names, moderation outcomes, product taxonomies, or game actions. A good Choice has options that contrast with each other. If two options are commonly confused, describe what each one covers, what belongs elsewhere, and representative examples. Include other, none, or needs_review when the list is not exhaustive. Remember that Choice always returns a winner because the probabilities sum across your options; if “no option applies” is a real possibility, model it explicitly or add a separate Noul.

Score is for an ordered rubric. Use it for severity, quality, relevance, frustration, risk, confidence of evidence, brand suitability, report completeness, or extraction plausibility. Levels should be descriptions of situations, not naked numbers. “Broken feature with workaround” is a usable level; “medium” is weak unless the criteria around it make the boundary concrete. A Score can land between levels because it is the probability-weighted position across the rubric. The score is useful for ranking and thresholds, but the distribution and confidence matter. Two inputs can have the same score for different reasons.

Noul is for one yes/no proposition. Use it for “Does this message ask for a refund?”, “Does this passage contain a hidden instruction?”, “Is the candidate record the same person?”, “Does the output expose personal data?”, or “Is this claim supported by the cited text?” A Noul returns a value from 0 to 1; it has no separate confidence field because the probability itself represents the yes/no distribution. Keep one condition per Noul. Do not ask “Is the customer angry and asking for a refund?” unless the combined condition is truly the thing you need. Ask two Nouls and combine them in code.

The shared writing rule is atomicity. If a human reviewer would ask “which part do you mean?”, the question is too broad. Split it. If the answer depends on arithmetic, dates, exact counts, or a lookup table, compute those parts before or after the call. If the model keeps misreading a boundary, do not add vague persuasion. Add concrete criteria, examples, and a review branch.

Pattern 1: support routing and case triage

Support is the cleanest introductory case because the decision is high-volume, text-heavy, and usually reversible. The state can include the message, customer plan, open orders, recent tickets, entitlement flags, and a short policy excerpt. A single Jev request can ask:

  • department as a Choice: billing, orders, technical, account, abuse, sales, other.
  • requested_resolution as a Choice: refund, replacement, cancellation, explanation, human_agent, none_stated.
  • refund_requested as a Noul: does the customer explicitly request money back or account credit?
  • mentions_open_order as a Noul: does the message identify one of the supplied open orders?
  • frustration as a Score: calm, frustrated but civil, angry or threatening to leave, abusive.
  • credential_request as a Noul: does the message ask someone to reveal a password, code, token, or API key?

The policy should live in code. A typical decision policy is: closed tickets skip the model; obvious abuse or credential-seeking is quarantined; low-confidence department choices go to manual triage; high-confidence billing tickets route to billing; if a secondary department has a meaningful probability share, notify that team without changing ownership; refund actions require deterministic order and payment checks before any money moves. The model classifies intent and tone. It does not issue refunds.

This pattern is documented in TypeSafe’s official examples around support-ticket routing, Choice, Score, Noul, and the “How to build” guide. It is also echoed in the Vercel and Netlify gateway posts, where support-contact examples show typed questions returning directly branchable values. Treat those gateway examples as integration demonstrations, not proof that a specific enterprise support desk runs Jev in production.

Pattern 2: LLM router for model selection and cost control

An LLM router asks which model or handler should receive a request. The state might include the latest user message, product area, account tier, allowed tools, latency target, privacy mode, and prior failed attempts. A Choice can select fast_model, balanced_model, reasoning_model, retrieval_first, deterministic_handler, or human_review. Supporting questions can score task difficulty, safety risk, domain specialization, and whether the request can be answered by a deterministic path.

A useful policy is “choose the cheapest route that can safely complete the task.” Low-stakes lookups can go to a fast model or a normal handler. Architecture decisions, legal/compliance wording, irreversible account actions, or ambiguous tool use require a stronger model or a person. Confidence becomes a second axis. A high-confidence easy classification can route automatically; a medium-confidence high-stakes classification should ask for confirmation or escalate.

LangChain’s Jev post describes a ModelRouterMiddleware integration and positions Jev as a classifier inside agent middleware. That is a community integration and harness demo. It demonstrates fit and developer ergonomics, not audited production savings. Vercel’s AI Gateway changelog similarly describes Jev as available through an evaluation API and lists model-routing examples. Again: useful platform support, not production evidence by itself.

Pattern 3: agent permissions, tool gating, and “auto mode” controls

Agent harnesses need a fast permission layer. The question is not “what should the agent do next?” in an open-ended sense; it is “is this proposed action allowed to run unattended?” State can include the tool name, arguments, diff preview, target host, file paths, account role, declared task, user authorization, and recent conversation. Jev can answer narrow questions such as:

  • Does the proposed command modify files outside the allowed project?
  • Does this tool call expose a secret, credential, private key, or token?
  • Is this action destructive, externally visible, or financially consequential?
  • Does the proposed action match the user’s requested scope?
  • Which permission tier applies: safe_read, local_write, network_write, destructive, blocked?

The decision policy should be conservative. Safe reads can proceed at moderate confidence. Local writes may require a matching project boundary and a higher confidence floor. Destructive commands, production deploys, payments, account changes, database deletions, and secret access should require explicit deterministic authorization, not a model vote. Jev can flag risk and select a permission bucket; the harness still enforces the permission model.

LangChain’s post describes an AutoModeMiddleware that uses Jev to check risky tool calls before execution. That is a demo/integration pattern. It should not be represented as verified production adoption. The pattern is credible because it matches how coding harnesses already use classifiers, but each implementation still needs red-team cases, logs, override rules, and a hard deny path.

Pattern 4: RAG filters, conflict routing, and prompt-injection screening

RAG pipelines often fail between retrieval and generation. Embeddings retrieve text that is topically near the query, but the passages may be irrelevant, stale, contradictory, malicious, or simply not evidence. TypeSafe’s official RAG passage-classification cookbook is one of the clearest documented Jev patterns. It retrieves candidate passages, then asks multiple Noul questions for each query-passage pair: whether the passage is relevant, whether it contains answer evidence, whether it contradicts a premise in the query, and whether it attempts to instruct the answering model.

The decision policy is branchable: prompt-injection above a threshold is excluded; contradiction above a threshold is kept in a conflict block; low relevance is excluded; usable evidence is included; everything else is dropped. The generator then receives accepted evidence and conflicting evidence in separate sections, with instructions to treat passages as untrusted text and cite passage IDs.

This pattern is strong because Jev is not asked to write the answer. It classifies the evidence before a generative model writes. It also makes thresholds testable without new model calls. You can store the four probabilities per passage and re-run the routing function with different thresholds. The cookbook’s numbers are an official example over a constructed corpus with real documentation and a planted injection. They are documented evidence of a reproducible recipe, not a universal guarantee. Your corpus, retrieval method, and threat model still need their own evaluation.

Pattern 5: LLM output guardrails and evaluation batteries

Jev is a natural fit for “check every message” guardrails because the checks are small, repeated, and structured. For an input guardrail, the state is the user message plus relevant app policy. For an output guardrail, the state is the request, the model answer, tool results, and policy. A battery can include Nouls for jailbreak attempt, prompt injection, personal-data exposure, illegal assistance, self-harm support need, medical/legal/financial advice boundary, tool-call mismatch, and citation unsupportedness. A Score can grade severity. A Choice can select an outcome: allow, ask_clarification, safe_completion, review, block, support_response.

The policy should distinguish quality loops from safety stops. A quality evaluator can reject an answer, pass feedback to the model, and retry. A safety guardrail should have the last word and terminate when a block condition fires. Spring AI’s TypeSafe article demonstrates this separation with a Jev-based judge, self-refine advisor, and guardrail advisor. It reports runnable examples and live demo outputs. That is a meaningful framework integration, but still best described as a project/demo article unless you have independent deployment telemetry.

For evals, avoid one giant “is this good?” question. Break the judgment into separately inspectable criteria: answers the user’s request, grounded in supplied context, no impossible numeric claim, cites sources correctly, avoids prohibited advice, follows format, refuses only when policy requires. A single composite score can hide the exact failure that should block release. Jev’s probabilities are more useful when each one maps to a specific code path.

Pattern 6: bounded extraction and structured-data cascades

Jev does not generate arbitrary fields, so it is not a replacement for a parser or an extraction model when the answer space is open. It becomes useful when extraction can be bounded. The official docs describe an important workaround: find candidate values with deterministic code, regexes, OCR, or a generative extractor, then use Jev to choose or verify among candidates. Instead of asking “What is the invoice date?”, code identifies candidate dates and asks which span is the invoice date, whether a date is stated at all, and whether the extracted value matches the document’s described event.

For a two-stage cascade, a cheap extractor or regex pass proposes fields; Jev verifies each field against the source; only failed, ambiguous, or high-value records go to an expensive reasoning model or human reviewer. Question shapes include:

  • Choice: which candidate span is the vendor name, including none_of_these?
  • Noul: is this amount the total due rather than a subtotal, tax, or previous balance?
  • Choice: which month/day/year component is stated, including not_stated?
  • Score: how complete is this extracted record against the required schema?

Keep date comparison, currency arithmetic, validation checksums, and unit conversion in code. Jev’s documented jaggedness notes explicitly warn that numeric precision, counting, and date ordering are poor fits. The model can judge what a span means; code should compute what the span implies.

Pattern 7: semantic search, reranking, and high-cardinality choice

Search is another fit because retrieval often needs a second semantic decision after a cheap first pass. The official docs index includes cookbooks for reranking, line-by-line search, semantic find, and entity alignment. The recurring shape is: candidate generation happens outside Jev; Jev scores or chooses among candidates; code sorts, thresholds, and routes the result.

A reranker can ask one Noul per query-candidate pair: “Does this passage answer the query?” and sort by probability. A line-level finder can use Choice over line IDs, paired with a Noul that asks whether the document contains an answer at all. Entity alignment can use a Score rubric such as “definitely different, possible match, same entity” and route only uncertain matches to a curator. A tool index can use Choice to pick the best tool and a separate Noul to decide whether any tool applies.

Jev supports up to 255 Choice options according to the official Choice documentation and launch materials mention a two-stage score-then-choice strategy for higher-cardinality demos. That does not mean every search problem should be one huge Choice. Candidate quality still matters. A practical search policy is: generate a shortlist with lexical or vector retrieval; ask Jev narrow relevance questions; drop unsafe or irrelevant candidates; rerank survivors; keep thresholds and tie-breaking in code; evaluate top-k accuracy on held-out queries.

Pattern 8: moderation, fraud, abuse, and trust-and-safety triage

Moderation and fraud workflows rarely need an essay at the first step. They need a risk bucket, a severity score, and an escalation decision. State might include the message, account age, transaction description, prior flags, linked entities, marketplace listing, review text, or support history. Jev can ask whether the content contains harassment, spam, sexual content, policy-prohibited claims, personal data, payment fraud signals, counterfeit indicators, review abuse, account takeover hints, or opt-out language. A Score can rate severity or investigator priority.

The decision policy should be asymmetric. False negatives may create safety, compliance, or fraud loss; false positives may punish legitimate users. Use a three-way outcome: allow, review, block. Calibrate thresholds separately per action. For example, a high-probability credential-phishing signal blocks automatically; a medium fraud signal creates a review case; a low signal logs a feature for future risk scoring. Never make Jev the only fraud engine. Combine semantic signals with deterministic device, payment, velocity, graph, and rule-based checks.

The official use-case map lists financial crime, e-commerce marketplace enforcement, moderation, trust-and-safety, insurance claims, and risk assessment as example areas. Those are example use cases. They are not, by themselves, verified deployments in banks, insurers, or marketplaces. Treat them as design prompts until validated against your own labeled cases and review outcomes.

Pattern 9: CI, document classification, and semantic linting

Jev can sit in CI where the target is a semantic label, not a deterministic compiler error. Examples include classifying documents by policy type, routing pull requests to reviewers, detecting whether a changelog entry describes a breaking change, checking whether release notes mention required migration steps, labeling incident reports by cause, or enforcing writing guidelines. The state can include the diff, file path, PR title, commit message, policy checklist, or document excerpt.

Question shapes are straightforward: Choice for document class, Noul for “does this PR change public API behavior?”, Score for risk or review priority, Noul for “does this section contain a user-visible migration instruction?”, and Choice for which team owns the change. The policy should not fail builds on immature thresholds. Start by posting labels and review suggestions. Once the signal is proven, graduate only low-risk checks to blocking status. Keep a human override and store examples that caused disagreement.

This pattern connects to TypeSafe’s official semantic code linting and hierarchical classification examples, plus Spring AI’s evaluator and document post-processor demos. Again, the distinction matters: framework demos and documented recipes show how to wire the pattern; production gating requires measured precision, recall, developer acceptance, and a rollback path.

Pattern 10: games, real-time UI, and interactive loops

Jev’s launch post highlights real-time applications and includes team demos such as Doom and Wikiracing. The point is not that Jev beats a hand-written bot or a specialized planner. The point is that a typed decision model can be fast enough to sit in an interactive loop where a normal reasoning model would be too slow or too expensive. A game state can be serialized as text or structured fields, and Jev can choose among bounded actions: move, dodge, attack, collect, retreat, inspect, or choose the next link in a navigation game.

The policy for games and realtime UI should be modest. Use Jev for reactive judgments over structured state, not for long-horizon planning that requires memory, tool use, visual perception, or exact physics. If the state is visual, preprocess it into text or structured features because the current model accepts text input only. For real-time product UI, use it where a 100–500ms semantic decision improves the experience: classify a live support chat turn, choose a next hint, rank candidate commands, or decide whether to ask a clarifying question.

These are demos and fit signals, not production evidence. The launch post itself notes nuance around demos, including structured-state input rather than images for Doom and a two-stage approach for high-cardinality choices in Wikiracing. Do not overclaim them.

What is documented, what is demoed, and what is proven

The documented core is solid enough to reason about. Official TypeSafe sources describe System One models, Jev’s request shape, primitives, confidence, current model limits, pricing, context budget, rate limits, model aliases, language support, jaggedness, and multiple cookbooks. The RAG passage-classification cookbook is a concrete official recipe. The confidence-routing pattern and support-routing examples are documented architectural patterns.

The community and platform layer is broader but less evidentiary. LangChain shows middleware for model routing and risky tool-call checks. Spring AI shows a Java/Spring integration with judges, guardrails, self-refine, document filters, rerankers, tool indexes, and evaluators, including runnable demos. Vercel and Netlify expose Jev through AI Gateway-style integrations and show deployment-oriented examples. These posts demonstrate developer access and ecosystem interest. They do not prove that a named customer has run Jev at production scale with published accuracy and incident metrics.

Verified production evidence is limited in the available extracts. LangChain mentions a few community projects in passing, but the extracts do not include independent case studies, customer SLAs, public postmortems, or audited production metrics. TypeSafe’s own workflow evals and cookbooks are useful, but they are vendor-published. The right editorial conclusion is not skepticism for its own sake; it is precision. Jev has a clear practical fit, promising official benchmarks, and early ecosystem integrations. Public production proof should still be considered thin until users publish workload-specific results.

Limits that should shape every adoption plan

The official model page lists Jev 1.13 as a text-only model using POST /v1/systemone, with current pricing stated per input token and output tokens described as free. It lists rate limits and context budgets, including a 64k-token request budget and a 32k-token budget for state plus the longest question. These numbers can change, and aliases such as jev-latest can move. Pin a version when thresholds matter.

The jaggedness notes are more important than the marketing numbers. Jev can be literal. It struggles with extra indirection, numeric precision, counting, date comparison, large irrelevant state, adversarial content, contradictory criteria, and generation. It accepts text, JSON objects, and arrays of text, not images, audio, or video. English is the primary training language, and other languages require local testing. It is not trained to produce explanations or prose. If your workflow needs text generation, use a generative model and let Jev check or route around it.

Security boundaries need special care. A Jev injection score can help filter retrieved passages, but it is not a sandbox. The generator prompt still needs to treat every passage as untrusted. A tool-risk classifier can reduce accidental execution, but the harness still needs hard permission enforcement. A moderation signal can prioritize review, but policy and appeals must remain explicit.

Adoption checklist

  • Start with a reversible decision. Support routing, review prioritization, and evidence filtering are better first projects than payments, account deletion, or enforcement bans.
  • Write the workflow in code first. If you cannot describe the deterministic branches without Jev, the integration is not ready.
  • Decompose broad judgments. Ask many atomic Choice, Score, and Noul questions in one request instead of one vague question.
  • Keep numbers in code. Counting, date math, price math, limits, and exact comparisons should be computed outside the model.
  • Use labeled examples. Build a test set from real cases and measure accuracy, precision, recall, review rate, and cost before expanding scope.
  • Tune thresholds per action. The threshold for showing a help article is not the threshold for blocking a user, executing a tool, or issuing money.
  • Log state, question version, model version, probabilities, confidence, and branch outcome. Without those logs, you cannot debug drift or review incidents.
  • Pin model versions for calibrated workflows. Use aliases for experiments, but version IDs for production thresholds.
  • Plan fallbacks. Low confidence, conflicting signals, rate limits, and API failures should route to safe behavior, a human, or a slower model.
  • Review data handling. Decide whether gateway options, zero-data-retention modes, regional needs, and customer-data restrictions fit your environment.

Where Jev fits best

Jev fits where software already knows the possible actions but needs help reading messy human or document state. It is strongest as a small, cheap, typed judgment layer: route this, score that, detect this property, choose among these candidates, verify this output, filter this evidence. It is weakest when the task is open-ended generation, exact computation, deep multi-step reasoning, or broad autonomous planning.

The interesting product implication is that many AI systems do not need a bigger agent at every step. They need more decision points that are cheap enough to run every time and constrained enough to audit. Jev’s best use cases will look less like chatbots and more like ordinary software with smarter if statements: confidence-aware support queues, safer RAG prompts, guarded agent tools, better rerankers, semantic CI labels, fraud triage, and real-time UI branches. That is a narrower claim than “new model changes everything,” but it is also the claim that makes the most architectural sense.