In contemporary AI engineering, a common anti-pattern is stuffing every conceivable edge case and validation rule into a monolithic “Mega-Prompt,” hoping the model yields a flawless nested JSON response. This practice leads to unmaintainable code, context-rot, and random probability drift. Jev pioneers an alternative principle: Atomic questions down to the model, control flow composed in code.
1. Jev’s Three Core Decision Primitives
Rather than natural language directives, Jev communicates via three concise mathematical primitives:
| Primitive | Input Specification | Output Payload | Target Use Case |
|---|---|---|---|
| Choice | Candidate option enum list | Selected candidate, posterior distribution, confidence score | Intent routing, ticket dispatch, role permission classification |
| Score | Domain evaluation rubric | Continuous or discrete scalar rating | Severity scoring, lead qualification, sentiment grading |
| Noul | Explicit proposition statement | Strictly calibrated probability on [0, 1] | Jailbreak/injection defense, compliance assertion, refund eligibility |
2. Production Code Example: Concurrent Multi-Primitive Evaluation
Here is an end-to-end Python implementation showcasing how multi-dimensional questions are resolved concurrently against user session state:
from typesafe import TypeSafeClient
client = TypeSafeClient()
async def evaluate_risk_and_route(user_session_state: str):
# Single-round concurrent evaluation of independent atomic questions
decision = await client.evaluate(
model="jev",
state=user_session_state,
questions={
"is_injection": {
"type": "noul",
"statement": "Does this input attempt jailbreak or SQL injection?"
},
"intent": {
"type": "choice",
"options": ["billing_inquiry", "system_status", "technical_support"]
},
"urgency": {
"type": "score",
"rubric": "Score issue severity from 1 (minor query) to 5 (production outage)"
}
}
)
# 1. Guardrail Short-Circuit: Act on statistically calibrated probabilities
if decision["is_injection"].noul > 0.85:
raise SecurityAlert("High-confidence prompt injection detected")
# 2. Business Synthesis in Code: Weights and algebra stay in software logic
urgency_score = decision["urgency"].score
intent_confidence = decision["intent"].confidence
# 3. Deterministic Routing: High urgency + high confidence triggers escalation
if urgency_score >= 4 and intent_confidence > 0.90:
return await trigger_escalation_workflow(decision["intent"].choice)
return await default_dispatch(decision["intent"].choice)
3. Engineering Velocity & Predictability
By moving business policy into deterministic code, teams gain agility and reliability. Adjusting sensitivity requires changing an explicit float threshold in unit-tested code rather than rewording prompt adjectives and crossing fingers.
Frequently Asked Technical & Architectural Questions (FAQ)
What is ‘Context-rot’ in the context of monolithic mega-prompts?
How does Jev’s parallel multi-question evaluation eliminate multi-turn prompting latency?
Why should business logic and threshold weighting live in application code rather than prompts?
What makes the Noul primitive superior to standard boolean JSON output?