Class: Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb

Overview

Answer generation specification.

Defined Under Namespace

Classes: ModelSpec, MultimodalSpec, PromptSpec

Instance Attribute Summary collapse

Instance Attribute Details

#answer_language_code::String

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

Returns:

  • (::String)

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



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#ignore_adversarial_query::Boolean

Returns 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.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#ignore_jail_breaking_query::Boolean

Returns 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.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#ignore_low_relevant_content::Boolean

Returns 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.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#ignore_non_answer_seeking_query::Boolean

Returns 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.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#include_citations::Boolean

Returns 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.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#model_spec::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec

Returns Answer generation model specification.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#multimodal_spec::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec

Returns Optional. Multimodal specification.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end

#prompt_spec::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec

Returns Answer generation prompt specification.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 479

class AnswerGenerationSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Answer Generation Model specification.
  # @!attribute [rw] model_version
  #   @return [::String]
  #     Model version. If not set, it will use the default stable model.
  #     Allowed values are: stable, preview.
  class ModelSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Answer generation prompt specification.
  # @!attribute [rw] preamble
  #   @return [::String]
  #     Customized preamble.
  class PromptSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Multimodal specification: Will return an image from specified source.
  # If multiple sources are specified, the pick is a quality based decision.
  # @!attribute [rw] image_source
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::AnswerGenerationSpec::MultimodalSpec::ImageSource]
  #     Optional. Source of image returned in the answer.
  class MultimodalSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Specifies the image source.
    module ImageSource
      # Unspecified image source (multimodal feature is disabled by default).
      IMAGE_SOURCE_UNSPECIFIED = 0

      # Behavior when service determines the pick from all available sources.
      ALL_AVAILABLE_SOURCES = 1

      # Includes image from corpus in the answer.
      CORPUS_IMAGE_ONLY = 2

      # Triggers figure generation in the answer.
      FIGURE_GENERATION_ONLY = 3
    end
  end
end