Questions and answers
A decision model answers a question with yes or no, a choice, or a score, instead of generating text. decide asks it about each item in your data, and each answer comes back with its probability, so a script or a program can act on it directly. There is no prose to parse.
noulCould this command destroy work that is hard to get back?
git push --force origin mainyes >= 80%choiceWhich team should take this support ticket?
--format jsonscoreHow maintainable is this file?
<= 1.5Templates, items, and runs
Section titled “Templates, items, and runs”- A template is a named set of questions, such as “Is this file risky?”
or “Which queue does this ticket belong to?”.
decide templateslists the built-in ones, anddecide templates newstarts your own. - An item is one thing a template’s questions are asked about: a file,
a changed function, a JSON record, a line of text, or an image.
decide run TEMPLATE DATAasks about each item in your data. - A run is saved with every answer.
decide runslists past runs, anddecide runs viewshows the results again without asking the model.
Three types of question
Section titled “Three types of question”| Type | Asks | Shown as |
|---|---|---|
noul |
a yes-or-no question | risk no 88%, or unsure 52% yes between 40% and 60% |
choice |
which one of several options fits | queue billing 91% |
score |
where something falls on a scale | maintainability ━━━━━━━━──── 2.7 of 4 |
A noul answer is the probability of yes. A choice answer is the most
likely option, with the probability of every option. A score answer is a
point on the scale, with the probability of every level.
Flags and matches
Section titled “Flags and matches”Some templates flag the answers that need attention, such as a file
that is probably risky. A flagged answer is red and marked with !, an
answer close to a flag is yellow, and the others are green. The summary
lists the flagged items, and --fail-on flagged exits with code 2 when
there are any.
Other templates look for matches instead, such as the items relevant to
a question you choose. A match is bold green and marked with ●, and
--fail-on matched exits with code 2 when there are any.
decide templates show TEMPLATE says when each question is flagged or
matched. A yes-or-no answer between 40% and 60% is yellow in every
template: the model is unsure.
Providers
Section titled “Providers”decide runs on three decision models, with the same commands, templates, and Go code:
| Model | By | Runs on |
|---|---|---|
jev-latest, the default |
TypeSafe | the TypeSafe API |
clef, and clef-flash for lower latency |
Cloudflare | Workers AI |
gpt-6-luna |
OpenAI | the Decisions API, in beta |
Any other service that speaks the Jev API works too. The quickstart shows how to set a key for each.