Specifies whether to include citation metadata in the answer. The default value is false.
answerLanguageCode
string
Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.
ignoreAdversarialQuery
boolean
Specifies whether to filter out adversarial queries. The default value is false.
Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to true, we skip generating answers for adversarial queries and return fallback messages instead.
ignoreNonAnswerSeekingQuery
boolean
Specifies whether to filter out queries that are not answer-seeking. The default value is false.
Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead.
ignoreJailBreakingQuery
boolean
Optional. Specifies whether to filter out jail-breaking queries. The default value is false.
Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to true, we skip generating summaries for jail-breaking queries and return fallback messages instead.
ignoreLowRelevantContent
boolean
Specifies whether to filter out queries that have low relevance.
If this field is set to false, all search results are used regardless of relevance to generate answers. If set to true or unset, the behavior will be determined automatically by the service.
ModelSpec
Answer Generation Model specification.
JSON representation
{"modelVersion": string}
Fields
modelVersion
string
Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["The `AnswerGenerationSpec` uses `ModelSpec` and `PromptSpec` objects to define the specifications of the answer generation process."],["The specification allows for control over the inclusion of citations in answers with `includeCitations`, and the language of the answer with `answerLanguageCode`."],["Several filters can be enabled, such as `ignoreAdversarialQuery`, `ignoreNonAnswerSeekingQuery`, and `ignoreJailBreakingQuery`, to exclude certain types of queries."],["The `ModelSpec` allows you to specify the `modelVersion` to use for answer generation, with options for \"stable\" or \"preview\"."],["The `PromptSpec` offers the ability to customize the `preamble` used in the answer generation prompt."]]],[]]