Jev vs. Structured Outputs

Compare TypeSafe Jev's parallel decision architecture against generative LLMs with structured outputs (JSON schema) across speed, calibration, cost, and reliability.

Structured outputs constrain an autoregressive LLM to emit valid JSON schema tokens sequentially. TypeSafe Jev is a non-autoregressive decision model that evaluates typed questions in a single parallel forward pass, returning calibrated probabilities without generating text.

Controlled Benchmark: Jev vs. Gemini 3.8 Flash (Banking77)

In our September 2026 controlled benchmark across 385 Banking77 intent classifications (77 discrete intents), we evaluated TypeSafe Jev (jev-1.13.0) against Google Gemini 3.8 Flash (gemini-3.8-flash structured JSON mode):

Gemini 3.8 Flash: specifications, pricing schedule, thinking levels, and benchmark reality

entity
MetricTypeSafe Jev (jev-1.13.0)Google Gemini 3.8 Flash (gemini-3.8-flash)Delta / Comparison
Top-1 Accuracy79.48% (306 / 385)83.64% (322 / 385)Gemini +4.16% ($p = 0.0166$, exact McNemar)
Macro Class Accuracy79.48%83.64%Gemini +4.16%
Median Latency (p50)187.87ms1,203.82msJev 6.4x faster
Mean Latency204.94ms1,524.78msJev 7.4x faster
95th Percentile Latency (p95)319.55ms3,245.01msJev 10.2x faster
99th Percentile Latency (p99)480.81ms5,250.58msJev 10.9x faster
Minimum / Maximum Latency127.57ms / 780.26ms633.21ms / 10,738.12msMeasured client-side duration; Gemini tail max was 10.7s
Valid Schema Adherence100.0% (385 / 385)100.0% (385 / 385)Tied (zero schema failures)
Provider Error & Retry Rate0.0% (0 retries)0.0% (0 retries)Tied (100% clean transport)
Measured Cost / 1,000 Decisions$0.0679$0.4570Jev 6.7x cheaper (85% lower cost)

Key Trade-Offs: Speed vs. Accuracy vs. Cost

  1. Latency Profile: In our Banking77 run, Jev operated in a lower latency distribution. Its median client-observed response time was 188ms, and 95% of requests completed under 320ms. In contrast, Gemini 3.8 Flash recorded a median of 1.20 seconds, with p99 tail latency reaching 5.25 seconds and a maximum measured latency of 10.7 seconds. Applications must evaluate whether this latency profile satisfies their interactive performance requirements.
  2. Classification Accuracy: On these 385 evaluated examples, Gemini 3.8 Flash delivered higher top-1 accuracy (83.64% vs 79.48%, a +4.16 percentage point difference; exact two-sided McNemar test $p = 0.0166$). Observed predictions indicate Gemini resolved distinctions between closely related candidate labels (such as distinguishing order physical card from get physical card) that Jev occasionally confused.
  3. Token Economics on Large Choice Sets: On this 77-choice routing task, Jev required an average of 1,617 input tokens per query to ingest the full candidate criteria dictionary, resulting in $0.0679 per 1,000 decisions at its $0.042/M input rate (output is $0.00). Gemini's API reported an average of 28.7 prompt tokens and 5.3 visible candidate tokens per query, but also generated an average of 110.8 thinking tokens per query. Under Google's pricing, thinking tokens are billed at the full $3.75/M output rate, resulting in $0.4570 per 1,000 decisions. Because thinking tokens are billed at output rates, Gemini's overall cost per decision in this benchmark was 6.7x higher than Jev's.

Download or inspect the complete row-by-row dataset: /data/jev-banking77-benchmark.csv.

Side-by-Side Architectural Comparison

Architectural TraitLLMs with Structured Outputs (e.g., OpenAI, Anthropic, Google)TypeSafe Jev (jev-1.13.0)
Execution ParadigmAutoregressive (sequential token generation)Non-autoregressive (single parallel query pass)
Output SpaceUnbounded text constrained by JSON grammarBounded typed primitives (Choice, Score, Noul)
Schema ValidityHigh (grammar-guided masking guarantees syntax)Native typed primitive (no text generation or JSON parsing)
Semantic CorrectnessSusceptible to hallucination, sycophancy, driftBounded to predefined option criteria
Probability & CertaintyLogprobs require extraction; uncalibrated by RLHFNative calibrated probabilities via RLCD
End-to-End LatencyVaries by output tokens and reasoning steps (1,204ms p50 for Gemini 3.8 Flash in our benchmark)70ms – 500ms reported by TypeSafe (188ms p50 in our benchmark)
Input Token CostVaries by model. Gemini 3.8 Flash: $0.75 per million (Google paid tier, through Dec 31, 2026)$0.042 per million tokens ($42 / billion tokens)
Output Token CostVaries by model. Gemini 3.8 Flash: $3.75 per million, thinking tokens included (through Dec 31, 2026)$0.00 unmetered rate
Freeform Content GenerationFull (can draft emails, summarize, write code)None (cannot output strings, code, or explanations)

1. Latency Profile: Single Pass vs. Sequential Streams

When you invoke an LLM with structured outputs, the model predicts tokens sequentially: opening braces, key strings, quotes, colons, values, and any internal thinking tokens. In our 385-row Banking77 run, Jev's median client-observed latency was 188ms versus 1,204ms for Gemini 3.8 Flash. At the tail, Gemini's p99 reached 5,251ms and maximum observed latency was 10.7 seconds, whereas Jev's p99 was 481ms.

Jev does not generate tokens. It evaluates all questions simultaneously across the input representation. TypeSafe reports typical execution times of 70ms to 500ms. In high-frequency control loops—such as routing HTTP requests, gating agent tool calls, or triaging live events—sub-second decision latency fits directly into user-facing web requests, whereas multi-second LLM generation pauses create visible lag.

2. Uncertainty and Calibration

Generative models trained with Reinforcement Learning from Human Feedback (RLHF) are notoriously overconfident or verbally evasive. When asked for certainty, chat models often produce polite hedging ("I am fairly confident...") or output raw token logprobs that reflect next-token predictability rather than real-world task accuracy.

Jev is trained using Reinforcement Learning for Calibrated Decisions (RLCD). Every decision returns concrete numerical metrics:

  • In Choice and Score, Jev returns the probability distribution across all options and an overall confidence score.
  • In Noul, Jev returns a single floating-point probability representing the estimated likelihood that the condition holds true.

This enables deterministic thresholding in application code (e.g., if confidence > 0.90: auto_execute() else: route_to_human()).

3. Cost Economics: Billed Outputs vs. Free Outputs

In generative AI pricing, output tokens are typically 3x to 5x more expensive than input tokens. Extracting complex structured data with frontier LLMs incurs substantial output costs.

Jev inverts this dynamic:

  • Input tokens: $0.042 per million ($42 per billion), about 1/18th of Gemini 3.8 Flash's $0.75 per million. Google lists that Gemini rate through December 31, 2026, and $1.50 per million from January 1, 2027.
  • Output tokens: $0.00 unmetered. TypeSafe charges nothing for decisions because inference nodes do not run autoregressive generation loops.

In our Banking77 run across 385 decisions with 77 candidate choices, Jev cost $0.0679 per 1,000 decisions compared to $0.4570 for Gemini 3.8 Flash. Gemini's cost was driven primarily by thinking tokens (averaging ~111 tokens per query billed at Google's $3.75/M output rate), whereas Jev's cost was entirely input tokens ($0.042/M) with output billed at $0.00. While exact costs depend on schema size and reasoning token volume, eliminating billed output tokens gives Jev a structural cost advantage on high-volume bounded decisions.


When Structured Outputs on an LLM Are the Better Choice

Do not use Jev if your task requires:

  1. Dynamic String Generation: If your JSON schema includes freeform text fields—such as summary, explanation, user_reply_draft, or generated_sql—Jev cannot perform the task. Jev outputs only predefined choices, scores, or probabilities.
  2. Multi-Hop Reasoning Before Decision: If resolving the question requires complex symbolic math, multi-step logical deductions, or writing intermediate code, a frontier reasoning model (System 2) is required. Jev is a System 1 reflex model.
  3. Deeply Nested, Dynamic Schemas: If your target data shape includes variable-length lists of custom objects with arbitrary properties, standard JSON mode is the natural tool.
  4. Single-Tool Simplicity: If your system already runs a generative LLM and latency/cost at your current volume is negligible, introducing Jev adds an extra vendor and moving part.

When Jev Earns the Extra Moving Part

Jev delivers clear architectural value when:

  1. The Decision Space Is Bounded: You are picking among a known set of actions, categories, or risk levels (e.g. ticket triage, intent routing, lead scoring).
  2. Latency Must Be Sub-Second: The decision sits on the critical path of an interactive API, a real-time game loop, or an automated webhook handler.
  3. You Need Calibrated Confidence Gates: Your software needs to safely branch between fully automated execution and human-in-the-loop review based on statistical certainty.
  4. Volume Is High: At hundreds of thousands or millions of monthly events, Jev's $0.042/M input rate and unmetered output substantially reduce inference spend on bounded decisions compared to models billing for generated output or thinking tokens.
  5. Agent Action Guardrails: You want to inspect proposed tool calls or terminal commands for safety violations before execution without adding multi-second model latency to every turn.

Related Context

TypeSafe Jev: Architecture, Primitives, and Known Boundaries

entity

Jev Confidence Scores & Calibration Analysis

concept

Jev Pricing & Workload Cost Calculator

product

How to Choose an AI Model for a Software Task

concept

AI Model Waddle Evidence Standards & Benchmark Methods

concept

Sources & Documentation

  1. OpenAI Documentation: Structured Outputs Guide — Grammar-constrained JSON schema decoding on generative models.
  2. TypeSafe AI Documentation: System One Concepts — Non-autoregressive inference specifications and RLCD training overview.
  3. TypeSafe AI Documentation: Models & Pricing — Lists jev-1.13.0 at $0.042 per million input tokens with free output tokens. Checked September 26, 2026.
  4. Google Gemini API Pricing: Gemini 3.8 Flash — Paid tier: $0.75/M input and $3.75/M output including thinking tokens through December 31, 2026; $1.50/M and $7.50/M from January 1, 2027. Checked September 26, 2026.