public sealed class SearchRequest.Types.ContentSearchSpec.Types.SummarySpec : IMessage<SearchRequest.Types.ContentSearchSpec.Types.SummarySpec>, IEquatable<SearchRequest.Types.ContentSearchSpec.Types.SummarySpec>, IDeepCloneable<SearchRequest.Types.ContentSearchSpec.Types.SummarySpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class SearchRequest.Types.ContentSearchSpec.Types.SummarySpec.
A specification for configuring a summary returned in a search
response.
Specifies whether to filter out adversarial queries. The default value
is false.
Google employs search-query classification to detect adversarial
queries. No summary 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 summaries for adversarial queries and return
fallback messages instead.
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.
public bool IgnoreLowRelevantContent { get; set; }
Specifies whether to filter out queries that have low relevance. The
default value is false.
If this field is set to false, all search results are used regardless
of relevance to generate answers. If set to true, only queries with
high relevance search results will generate answers.
public bool IgnoreNonSummarySeekingQuery { get; set; }
Specifies whether to filter out queries that are not summary-seeking.
The default value is false.
Google employs search-query classification to detect summary-seeking
queries. No summary is returned if the search query is classified as a
non-summary seeking query. For example, why is the sky blue and Who
is the best soccer player in the world? are summary-seeking queries,
but SFO airport and world cup 2026 are not. They are most likely
navigational queries. If this field is set to true, we skip
generating summaries for non-summary seeking queries and return
fallback messages instead.
Specifies whether to include citations in the summary. The default
value is false.
When this field is set to true, summaries include in-line citation
numbers.
Example summary including citations:
BigQuery is Google Cloud's fully managed and completely serverless
enterprise data warehouse [1]. BigQuery supports all data types, works
across clouds, and has built-in machine learning and business
intelligence, all within a unified platform [2, 3].
The citation numbers refer to the returned search results and are
1-indexed. For example, [1] means that the sentence is attributed to
the first search result. [2, 3] means that the sentence is attributed
to both the second and third search results.
The number of top results to generate the summary from. If the number
of results returned is less than summaryResultCount, the summary is
generated from all of the results.
At most 10 results for documents mode, or 50 for chunks mode, can be
used to generate a summary. The chunks mode is used when
[SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
is set to
[CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
If true, answer will be generated from most relevant chunks from top
search results. This feature will improve summary quality.
Note that with this feature enabled, not all top search results
will be referenced and included in the reference list, so the citation
source index only points to the search results listed in the reference
list.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference details for the \u003ccode\u003eSummarySpec\u003c/code\u003e class within the Discovery Engine v1beta API, specifically for configuring summaries in search responses.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSummarySpec\u003c/code\u003e class allows for customization of summaries by specifying whether to filter out adversarial, jail-breaking, low-relevance, or non-summary-seeking queries, and to include in-line citations.\u003c/p\u003e\n"],["\u003cp\u003eKey properties include \u003ccode\u003eIgnoreAdversarialQuery\u003c/code\u003e, \u003ccode\u003eIgnoreJailBreakingQuery\u003c/code\u003e, \u003ccode\u003eIgnoreLowRelevantContent\u003c/code\u003e, \u003ccode\u003eIgnoreNonSummarySeekingQuery\u003c/code\u003e, and \u003ccode\u003eIncludeCitations\u003c/code\u003e, all of which control the type of queries the \u003ccode\u003eSummarySpec\u003c/code\u003e class will or will not use to generate summaries, and if in-line citations are to be used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSummarySpec\u003c/code\u003e class also provides language customization and the ability to specify the number of top results to use for generating a summary, using the properties \u003ccode\u003eLanguageCode\u003c/code\u003e and \u003ccode\u003eSummaryResultCount\u003c/code\u003e, respectively.\u003c/p\u003e\n"],["\u003cp\u003eAdditional features include the use of \u003ccode\u003eModelPromptSpec\u003c/code\u003e and \u003ccode\u003eModelSpec\u003c/code\u003e to fine-tune the language model's interaction, and the \u003ccode\u003eUseSemanticChunks\u003c/code\u003e to improve the quality of the summary by using the most relevant chunks of data.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class SearchRequest.Types.ContentSearchSpec.Types.SummarySpec (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.SummarySpec)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.SummarySpec) \n\n public sealed class SearchRequest.Types.ContentSearchSpec.Types.SummarySpec : IMessage\u003cSearchRequest.Types.ContentSearchSpec.Types.SummarySpec\u003e, IEquatable\u003cSearchRequest.Types.ContentSearchSpec.Types.SummarySpec\u003e, IDeepCloneable\u003cSearchRequest.Types.ContentSearchSpec.Types.SummarySpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class SearchRequest.Types.ContentSearchSpec.Types.SummarySpec.\n\nA specification for configuring a summary returned in a search\nresponse. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SearchRequest.Types.ContentSearchSpec.Types.SummarySpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[SummarySpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.SummarySpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[SummarySpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.SummarySpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[SummarySpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.SummarySpec), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### SummarySpec()\n\n public SummarySpec()\n\n### SummarySpec(SummarySpec)\n\n public SummarySpec(SearchRequest.Types.ContentSearchSpec.Types.SummarySpec other)\n\nProperties\n----------\n\n### IgnoreAdversarialQuery\n\n public bool IgnoreAdversarialQuery { get; set; }\n\nSpecifies whether to filter out adversarial queries. The default value\nis `false`.\n\nGoogle employs search-query classification to detect adversarial\nqueries. No summary is returned if the search query is classified as an\nadversarial query. For example, a user might ask a question regarding\nnegative comments about the company or submit a query designed to\ngenerate unsafe, policy-violating output. If this field is set to\n`true`, we skip generating summaries for adversarial queries and return\nfallback messages instead.\n\n### IgnoreJailBreakingQuery\n\n public bool IgnoreJailBreakingQuery { get; set; }\n\nOptional. Specifies whether to filter out jail-breaking queries. The\ndefault value is `false`.\n\nGoogle employs search-query classification to detect jail-breaking\nqueries. No summary is returned if the search query is classified as a\njail-breaking query. A user might add instructions to the query to\nchange the tone, style, language, content of the answer, or ask the\nmodel to act as a different entity, e.g. \"Reply in the tone of a\ncompeting company's CEO\". If this field is set to `true`, we skip\ngenerating summaries for jail-breaking queries and return fallback\nmessages instead.\n\n### IgnoreLowRelevantContent\n\n public bool IgnoreLowRelevantContent { get; set; }\n\nSpecifies whether to filter out queries that have low relevance. The\ndefault value is `false`.\n\nIf this field is set to `false`, all search results are used regardless\nof relevance to generate answers. If set to `true`, only queries with\nhigh relevance search results will generate answers.\n\n### IgnoreNonSummarySeekingQuery\n\n public bool IgnoreNonSummarySeekingQuery { get; set; }\n\nSpecifies whether to filter out queries that are not summary-seeking.\nThe default value is `false`.\n\nGoogle employs search-query classification to detect summary-seeking\nqueries. No summary is returned if the search query is classified as a\nnon-summary seeking query. For example, `why is the sky blue` and `Who\nis the best soccer player in the world?` are summary-seeking queries,\nbut `SFO airport` and `world cup 2026` are not. They are most likely\nnavigational queries. If this field is set to `true`, we skip\ngenerating summaries for non-summary seeking queries and return\nfallback messages instead.\n\n### IncludeCitations\n\n public bool IncludeCitations { get; set; }\n\nSpecifies whether to include citations in the summary. The default\nvalue is `false`.\n\nWhen this field is set to `true`, summaries include in-line citation\nnumbers.\n\nExample summary including citations:\n\nBigQuery is Google Cloud's fully managed and completely serverless\nenterprise data warehouse \\[1\\]. BigQuery supports all data types, works\nacross clouds, and has built-in machine learning and business\nintelligence, all within a unified platform \\[2, 3\\].\n\nThe citation numbers refer to the returned search results and are\n1-indexed. For example, \\[1\\] means that the sentence is attributed to\nthe first search result. \\[2, 3\\] means that the sentence is attributed\nto both the second and third search results.\n\n### LanguageCode\n\n public string LanguageCode { get; set; }\n\nLanguage code for Summary. Use language tags defined by\n[BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).\nNote: This is an experimental feature.\n\n### ModelPromptSpec\n\n public SearchRequest.Types.ContentSearchSpec.Types.SummarySpec.Types.ModelPromptSpec ModelPromptSpec { get; set; }\n\nIf specified, the spec will be used to modify the prompt provided to\nthe LLM.\n\n### ModelSpec\n\n public SearchRequest.Types.ContentSearchSpec.Types.SummarySpec.Types.ModelSpec ModelSpec { get; set; }\n\nIf specified, the spec will be used to modify the model specification\nprovided to the LLM.\n\n### SummaryResultCount\n\n public int SummaryResultCount { get; set; }\n\nThe number of top results to generate the summary from. If the number\nof results returned is less than `summaryResultCount`, the summary is\ngenerated from all of the results.\n\nAt most 10 results for documents mode, or 50 for chunks mode, can be\nused to generate a summary. The chunks mode is used when\n\\[SearchRequest.ContentSearchSpec.search_result_mode\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode\\]\nis set to\n\\[CHUNKS\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS\\].\n\n### UseSemanticChunks\n\n public bool UseSemanticChunks { get; set; }\n\nIf true, answer will be generated from most relevant chunks from top\nsearch results. This feature will improve summary quality.\nNote that with this feature enabled, not all top search results\nwill be referenced and included in the reference list, so the citation\nsource index only points to the search results listed in the reference\nlist."]]