SearchSpec

Search specification.

JSON representation
{

  // Union field input can be only one of the following:
  "searchParams": {
    object (SearchParams)
  },
  "searchResultList": {
    object (SearchResultList)
  }
  // End of list of possible types for union field input.
}
Fields
Union field input. Search parameters to control the search behavior. Or provide search result list to generate answer. input can be only one of the following:
searchParams

object (SearchParams)

Search parameters.

searchResultList

object (SearchResultList)

Search result list.

SearchParams

Search parameters.

JSON representation
{
  "maxReturnResults": integer,
  "filter": string,
  "boostSpec": {
    object (BoostSpec)
  },
  "orderBy": string,
  "searchResultMode": enum (SearchResultMode),
  "customFineTuningSpec": {
    object (CustomFineTuningSpec)
  },
  "dataStoreSpecs": [
    {
      object (DataStoreSpec)
    }
  ],
  "naturalLanguageQueryUnderstandingSpec": {
    object (NaturalLanguageQueryUnderstandingSpec)
  }
}
Fields
maxReturnResults

integer

Number of search results to return. The default value is 10.

filter

string

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

boostSpec

object (BoostSpec)

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

orderBy

string

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. orderBy expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

searchResultMode

enum (SearchResultMode)

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

customFineTuningSpec

object (CustomFineTuningSpec)

Custom fine tuning configs.

dataStoreSpecs[]

object (DataStoreSpec)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

naturalLanguageQueryUnderstandingSpec

object (NaturalLanguageQueryUnderstandingSpec)

Optional. Specification to enable natural language understanding capabilities for search requests.

SearchResultList

Search result list.

JSON representation
{
  "searchResults": [
    {
      object (SearchResult)
    }
  ]
}
Fields
searchResults[]

object (SearchResult)

Search results.

SearchResult

Search result.

JSON representation
{

  // Union field content can be only one of the following:
  "unstructuredDocumentInfo": {
    object (UnstructuredDocumentInfo)
  },
  "chunkInfo": {
    object (ChunkInfo)
  }
  // End of list of possible types for union field content.
}
Fields
Union field content. Search result content. content can be only one of the following:
unstructuredDocumentInfo

object (UnstructuredDocumentInfo)

Unstructured document information.

chunkInfo

object (ChunkInfo)

Chunk information.

UnstructuredDocumentInfo

Unstructured document information.

JSON representation
{
  "document": string,
  "uri": string,
  "title": string,
  "documentContexts": [
    {
      object (DocumentContext)
    }
  ],
  "extractiveSegments": [
    {
      object (ExtractiveSegment)
    }
  ],
  "extractiveAnswers": [
    {
      object (ExtractiveAnswer)
    }
  ]
}
Fields
document

string

Document resource name.

uri

string

URI for the document.

title

string

Title.

documentContexts[]

object (DocumentContext)

List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.

extractiveSegments[]

object (ExtractiveSegment)

List of extractive segments.

extractiveAnswers[]
(deprecated)

object (ExtractiveAnswer)

Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use documentContexts and extractiveSegments fields. List of extractive answers.

DocumentContext

Document context.

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Document content to be used for answer generation.

ExtractiveSegment

Extractive segment. Guide Answer generation will only use it if documentContexts is empty. This is supposed to be shorter snippets.

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Extractive segment content.

ExtractiveAnswer

Extractive answer. Guide

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Extractive answer content.

ChunkInfo

Chunk information.

JSON representation
{
  "chunk": string,
  "content": string,
  "documentMetadata": {
    object (DocumentMetadata)
  }
}
Fields
chunk

string

Chunk resource name.

content

string

Chunk textual content.

documentMetadata

object (DocumentMetadata)

Metadata of the document from the current chunk.

DocumentMetadata

Document metadata contains the information of the document of the current chunk.

JSON representation
{
  "uri": string,
  "title": string
}
Fields
uri

string

Uri of the document.

title

string

Title of the document.