DeciderMethod class final

How a decider scores a request against its options.

A class with constant instances rather than an enum, so a method added in a later release does not break an app's exhaustive switch.

Annotations

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
Stable name: centroid, linear (also an artifact's method), optionScoring.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

centroid → const DeciderMethod
Cosine between the request and each option's centroid — the normalised mean of the option's example (and description) embeddings. No fitting: options can come from descriptions alone (zero-shot).
linear → const DeciderMethod
Softmax regression on the frozen embeddings, fitted on the options' inputs when the decider is created, with L2 weight decay fixed at 1e-5 (the value held-out rows and cross-fitting both picked in the measurements). Ranks by the regression's log-probability.
optionScoring → const DeciderMethod
An InferenceModel's method: the options are listed in a prompt with the question, and each option's id is scored as the model's reply (ScoreKind.logprob). For a model trained on that question and those options. EmbeddingModel.createDecider refuses it.