In traditional generative pipelines, requesting structured output relies on prompt engineering, constrained decoding filters (e.g., GBNF grammars), or post-hoc validation retries. These methods try to constrain a token-by-token generative model into behaving like a decision function.
Jev, TypeSafe AI's discriminative System 1 model, works differently. It does not output arbitrary text tokens. Instead, Jev evaluates an input state (S) alongside one or more Typed Primitives (Q), yielding discrete probability distributions directly over a declared state space.
Every query to Jev requires defining questions using one of three primitive types: choice, score, or noul.
INPUT STATE (<=64k) → JEV ENGINE
Question: JEV ENGINE → CHOICE; SCORE; NOUL
NOUL, Binary Evaluator, (Single Float) → - noul float [0..1]
noul float [0..1], (No confidence)
CHOICE, Pick 1 of N, (Up to 255 keys) → - choice key
The choice primitive handles categorical decisions where the input state must be classified into exactly one discrete option out of a bounded set.
Cardinality Limit: Supports between 2 and 255 options per primitive.
Input Schema Structure: Requires a criteria JSON map (key-value pairs) where each key represents the typed enum value and the value contains instructions/descriptions defining that key.
Returned Fields: Returns the winning choice string, the full probabilities distribution across all options (summing to 1.0), and an aggregated confidence score.
Request Payload Example:
{}JSON
# JSON code goes here
{
"state": {
"ticket_text": "I was double billed for my subscription this month on order #TS-8821.",
"account_tier": "enterprise"
},
"questions": {
"department_route": {
"type": "choice",
"instructions": "Assign this ticket to the appropriate operational team.",
"criteria": {
"billing": "Inquiries regarding charges, double billing, invoices, or payment disputes.",
"technical": "Reports of software bugs, API downtime, or technical integration errors.",
"sales": "Questions about plan upgrades, custom contracts, or enterprise tier seats.",
"needs_review": "Unclear, ambiguous, or unclassifiable requests."
}
}
}
}
The score primitive rates an input state along an ordered numeric scale. Unlike choice (which treats keys as independent labels), score informs Jev that the levels are sequentially ordered.
Level Constraints: Accepts an ordered array of 2 to 10 criteria levels.
Calculation: Jev computes a probability-weighted float across the index levels rather than returning an integer. For example, if a 5-level scale distributes probability heavily across level 1 (0.4) and level 2 (0.6), the resulting score output will be 1.6 .
Returned Fields: Returns score (float), probabilities map (indexed by string keys "0", "1", etc.), legend map (echoing criteria descriptions), and a confidence metric.
Request Payload Example:
{}JSON
# JSON code goes here
{
"questions": {
"churn_risk": {
"type": "score",
"instructions": "Evaluate the customer churn risk based on interaction state.",
"criteria": [
"Low Risk: Expressing satisfaction or routine operational queries.",
"Moderate Risk: Expressing minor dissatisfaction with pricing or feature gaps.",
"High Risk: Threatening cancellation or requesting data export.",
"Critical Risk: Explicit account cancellation demands and active executive escalation."
]
}
}
}
Response Payload Example:
{}JSON
# JSON code goes here
{
"questions": {
"churn_risk": {
"score": 2.15,
"legend": {
"0": "Low Risk: Expressing satisfaction or routine operational queries.",
"1": "Moderate Risk: Expressing minor dissatisfaction with pricing or feature gaps.",
"2": "High Risk: Threatening cancellation or requesting data export.",
"3": "Critical Risk: Explicit account cancellation demands and active executive escalation."
},
"probabilities": {
"0": 0.01,
"1": 0.08,
"2": 0.66,
"3": 0.25
},
"confidence": 0.81
}
}
}
3. The noul Primitive
The noul primitive is Jev's high-speed evaluator for binary assertions. It evaluates whether a statement is true or false relative to the input state, returning a single probability float between 0.0 and 1.0.
Optimized Execution: noul is stripped of overhead to maximize throughput and minimize payload size.
No Confidence Score:noul returns a single float and omits confidence metrics and probability maps. If your application requires a confidence score for a binary decision, use a 2-level score primitive instead.
Request Payload Example:
{}JSON
# JSON code goes here
{
"questions": {
"contains_pii": {
"type": "noul",
"instructions": "The input text contains personally identifiable information such as SSNs, credit cards, or passwords."
}
}
}
Input Context Ceiling (64k Tokens): Jev supports up to 64,000 total input tokens per request. State payload allocation caps at 32,000 tokens, leaving remaining space for primitive schemas and instructions.
Cardinality Ceiling (255 Options): Individual choice primitives cannot exceed 255 keys. For larger sets (e.g., matching across 5,000 product SKUs), developers must use a two-step pattern: candidate retrieval followed by a Jev choice call over top candidates.
Question Independence: All primitives submitted in a single request payload are calculated in parallel against the input state. Questions cannot reference or depend on the output of sibling questions in the same API call.
Next in the Series
With Jev's primitive types and schema rules clarified, the next step is examining how TypeSafe AI trains and optimizes the model for speed, low cost, and reliable performance.
A new open-source framework from Microsoft Research Asia lets developers apply reinforcement learning directly to the same agent code they deploy, skipping the costly step of reimplementing the …
A plain-language guide to the raw material of supervised learning: what rows, columns, features and labels actually are, with worked examples and the mistakes beginners make with them.
OpenAI has released a large batch of mathematical manuscripts produced by an unreleased model, with an outside advisory group overseeing how the results are communicated after earlier controversy …
Space or K play/pause · J / L or arrows ±10 s · Shift+arrows paragraph · click a paragraph to jump
Cookies on MLHub
We use essential cookies to keep you signed in and the site secure. With your permission, we also record which
pages you visit and how long you read them, with your device type and an approximate location from your IP address,
to improve our articles and recommendations. We never sell this data. Your choice applies to analytics only.
Learn more.
Quick Feedback
Thank you!
Your feedback has been received and we'll review it soon.
Comments (0)
No comments yet. Be the first to share your thoughts.