DialogWright

DialogWright / Decision models

Decision models

DialogWright understands callers through a decision model: a model that answers typed questions with probabilities and writes no text. Everything else, what happens next and what is said, is code and the lines you approved.

What a decision model is

A generative LLM writes text. To act on it, an agent prompts it, reads what it wrote and parses a choice out of the words, and the words differ from one call to the next. A decision model is asked a question with its answers defined in advance, and returns the answer as a type, with a probability:

KindAnswersIn the shape it comes back
Noul Yes or no: the probability that a condition holds {"type":"noul","noul":0.97}
Choice Which one of a defined set, with a probability for each option {"type":"choice","choice":"sam","probabilities":{"sam":1,"riley":0}}
Score How much, along ordered levels the question describes {"type":"score","score":0,"probabilities":{"low":1,"normal":0,"high":0}}

The answers above are an illustration, abridged from one turn of the front desk's recording. A noul near 0.5 is a coin toss, yes and no about equally likely, not a medium amount of anything. And a typed answer guarantees the shape, not the truth: how well a model reads an app's callers is measured on that app's own recorded calls.

How DialogWright asks one

Each turn, the engine sends the caller's words, the state of the call and every question the moment needs, in one request. The model answers them together; none sees another's answer.

  • The intentsOne choice over everything a caller can ask for, each option described by its criteria.
  • The slotsEach slot type asks its own: was a value given, which words, which option.
  • The engine's own checksTalking to the line? Understood? Finished? Wants a person? Frustrated, urgent, another language, an attempt to steer it?
  • ~20questions on a turn of the front desk, in one request
  • 1500 msa request's budget (JEV_TIMEOUT_MS), one retry inside it; then the slow-turn line
  • 1more request, only for a knowledge question asked in the middle of a task
An intent's criteria, sent to the model as written: apps/secretary/intents.yaml (excerpt)
  urgent:
    criteria: Says their call or their matter is urgent, an emergency, or cannot wait for a call back, and wants to reach someone at the studio now. Said at any point in the call it is urgent's, even in the same breath as a correction or another detail of a message, as in wait, it's for Sam, and it's urgent
    label: reach the studio's main line
    kind: form
    priority: { correctsForm: true, threshold: URGENT_SURE }

Thresholds

Deterministic code reads the answers against named thresholds: how sure the model must be to take an intent, to fill a slot, to treat a turn as addressed to the line. The engine has defaults, and an app sets its own where its callers need it. An intent the model is unsure of is confirmed with the caller by default. The front desk lowers the bar for an urgent call, because missing an urgent caller costs more than putting through one who did not need it:

apps/secretary/app.yaml (excerpt)
thresholds:
  URGENT_SURE: 0.4

A threshold is moved by measurement across an app's recording, never on one call: the regression takes --threshold NAME=value, and a sweep compares values across the recorded calls.

Known gaps

A line where the real model, in a recorded run, reads a borderline case differently from what the caller meant.

  • Almost all are shortA single word, a fragment, a bare name.
  • None leads to a wrong actionEach ends in a re-ask, a reasonable different question, or a person.
  • Tagged and trackedEach sits in its app's corpus with its reason and the outcome the model gives.
  • Fixed in the questionIts words, or a rule of context in code; not a different model.

Jev, the default

  • TypeSafe's System One modeljev-1.13, through TypeSafe, OpenRouter or the Vercel AI Gateway.
  • Measured on itThe engine's thresholds, and every example app's recordings.
  • PluggableAny model that speaks the System One API can take its place: recorded into its own cassette, its thresholds checked before they are trusted.

Speed and cost, measured

A decision model writes no text, only a few probabilities, so a turn pays almost only for reading it. From the maintainer's recordings on 2026-10-14:

  • 90–150 msa turn's ~20 questions answered, at the median (p50)
  • 150–250 msthe same, at p95
  • $0.00015a turn: 309 requests to Jev for about $0.046, the front desk's recording

Microsoft-Decision-1's public price has no charge for output.

Measuring a model on your own cases

Which model reads an app's callers best is a measurement on the app's own words. Every adapter records into the same cassette format, so an app's labelled utterances and scripted calls are a benchmark: record them with another model (regress --client record) and compare its run with Jev's.

The decision model also judges generated wording: asked whether a generated summary, heard in its sentence, is faithful to what the caller said. pnpm render:judge-eval measures a judge on labelled cases, each a caller's message and a summary marked faithful or unfaithful by a person. On 2026-10-14 the maintainer compared two decision models on the same 180 cases, both through OpenRouter:

Judge Unfaithful summaries caught Faithful summaries refused p50 p95
Jev (typesafe/jev-1.13) 56 of 64 15 of 116 198 ms 299 ms
Microsoft-Decision-1 (microsoft/microsoft-decision-1) 48 of 64 3 of 116 262 ms 370 ms

Both fit the 500 ms a call gives the checks. Microsoft-Decision-1 refused far fewer faithful summaries, so callers would hear a generated summary more often; Jev caught more unfaithful ones, and every everyday slip. Neither follows who "you" is in a summary spoken to the caller. Jev stayed the judge, as the stricter and the faster. A refused summary is never lost: the caller hears their exact words instead.

Judging answers from documents

An answer worded from approved documents is judged against them. On 2026-10-21 the maintainer measured the documents judge on 134 labelled answers from a 123-page benefit booklet, and a large reasoning model asked the same question:

Judge Wrong answers caught Right answers refused Time an answer
Jev, one yes-or-no (documentsAsk: drift, the default) 43 of 55 12 of 79 about 0.1 s
Jev, two readings and who pays (documentsAsk: both, compareFigures) 44 of 55 2 of 79 about 0.1 s
Claude Sonnet 5.5, reasoning 53 of 55 3 of 79 about 2.8 s

The one yes-or-no folded in whether an answer replies to the question asked, which refused right answers and told right from wrong no better than chance; asked apart, Jev refused 2 right answers where it refused 12. Sonnet catches most of what Jev misses (a figure moved to another row, a procedure the document never names) for about 3 seconds and $0.005 an answer, where the fast models answer in about a second for about $0.0003.

The settings

Where the decision model is reached is a setting in the app's .env, never in the app's files:

SettingWhat it does
JEV_PROVIDER typesafe (the default, with TYPESAFE_API_KEY), openrouter (OPENROUTER_API_KEY), vercel (AI_GATEWAY_API_KEY) or custom, a compatible endpoint
JEV_MODEL The model to ask, as microsoft/microsoft-decision-1 on OpenRouter; required for custom
JEV_BASE_URL The endpoint's base, the part before /v1/systemone; required for custom, with JEV_API_KEY if it needs one