Skip to content

DecisionAnswer

Namespace: Vercel.AI.Operations

public class DecisionAnswer

One model answer. Numbers are returned unchanged.

Inheritance: object

Derived: EvaluationAnswer

View source

DecisionAnswer(string, string?, double?, double?, IReadOnlyDictionary<string, double>?, DecisionBox?)

Section titled “DecisionAnswer(string, string?, double?, double?, IReadOnlyDictionary<string, double>?, DecisionBox?)”
public DecisionAnswer(string type, string? choice = null, double? score = null, double? probability = null, IReadOnlyDictionary<string, double>? probabilities = null, DecisionBox? box = null)

Creates an answer.

Parameters

Name Type Description
type string
choice string
score double?
probability double?
probabilities IReadOnlyDictionary<string, double>
box DecisionBox

View source

public DecisionBox? Box { get; }

Normalized box for a box question.

Value: DecisionBox

View source

public string? Choice { get; }

Selected choice.

Value: string

View source

public IReadOnlyDictionary<string, double>? Probabilities { get; }

Distribution. Keys are option ids or score indexes.

Value: IReadOnlyDictionary<string, double>

View source

public double? Probability { get; }

P(true) for a boolean question.

Value: double?

View source

public double? Score { get; }

Score.

Value: double?

View source

public string Type { get; }

Answer type. It is the question type, or refusal when the model declined the question.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product