Discovery Engine v1beta API - Class AnswerQueryRequest.Types.AnswerGenerationSpec (1.0.0-beta13)

public sealed class AnswerQueryRequest.Types.AnswerGenerationSpec : IMessage<AnswerQueryRequest.Types.AnswerGenerationSpec>, IEquatable<AnswerQueryRequest.Types.AnswerGenerationSpec>, IDeepCloneable<AnswerQueryRequest.Types.AnswerGenerationSpec>, IBufferMessage, IMessage

Reference documentation and code samples for the Discovery Engine v1beta API class AnswerQueryRequest.Types.AnswerGenerationSpec.

Answer generation specification.

Inheritance

object > AnswerQueryRequest.Types.AnswerGenerationSpec

Namespace

Google.Cloud.DiscoveryEngine.V1Beta

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

Constructors

AnswerGenerationSpec()

public AnswerGenerationSpec()

AnswerGenerationSpec(AnswerGenerationSpec)

public AnswerGenerationSpec(AnswerQueryRequest.Types.AnswerGenerationSpec other)
Parameter
Name Description
other AnswerQueryRequestTypesAnswerGenerationSpec

Properties

AnswerLanguageCode

public string AnswerLanguageCode { get; set; }

Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.

Property Value
Type Description
string

IgnoreAdversarialQuery

public bool IgnoreAdversarialQuery { get; set; }

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.

Property Value
Type Description
bool

IgnoreNonAnswerSeekingQuery

public bool IgnoreNonAnswerSeekingQuery { get; set; }

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.

Property Value
Type Description
bool

IncludeCitations

public bool IncludeCitations { get; set; }

Specifies whether to include citation metadata in the answer. The default value is false.

Property Value
Type Description
bool

ModelSpec

public AnswerQueryRequest.Types.AnswerGenerationSpec.Types.ModelSpec ModelSpec { get; set; }

Answer generation model specification.

Property Value
Type Description
AnswerQueryRequestTypesAnswerGenerationSpecTypesModelSpec

PromptSpec

public AnswerQueryRequest.Types.AnswerGenerationSpec.Types.PromptSpec PromptSpec { get; set; }

Answer generation prompt specification.

Property Value
Type Description
AnswerQueryRequestTypesAnswerGenerationSpecTypesPromptSpec