Expand description
Optional decision backend (docs/decision-model-proposal.md §4, rows
E1–E3).
A decision (System One) model answers named, typed questions about a
state with probabilities — no text generation. The loop uses one, when
a host installs it with Engine::with_decider,
in three places:
- E1 — GROUND and VERIFY of LLM drafts: a calibrated
noulper draft × cited evidence replaces the LLM’s grounding verdict, and a calibratednoul“is it sound?” supplies VERIFY’s routing number in place of the verifier’s self-reported confidence (the LLM’s keep/kill still runs). - E2 — the duplicate and contradiction sweeps widen past token Jaccard and the seeded functional relations, asking “same claim?” / “can both be true?” of the candidate pairs the deterministic rules cannot decide.
- E3 — a free-text tool failure cause is classified into the closed
cause vocabulary with a
choice.
A decision model may score; only code gates. Nothing here approves,
applies or rolls back: a judged draft is still a pending recommendation,
and the engine refuses to auto-apply anything a model judged
(Recommendation::judged_by). An uncalibrated backend never omits — a
probability from one is not used to drop or propose anything (proposal §2
rule 2); those stages fall back to today’s rule. Fail-soft — a backend
error or malformed answer drops that stage’s contribution for the run
(LOP-E051, recorded on the run’s DeciderReport), never the run.
This crate has no Areev dependencies, so the seam is a minimal trait over
the proposal’s WIRE JSON: {"state": …, "questions": {…}} in, {"answers": {…}, "provider", "model", "calibrated", "latency_ms"} out. The Areev bridge
(areev_loop_adapter::LoopDecider) implements it over
areev_core::decide::DecisionBackend; a subprocess could implement it just
as well.
Structs§
- Answered
- One validated response.
- Decider
- The engine’s handle on an installed backend: the typed helpers every
stage uses, the per-run counters behind
DeciderReport, and the per-run tool-cause cache. - Decider
Report - What the decision backend did during one run — on
RunResult::decider, beside the LLM funnel. - Judged
By - Who judged a recommendation, with what, and what it answered — the
attribution record (proposal §2 rule 4) carried on a
Recommendationa decision shaped.
Enums§
- Ask
- A question to ask:
(id, instructions)for anoul, or with options for achoice.
Constants§
- CAUSE_
MIN_ P - The probability the argmax of a tool-cause
choicemust reach to be used; below it the cause staysunknown. - DECIDE_
MIN_ P - The probability a
noulanswer must reach for a calibrated decision to ground a draft, route it past VERIFY, or propose a sweep draft. The same number as the LLM verifier’s confidence floor. - DEFAULT_
PAIR_ CAP - The default per-sweep, per-run cap on pairs sent to the backend.
- QUESTIONS_
PER_ REQUEST - Questions batched into one request by the sweeps and the cause classifier.
- TOOL_
CAUSES - The closed tool-failure cause vocabulary with the description each option
is offered under. Mirrors
areev_core::types::FailureCause(the adapter pins the two against each other in a test — this crate cannot import it).
Traits§
- Decide
Backend - The seam: one wire request in, one wire response out.
Functions§
- parse_
response - Validate a wire response against what was asked: every id present with
the matching type, every probability finite and in
[0, 1], choice options drawn from what was offered. Anything else isLOP-E051.
Type Aliases§
- Cause
Verdict - A classified tool cause: the vocabulary key, its probability, and the
decision that produced it —
Nonewhen the cause staysunknown.