Repository navigation
ai decision making with probabilities
AI decision making holds up best when the model does not make the decision: it reads the text and returns probabilities, P(yes) for a yes/no question or one per option, and your code turns them into an action with thresholds you chose. Code also owns everything exact: dates, sums, money, limits and the record of what happened. When the model says it cannot place an answer, or the probability lands between your thresholds, the case goes to a person.
The split is about which mistakes you can see and fix. A threshold in code is a number someone chose on labelled cases and can defend; a policy hidden in a prompt is a sentence whose effect nobody measured.
This page is the division of labour, what a decision model hands back, one README request taken to an action, when a person takes over, who answers for the outcome, and where the approach stops.
The reading, and only the reading: whether a message reports a missing item, sounds upset or asks for money back, however it is worded. Everything after that belongs to code.
| Job | Owner |
|---|---|
| Read what the text says | the model |
| Turn a probability into yes or no | code, with a threshold you chose |
| Dates, sums, amounts, limits | code |
| Moving money, closing accounts | code, often with a person |
| The record of what happened | code |
| Answers the model cannot place | a person |
The arithmetic row is measured. On the README's six tasks, jevos-v4 scores 0.50 on Fraud points, where risk signals add up to a level, against 0.69 for TypeSafe's hosted Jev (five of the six sets helped choose the released checkpoint, so jevos's figures may be slightly optimistic). An earlier test on jevos-v2, a fraud score from six rules, found 34% right, barely above always picking the most common level, and confidently wrong. Hence the README's advice: compute sums in code and ask the parts as yes/no questions, as on small LLMs and arithmetic in yes/no questions.
A number per allowed answer, never a sentence. jevos answers in TypeSafe Jev's wire format with
output_tokens 0, so there is nothing to parse:
-
noul(yes/no): P(yes), from 0 to 1, compared with a threshold. -
choice: the most probable option, a probability per option and aconfidence. -
score: the expected levelscore, thelegend, a probability per level and aconfidence. The README marks scores as early.
The README's score example shows why the confidence matters. Asked "How angry is the customer?" on
calm, annoyed, angry and furious, jevos returns a score of 1.25 with probabilities 0.32, 0.27, 0.25
and 0.16, and confidence 0.0; asked "Is the customer angry?" as yes/no, it gives 0.28. The 1.25
is not "slightly annoyed"; it is a spread with no peak, and a job for a person. How this kind of
model differs from a chat model is on what is a decision model in AI?.
The README's refund request: a wireless mouse delivered 5 days ago, and the message "The box arrived empty. This is the second time!"
{
"model": "jev-latest",
"state": {"item": "wireless mouse", "delivered": "5 days ago",
"customer_message": "The box arrived empty. This is the second time!"},
"questions": {
"refund": {"type": "noul", "instructions": "Our policy refunds items reported missing within 30 days of delivery. Should this customer get a refund?"},
"upset": {"type": "noul", "instructions": "Is the customer upset?"},
"wrong_item": {"type": "noul", "instructions": "Does the customer say they received the wrong item?"}
}
}The README's answers are 0.93, 0.83 and 0.04, and they play three different roles:
-
refundat 0.93 is a candidate verdict. The question carries the 30-day rule, so the model also did the date check. Fine for a demo; once money moves, keep the window in code and ask only whether the customer says the item was missing. -
upsetat 0.83 never changes eligibility. It changes priority, or who replies. -
wrong_itemat 0.04 is information too. A confident no rules out an exchange.
Then code acts and records who made each call:
POLICY = {"version": "2026-10-12", "owner": "support lead", "yes": 0.9, "no": 0.2} # placeholders
def decide(ans, order):
p = ans["refund"]["noul"]
rec = {"p": {k: v["noul"] for k, v in ans.items()}, "policy": POLICY["version"]}
if order["days_since_delivery"] > 30:
rec.update(action="propose_decline", decided_by="person")
elif p >= POLICY["yes"]:
rec.update(action="refund", decided_by="code threshold")
elif p <= POLICY["no"]:
rec.update(action="ask_for_details", decided_by="code threshold")
else:
rec.update(action="review", decided_by="person")
rec["priority"] = "high" if ans["upset"]["noul"] > 0.5 else "normal"
return recChoosing the values from your own labelled cases is on
how to choose a threshold for P(yes), and the full
pipeline is on refund request triage with a local LLM.
What the sketch adds is decided_by: every record says whether a threshold or a person made the
call, and no refusal happens without a person.
When the model says it cannot place the answer, when the probability falls between your two thresholds, and when the outcome is adverse for someone, whatever the number says.
The first is measured. On choice questions, jevos-v2 was right on 95% of the answers with confidence 0.75 or more, which covered 46% of the questions, and on 47% of those below 0.25. The low end is where a person adds most. For yes/no questions a middle band does the same job, sized as on human in the loop AI with a review band.
Confidence also flags missing facts, but not always. On four sets, jevos-v4's confidence told answerable questions from ones missing a needed fact with an AUROC of 0.81 to 0.95 (0.5 means it cannot tell), yet it still answered 0 to 42% of the fact-missing questions with 75% or more confidence. When a fact must be there, ask for it directly, as on does an LLM know when a fact is missing?.
Whoever owns the threshold and the rule. The model returns a number; acting at 0.9 rather than 0.8 was a person's choice, on some date, on some cases. Make that visible:
- each threshold has an owner, a date, a case count and the model fingerprint
GET /healthreported when it was chosen; - each decision record keeps a hash of the state, the questions, the probabilities, the policy version and who decided, as on logging LLM decisions for audit.
Microsoft's documentation for its hosted Microsoft-Decision-1 draws the same line: for consequential decisions about people, "use the model for decision support with meaningful human review. Don't use it as the sole decision-maker." For the EU, our engineer's reading of GDPR Article 22, not legal advice, is on GDPR and automated decision-making with an LLM. A local model changes who sees the text, not who is accountable.
- Every input is already a field. Write the rule in code or an engine, as on decision engine vs decision model.
- The output must be text. A reply or a summary needs a generative model.
- The text is not English, or longer than the 8,192-token context.
- You need the most accurate answer and can send the text out. On the README's six tasks TypeSafe's hosted Jev scores higher than jevos-v4 on every one.
- You have no labelled cases. Without a few hundred of your own, a threshold is a guess.
What is AI decision making? Using a model's output to choose an action. Here, the model returns probabilities, and code with thresholds, plus a person for unclear cases, chooses the action.
Should the AI make the final decision? For routine, reversible actions code can act on the probability. For adverse or consequential ones a person decides, with the model's answers as input.
What does confidence 0 mean? On a choice or a score, that the model cannot place the answer. Route it to a person or ask a different question.
Can the model check dates and add up points? Do both in code. On a fraud score from six rules, jevos-v2 was right 34% of the time, and confidently wrong.
See also: what P(yes) means, thresholds when a wrong yes costs more than a wrong no and combining yes/no answers with AND, OR and NOT.
- Our measurements, published in the jev README: the six-task
comparison, the missing-fact AUROC and confidence figures for jevos-v4, and the jevos-v2 fraud
score and choice confidence figures. The refund and anger examples and their answers, the
question types and
/healthare from the same README. - Microsoft Learn, Deploy and use Microsoft-Decision-1 in Microsoft Foundry, fetched 2026-10-12: the quoted guidance. We have not measured jevos against Microsoft-Decision-1.
- The values in the code are placeholders.
From the notes of jev, a model that returns 0.93 for a refund and leaves the decision to pay it to your code.
- Ask a local LLM a yes/no question and get P(yes)
- Zero-shot text classification with yes/no questions
- LLM policy decisions: put the rule in the question
- LLM as a judge on a CPU
- What is a decision model in AI?
- AI decision making with probabilities and thresholds
- Why a small LLM says yes when the answer is no
- Small LLMs and arithmetic in yes/no questions
- Our held-out benchmark said 0.855, new questions said 0.757
- Does an LLM know when a fact is missing?
- Snake AI: a local model vs a cloud API
- jevos vs Jev vs Laya for yes/no decisions
- An open-source alternative to Jev for yes/no decisions
- jevos vs the OpenAI API for yes/no classification
- jevos vs Ollama for yes/no decisions
- jevos vs bart-large-mnli for zero-shot classification
- A yes/no LLM vs a fine-tuned BERT classifier
- jevos vs SetFit: zero-shot vs few-shot classification
- jevos vs Llama Guard for content safety checks
- jev serve vs llama.cpp server for classification
- jevos vs LM Studio: a decision server, not a chat app
- Local vs hosted LLM decisions: latency, cost, privacy
- A yes/no LLM vs a business rules engine
- LLM decisions vs keyword rules and regex
- An open-source alternative to Microsoft-Decision-1
- Decision engine vs decision model
- The fastest AI model for yes/no decisions
- What makes a local LLM fast on a CPU
- Why one forward pass beats generating an answer
- Prefill vs decode: where LLM latency comes from
- Why LLM latency grows with the length of the text
- Why a hosted LLM API cannot answer in 50 ms
- Many questions about one text: why the extra ones are cheap
- CPU or GPU for a small LLM
- Latency budgets: where a 200 ms model fits
- Measuring LLM latency: median, p90 and warm-up
- Q4_K_M vs Q8_0: speed and size for a small model
- Throughput vs latency for a decision server
- OpenVINO for LLM inference on a CPU
- INT8 weight quantization explained
- What P(yes) means, and what it does not
- LLM calibration explained with yes/no answers
- Expected calibration error (ECE), explained
- Temperature scaling for LLM probabilities
- Platt scaling for a yes/no model
- Reading a reliability diagram
- How to choose a threshold for P(yes)
- Thresholds when a wrong yes costs more than a wrong no
- Human in the loop AI with a review band
- Precision and recall at a P(yes) threshold
- Base rates: why a 0.9 yes can still be wrong often
- Combining yes/no answers with AND, OR and NOT
- Logits, log-odds and P(yes)
- LLM confidence scores: probabilities vs self-reports
- How to write yes/no questions an LLM answers well
- Negation in yes/no questions for an LLM
- One condition per question: splitting compound questions
- Ask whether the text says it at all
- Scores as yes/no thresholds: is it at least high?
- Sending JSON as the text: designing the state
- Why wording changes an LLM's answer, and how to test it
- Mainly about: questions for messages with several topics
- Yes/no questions about tone and emotion
- Asking about intent: what does the writer want?
- Yes/no questions about long documents
- Using an English-only LLM with other languages
- Multi-class text classification with a choice question
- Content moderation with a local LLM
- A Discord moderation bot with a local LLM
- Spam detection with yes/no questions
- Review moderation with a local LLM
- Email triage with a local LLM
- Support ticket routing with yes/no questions
- Urgency detection in customer messages
- Sentiment analysis with yes/no questions
- Intent detection with a local LLM
- Lead qualification with yes/no questions
- Fraud case triage with a local LLM
- Phishing email screening with a local LLM
- Log and alert triage with a local LLM
- Checking text for personal data with yes/no questions
- Prompt injection screening with a small model
- Document classification with a local LLM
- Product categorization with yes/no questions
- Contract clause detection with a local LLM
- Refund request triage with a local LLM
- Detecting cancellation intent in customer messages
- Reranking search results with yes/no questions
- RAG evaluation with yes/no questions
- RAG faithfulness check with a local LLM
- Hallucination detection with a local LLM
- LLM regression tests in CI with yes/no checks
- Rubric design for an LLM judge
- Pairwise comparison with a yes/no judge
- LLM judge bias and how to control it
- Evaluation metrics for yes/no classifiers
- Building a yes/no test set for your own data
- Accuracy by kind of question: why one number hides failures
- Generating test questions with answers computed by code
- Benchmark contamination and truly held-out tests
- An LLM router with yes/no questions
- A model cascade: small model first, large model on doubt
- Semantic routing vs yes/no questions
- Gating AI agent tool calls with yes/no checks
- AI agent guardrails with yes/no questions
- Stop conditions for AI agents
- Logging LLM decisions for audit
- Reducing LLM cost with local yes/no decisions
- Replacing chat LLM calls with yes/no questions
- Structured output vs a probability
- A Python client for local LLM decisions
- Calling a local LLM decision server from JavaScript
- Local LLM yes/no decisions in n8n
- A Slack bot that uses local LLM decisions
- Home Assistant automations with local LLM decisions
- A LangChain tool for local yes/no decisions
- Batch decisions from files with jev decide
- Running LLM yes/no checks in GitHub Actions
- Securing a local LLM server with an API key
- curl examples for a local LLM decision API
- Self-hosted AI for decisions
- A private LLM for text classification
- On-premise LLM for business decisions
- GDPR and automated decision-making with an LLM
- Offline AI for decisions: no network needed
- Edge AI decisions on a CPU
- Run an LLM locally without a GPU
- Small language models explained
- When a small model is enough, and when it is not
- An LLM on a laptop: what it can do in real time
- What is GGUF, for someone deploying a classifier
- GGUF quantization types explained: Q4_K_M, Q8_0 and others
- GGUF vs safetensors
- llama.cpp vs Ollama for a classification service
- llama-cpp-python vs calling llama.cpp through ctypes
- llama.cpp on Windows without compiling
- Running llama.cpp CPU only
- Using llama.cpp prebuilt binaries instead of building
- Download a GGUF model from Hugging Face