pub struct DecisionDef {
pub provider: String,
pub model: String,
pub api_key_env: String,
pub base_url: String,
pub timeout_ms: u64,
pub threshold: f64,
pub instructions: Option<String>,
}Expand description
Configuration for a TypeSafe Jev decision-model gate: a cheap (~$0.042/M input tokens) external
verifier, orders of magnitude cheaper than a frontier LLM-judge call. It asks Jev’s
POST {base_url}/v1/systemone a single noul (probability-of-yes) question — “does this
response fully and correctly satisfy this request?” — and passes iff P(yes) >= threshold.
The request and candidate response are carried only inside the state payload, as DATA — never
interpolated into instructions — so a candidate that tries to talk the verifier into a pass
cannot reach the instruction the model actually follows.
Unmeasured: this gate’s precision/recall against real failures has not been benchmarked.
Treat it as an unvalidated cheap pre-filter, not a drop-in replacement for judge.
Fields§
§provider: StringDecision-model provider. Only "typesafe" is built in today; validated by
Config::parse.
model: StringModel name passed to the provider’s API.
api_key_env: StringEnv var naming the API key. Read once at gate-build time; never logged, never put on the trace.
base_url: StringProvider API base URL.
timeout_ms: u64Hard timeout for the decision call. A timeout, transport error, non-2xx response, or a
reply this gate cannot parse all ABSTAIN (fail-safe) — never a fabricated Pass.
threshold: f64Pass iff P(yes) >= threshold. Must be in the open interval (0, 1); validated by
Config::parse.
instructions: Option<String>Override the default yes/no verification question. None (default) uses a generic
“does the response satisfy the request” instruction.