Join the Gemini API Developer Competition!
Learn more
Send feedback
google.ai.generativelanguage.GenerateAnswerResponse
Stay organized with collections
Save and categorize content based on your preferences.
Response from the model for a grounded answer.
Attributes
answer
google.ai.generativelanguage.Candidate
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
answerable_probability
.
answerable_probability
float
Output only. The model's estimate of the probability that
its answer is correct and grounded in the input passages.
A low answerable_probability indicates that the answer might
not be grounded in the sources.
When answerable_probability
is low, some clients may
wish 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 clients’ use
cases. 0.5 is a good starting threshold.
input_feedback
google.ai.generativelanguage.GenerateAnswerResponse.InputFeedback
Output only. Feedback related to the input data used to
answer the question, as opposed to model-generated response
to the question.
"Input data" can be one or more of the following:
Child Classes
class InputFeedback
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-14 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?