# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec (v0.28.0)

0.28.0 (latest) 0.27.0 0.26.0 0.25.0 0.24.0 0.23.1 0.22.0 0.21.0 0.20.1 0.19.1 0.18.0 0.17.0 0.16.0 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec.

Answer generation specification.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #answer_language_code

    def answer_language_code() -> ::String

**Returns**

- (::String) --- Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.

### #answer_language_code=

    def answer_language_code=(value) -> ::String

**Parameter**

- **value** (::String) --- Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
**Returns**

- (::String) --- Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.

### #ignore_adversarial_query

    def ignore_adversarial_query() -> ::Boolean

**Returns**

- (::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.

### #ignore_adversarial_query=

    def ignore_adversarial_query=(value) -> ::Boolean

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #ignore_jail_breaking_query

    def ignore_jail_breaking_query() -> ::Boolean

**Returns**

- (::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.

### #ignore_jail_breaking_query=

    def ignore_jail_breaking_query=(value) -> ::Boolean

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #ignore_low_relevant_content

    def ignore_low_relevant_content() -> ::Boolean

**Returns**

- (::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.

### #ignore_low_relevant_content=

    def ignore_low_relevant_content=(value) -> ::Boolean

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #ignore_non_answer_seeking_query

    def ignore_non_answer_seeking_query() -> ::Boolean

**Returns**

- (::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.

### #ignore_non_answer_seeking_query=

    def ignore_non_answer_seeking_query=(value) -> ::Boolean

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #include_citations

    def include_citations() -> ::Boolean

**Returns**

- (::Boolean) --- Specifies whether to include citation metadata in the answer. The default value is `false`.

### #include_citations=

    def include_citations=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Specifies whether to include citation metadata in the answer. The default value is `false`.
**Returns**

- (::Boolean) --- Specifies whether to include citation metadata in the answer. The default value is `false`.

### #model_spec

    def model_spec() -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-ModelSpec)) --- Answer generation model specification.

### #model_spec=

    def model_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-ModelSpec)) --- Answer generation model specification.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-ModelSpec)) --- Answer generation model specification.

### #multimodal_spec

    def multimodal_spec() -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-MultimodalSpec)) --- Optional. Multimodal specification.

### #multimodal_spec=

    def multimodal_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-MultimodalSpec)) --- Optional. Multimodal specification.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-MultimodalSpec)) --- Optional. Multimodal specification.

### #prompt_spec

    def prompt_spec() -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-PromptSpec)) --- Answer generation prompt specification.

### #prompt_spec=

    def prompt_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-PromptSpec)) --- Answer generation prompt specification.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-AnswerQueryRequest-AnswerGenerationSpec-PromptSpec)) --- Answer generation prompt specification.