We use cookies to enhance your experience, provide personalised content, and analyse our traffic; see our Cookie Policy.
typesafe/jev-1.13Jev 1.13 — structured decisions, not prose
The text or context to analyse — a message, a ticket, a document excerpt.
Each key becomes one answer. Keys must be unique.
Optional when criteria are set, but it sharpens the answer.
Each option and what it means. The model picks one.
A yes/no likelihood: no criteria, only the instructions matter.
Optional when criteria are set, but it sharpens the answer.
Lowest to highest. The model returns a score in between.
import Tchavi from '@tchavi/sdk';
const client = new Tchavi({ apiKey: 'API_KEY' });
const result = await client.decisions.create({
"model": "jev-1.13",
"state": "Customer writes: 'My API key stopped working after I rotated it.'",
"questions": {
"team": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "payments or credits",
"technical": "API, keys"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this?",
"criteria": [
"not urgent",
"normal",
"urgent",
"critical"
]
},
"blocked": {
"type": "noul",
"instructions": "Is the customer unable to use the product?"
}
}
});
// Answers are discriminated on `type`.
if (result.answers.team.type === 'choice') {
console.log(result.answers.team.choice, result.answers.team.probabilities);
}
if (result.answers.blocked.type === 'noul') {
console.log('blocked likelihood:', result.answers.blocked.noul);
}Every parameter this model accepts on the API. Check the SDK for full typings.
modelRequiredID of the decision model (e.g. `jev-1.13`).
stateRequiredWhat is being judged: free text, or any JSON object.
questionsRequiredAn object keyed by your own answer names — the same keys come back in `answers`. Not an array.
questions.*.typeRequired`choice` picks one option, `score` rates on an ordered scale, `noul` returns a yes/no likelihood.
questions.*.instructionsRequiredThe question itself, in plain language.
questions.*.criteriaA map of option to meaning for `choice`, an ordered array low-to-high for `score`. Omitted for `noul`.
Estimated over 30 days, ~1000 tokens per request (input + output).
Jev is not a chat model. You send it a state — a message, a ticket, a JSON record — plus the questions you want answered, and it returns each answer with a probability distribution and a confidence. Three question types: a choice between options you define, a score on a scale you define, and a yes/no likelihood. Use it where you would otherwise ask an LLM to 'reply with only one word' and then parse the word. On /v1/decisions, not /v1/chat/completions. One thing to expect on your bill: your questions are expanded into the prompt before the model sees them, so a short state with three questions is typically billed around 300-400 input tokens rather than the 30 or so you wrote. You are charged on what the provider reports. Output tokens are free.
jev-1.13+150 bonus on your first top-up · No card to sign up