Jev is a model for typed judgment
Jev does not continue or generate prose. It receives state plus bounded questions and returns Choice, Score, or Noul answers that software can read. It fits tasks where the answer space is known, but the raw evidence cannot be resolved with exact if/else rules alone.
ChoiceSelect one named option, such as routing a ticket to billing, technical, or human.
ScorePlace a case on an ordered scale, such as calm → frustrated → angry.
NoulEstimate whether one proposition is true, such as “Is this request urgent?”
Separate judgment from execution
A reliable call has five layers. The application shapes evidence and declares questions; Jev returns probabilistic answers; application policy checks schema, thresholds, and risk; only then may ordinary code perform an action. The model never receives authority to refund, delete, or publish.
- 1State
Keep only evidence that can change this decision, with clear labels, units, and provenance.
- 2Question
Declare the answer shape and criteria with Choice, Score, or Noul.
- 3Typed answer
Read the winner, full distribution, or P(true); do not treat the result as prose.
- 4Policy
Validate option keys, confidence, business risk, and whether review is required.
- 5Action
Let application code act, and log the question version, model version, and final action.
One support-routing example throughout
Assume the input is a customer message. We need to choose a team and detect urgency. Routing is a Choice, urgency is a Noul, and the actual assignment remains an application decision.
{
"message": "Stripe has failed for three days. Help ASAP.",
"account_tier": "enterprise"
}route → billing | technical | human
urgent → P(true)
policy → automate | reviewThis separation matters: the model answers two small questions and policy combines them. Adding SLA, enterprise, or high-risk rules later does not require hiding business logic inside a long prompt.
Make the first Jev call with Python
The official Python client is typesafe-sdk. Keep the key in a server-side environment variable and begin with a reversible task that is easy to review manually.
python -m pip install typesafe-sdkexport TYPESAFE_API_KEY="your-api-key"from typesafe_sdk import Choice, Noul, TypeSafeClient
questions = {
"route": Choice(
instructions="Which team should handle this request?",
criteria={
"billing": "Payments or subscriptions",
"technical": "Bugs or integrations",
"human": "Ambiguous or sensitive cases",
},
),
"urgent": Noul(
instructions="Does this message express urgency?"
),
}
with TypeSafeClient() as client:
result = client.system_one(
state={
"message": "Stripe has failed for three days. Help ASAP.",
"account_tier": "enterprise",
},
questions=questions,
)
route = result.answers["route"]
urgent = result.answers["urgent"]
if route.choice == "human" or route.confidence < 0.75:
enqueue_for_review(result)
else:
assign_team(route.choice)
print(route.probabilities, urgent.noul) Option keys exist, questions are non-empty, and the response shape is complete.
Review low-confidence cases; a high score never grants authority for irreversible actions.
Record model, question version, distribution, threshold, and final action.
Move the same contract into a Runnable
LangChain’s official TypeSafe integration exposes TypeSafeClassifier as a Runnable. Both state and questions travel with each invoke call, so the complete request can participate in batching, async execution, callbacks, and tracing.
uv add langchain-typesafeexport TYPESAFE_API_KEY="your-api-key"from langchain_typesafe import Choice, Noul, TypeSafeClassifier
classifier = TypeSafeClassifier()
questions = {
"route": Choice(
instructions="Which team should handle this request?",
criteria={
"billing": "Payments or subscriptions",
"technical": "Bugs or integrations",
"human": "Ambiguous or sensitive cases",
},
),
"urgent": Noul(
instructions="Does this message express urgency?"
),
}
if not questions:
raise ValueError("At least one Jev question is required")
result = classifier.invoke({
"state": "Stripe has failed for three days. Help ASAP.",
"questions": questions,
})
print(result.choices["route"].choice)
print(result.nouls["urgent"].noul) Orchestration, batching, callbacks, tracing
Probabilistic answers to bounded questions
Thresholds, authority, review, and side effects