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
-
- @experimental
- @immutable
Properties
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.createDeciderrefuses it.