Class: Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse

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

Overview

Response for the GenerateGroundedContent method.

Defined Under Namespace

Classes: Candidate

Instance Attribute Summary collapse

Instance Attribute Details

#candidates::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate>

Returns Generated candidates.



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 277

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

  # A response candidate generated from the model.
  # @!attribute [rw] index
  #   @return [::Integer]
  #     Index of the candidate.
  # @!attribute [rw] content
  #   @return [::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent]
  #     Content of the candidate.
  # @!attribute [rw] grounding_score
  #   @return [::Float]
  #     The overall grounding score for the candidate, in the range of [0, 1].
  # @!attribute [rw] grounding_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata]
  #     Grounding metadata for the generated content.
  class Candidate
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Citation for the generated content.
    # @!attribute [rw] retrieval_metadata
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::RetrievalMetadata>]
    #     Retrieval metadata to provide an understanding in the
    #     retrieval steps performed by the model. There can be multiple such
    #     messages which can correspond to different parts of the retrieval. This
    #     is a mechanism used to ensure transparency to our users.
    # @!attribute [rw] support_chunks
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::FactChunk>]
    #     List of chunks to be attributed across all claims in the candidate.
    #     These are derived from the grounding sources supplied in the request.
    # @!attribute [rw] web_search_queries
    #   @return [::Array<::String>]
    #     Web search queries for the following-up web search.
    # @!attribute [rw] search_entry_point
    #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::SearchEntryPoint]
    #     Google search entry for the following-up web searches.
    # @!attribute [rw] grounding_support
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::GroundingSupport>]
    #     GroundingSupport across all claims in the answer candidate.
    #     An support to a fact indicates that the claim is supported by
    #     the fact.
    # @!attribute [rw] images
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata>]
    #     Images from the web search.
    class GroundingMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Describes the metadata associated with a retrieval step.
      # @!attribute [rw] source
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::RetrievalMetadata::Source]
      #     Describes the source to which the metadata is referring to.
      # @!attribute [rw] dynamic_retrieval_metadata
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalMetadata]
      #     Metadata for dynamic retrieval.
      class RetrievalMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Describes the source to which the metadata is associated to.
        module Source
          # Unspecified source.
          SOURCE_UNSPECIFIED = 0

          # Vertex AI search.
          VERTEX_AI_SEARCH = 1

          # Google Search.
          GOOGLE_SEARCH = 3

          # User inline provided content.
          INLINE_CONTENT = 2

          # Google Maps.
          GOOGLE_MAPS = 4
        end
      end

      # Describes the metadata about dynamic retrieval.
      # @!attribute [rw] predictor_metadata
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalPredictorMetadata]
      #     Metadata for the dynamic retrieval predictor.
      class DynamicRetrievalMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Describes the metadata about the dynamic retrieval predictor.
      # @!attribute [rw] version
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalPredictorMetadata::Version]
      #     The version of the predictor which was used in dynamic retrieval.
      # @!attribute [rw] prediction
      #   @return [::Float]
      #     The value of the predictor. This should be between [0, 1] where
      #     a value of 0 means that the query would not benefit from grounding,
      #     while a value of 1.0 means that the query would benefit the most.
      #     In between values allow to differentiate between different usefulness
      #     scores for grounding.
      class DynamicRetrievalPredictorMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # The version of the predictor which was used in dynamic retrieval.
        module Version
          # Unspecified version, should never be used.
          VERSION_UNSPECIFIED = 0

          # The V1 model which is evaluating each source independently.
          V1_INDEPENDENT = 1
        end
      end

      # Google search entry point.
      # @!attribute [rw] rendered_content
      #   @return [::String]
      #     Web content snippet that can be embedded in a web page or an app
      #     webview.
      # @!attribute [rw] sdk_blob
      #   @return [::String]
      #     Base64 encoded JSON representing array of <search term, search url>
      #     tuple.
      class SearchEntryPoint
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Grounding info for a claim in the candidate and its support.
      # @!attribute [rw] claim_text
      #   @return [::String]
      #     Text for the claim in the candidate. Always provided when a
      #     support is found.
      # @!attribute [rw] support_chunk_indices
      #   @return [::Array<::Integer>]
      #     A list of indices (into 'support_chunks') specifying the
      #     citations associated with the claim. For instance [1,3,4] means
      #     that support_chunks[1], support_chunks[3],
      #     support_chunks[4] are the chunks attributed to the claim.
      # @!attribute [rw] support_score
      #   @return [::Float]
      #     A score in the range of [0, 1] describing how grounded is a specific
      #     claim in the support chunks indicated.
      #     Higher value means that the claim is better supported by the chunks.
      class GroundingSupport
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Metadata about an image from the web search.
      # @!attribute [rw] image
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::Image]
      #     Metadata about the full size image.
      # @!attribute [rw] thumbnail
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::Image]
      #     Metadata about the thumbnail.
      # @!attribute [rw] source
      #   @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::WebsiteInfo]
      #     The details about the website that the image is from.
      class ImageMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Metadata about the website that the image is from.
        # @!attribute [rw] uri
        #   @return [::String]
        #     The url of the website.
        # @!attribute [rw] title
        #   @return [::String]
        #     The title of the website.
        class WebsiteInfo
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Metadata about the image.
        # @!attribute [rw] uri
        #   @return [::String]
        #     The url of the image.
        # @!attribute [rw] width
        #   @return [::Integer]
        #     The width of the image in pixels.
        # @!attribute [rw] height
        #   @return [::Integer]
        #     The height of the image in pixels.
        class Image
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end
      end
    end
  end
end