GenerateAnswerResponse Class

Response from the model for a grounded answer.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class GenerateAnswerResponse
Inheritance
Object    GenerateAnswerResponse

Constructors

GenerateAnswerResponseInitializes a new instance of the GenerateAnswerResponse class

Properties

Answer Candidate answer from the model. Note: The model *always* attempts to provide a grounded answer, even when the answer is unlikely to be answerable from the given passages. In that case, a low-quality or ungrounded answer may be provided, along with a low AnswerableProbability.
AnswerableProbability Output only. The model's estimate of the probability that its answer is correct and grounded in the input passages. A low answerableProbability indicates that the answer might not be grounded in the sources. When answerableProbability is low, you may want to: - Display a message to the effect of "We couldn’t answer that question" to the user. - Fall back to a general-purpose LLM that answers the question from world knowledge. The threshold and nature of such fallbacks will depend on individual use cases. 0.5 is a good starting threshold.
InputFeedback Output only. Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question. The input data can be one or more of the following: - Question specified by the last entry in Contents - Conversation history specified by the other entries in Contents - Grounding sources (SemanticRetriever or InlinePassages)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also