Developer method
Jev makes judgments, code makes decisions
Ask two focused questions
The illustrative host request uses POST /api/v1/decide with model selector jev and two Noul questions. state.message is synthetic text. The request does not ask the model to approve a refund.
The illustrative response contains answers.wants_refund.noul and answers.requests_human.noul. All probabilities, model labels, token counts, and balance values in this example are assumed, not measured. Noul is a probability, not a separate confidence field or an explanation.
This host uses jv_live_ keys. Official TypeSafe requests use a different endpoint and model IDs. Read the hosted API guide before integrating. Do not publish a secret in client-side code.
Contract: Hosted API guide.
Let code choose the review route
Validate both probabilities before applying rules. An explicit human request takes priority. A refund request can enter a review queue only when trusted application facts say the claim is eligible. Code compares amount_cents with the illustrative 2,500-cent boundary.
No branch executes a refund. The output is a queue label such as human_review or small_refund_review. The 0.8 and 0.2 probability thresholds demonstrate where a policy lives. They are not calibrated production recommendations.
A schema mismatch, missing answer, invalid probability, or invalid amount routes to a person. A real integration also needs timeout and HTTP-error handling before it passes a response into the routing function. An API failure must not become permission to act.
Keep a trace that distinguishes judgments from facts
Record the model identifier returned by the service, the question-template revision, validated judgments, policy revision, matched rule, and selected queue. Record references to the evidence your application supplied. These are application records, not an invented Jev evidence response field.
Do not log secrets or unnecessary customer text. Keep the final authorization and the side-effect log separate from the judgment trace. That separation helps you inspect whether a misroute came from interpretation, stale facts, or a rule.
Validate before automating
Freeze questions and evaluate on labeled examples that include ambiguous requests, unsupported inputs, and failure cases. Tune thresholds on a separate validation set. Track review coverage and errors on the data your application actually sees. Typed answers do not guarantee accuracy or calibration on every task.
Try the existing playground to inspect request patterns — it does not import this example. For a higher-stakes pattern see fraud signals and KYB review. For published results and limits, see third-party benchmarks.
Complete offline example: request
Synthetic input and assumed response, for illustration only. This code does not call a service or execute business actions.
{
"model": "jev",
"state": {
"message": "I want the duplicate charge refunded. Please have a person check it."
},
"questions": {
"wants_refund": {
"type": "noul",
"instructions": "Does the message request money back?"
},
"requests_human": {
"type": "noul",
"instructions": "Does the message explicitly ask for a person to review the issue?"
}
}
}Illustrative response
{
"model": "jev-1.14.0",
"answers": {
"wants_refund": {
"type": "noul",
"noul": 0.92
},
"requests_human": {
"type": "noul",
"noul": 0.87
}
},
"usage": {
"input_tokens": 180,
"billed_tokens": 180,
"output_tokens": 0,
"remaining_tokens": 11999820
},
"meta": {
"decide_model": "jev",
"credit_multiplier": 1
}
}Offline routing
import math
def probability(response, name):
try:
answer = response["answers"][name]
value = answer["noul"]
if answer["type"] != "noul":
return None
if type(value) not in (int, float):
return None
if not math.isfinite(value) or not 0 <= value <= 1:
return None
return value
except (KeyError, TypeError):
return None
def support_route(response, facts):
"""Return a review queue label, never execute a refund."""
refund = probability(response, "wants_refund")
human = probability(response, "requests_human")
if refund is None or human is None:
return "human_review"
if human >= 0.2:
return "human_review"
if not isinstance(facts, dict):
return "human_review"
amount = facts.get("amount_cents")
if type(amount) is not int or amount < 0:
return "human_review"
if refund >= 0.8 and facts.get("refund_eligible") is True:
return "small_refund_review" if amount <= 2500 else "refund_specialist_review"
return "general_support_review"Inspect request patterns in the playground
The playground does not auto-import this example, but it helps you rehearse Noul templates safely.
Referencia de origen: