SearchSpec

搜尋規範。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "searchParams": {
    object (SearchParams)
  },
  "searchResultList": {
    object (SearchResultList)
  }
  // End of mutually exclusive fields.
}
欄位
用於控制搜尋行為的搜尋參數。或提供搜尋結果列表以產生答案。以下列出互斥的欄位。回應中最多只會設定一個欄位:
searchParams

object (SearchParams)

搜尋參數。

searchResultList

object (SearchResultList)

搜尋結果清單。

互斥欄位的結尾。

SearchParams

搜尋參數。

JSON 表示法
{
  "maxReturnResults": integer,
  "filter": string,
  "boostSpec": {
    object (BoostSpec)
  },
  "orderBy": string,
  "searchResultMode": enum (SearchResultMode),
  "customFineTuningSpec": {
    object (CustomFineTuningSpec)
  },
  "dataStoreSpecs": [
    {
      object (DataStoreSpec)
    }
  ],
  "naturalLanguageQueryUnderstandingSpec": {
    object (NaturalLanguageQueryUnderstandingSpec)
  }
}
欄位
maxReturnResults

integer

要傳回的搜尋結果數量。預設值為 10。

filter

string

篩選器語法包含運算式語言,可從要篩選的文件的一或多個欄位建構述詞。篩選運算式會區分大小寫。這項資訊會用於篩選搜尋結果,可能會影響「解答」回覆。

如果無法辨識這個欄位,系統會傳回 INVALID_ARGUMENT

如要在 Vertex AI Search 中進行篩選,請將 LHS 篩選鍵對應至 Vertex AI Search 後端定義的鍵屬性,這項對應是由客戶在結構定義中定義。舉例來說,媒體客戶的結構定義中可能會有「名稱」欄位。在本例中,篩選器會如下所示:filter --> name:'ANY("king kong")'

如要進一步瞭解篩選功能,包括語法和篩選運算子,請參閱「篩選

boostSpec

object (BoostSpec)

提升規格,在搜尋結果中提升特定文件,這可能會影響答案查詢的回覆。如要進一步瞭解加成,請參閱「加成

orderBy

string

傳回文件的順序。文件可依 Document 物件中的欄位排序。如果依相關性排序,請勿設定。orderBy 運算式須區分大小寫。如要進一步瞭解訂購方式,請參閱「訂購」一文。

如果無法辨識這個欄位,系統會傳回 INVALID_ARGUMENT

searchResultMode

enum (SearchResultMode)

指定搜尋結果模式。如未指定,搜尋結果模式預設為 DOCUMENTS。請參閱「剖析文件及進行分塊」一文

customFineTuningSpec

object (CustomFineTuningSpec)

選用。自訂微調設定。

dataStoreSpecs[]

object (DataStoreSpec)

規格會定義要在搜尋呼叫中篩選的資料存放區,以及這些資料存放區的設定。只有在引擎有多個資料儲存庫時,才會考慮這個做法。對於引擎中的單一資料存儲,它們應該使用頂層規範。

naturalLanguageQueryUnderstandingSpec

object (NaturalLanguageQueryUnderstandingSpec)

選用。規格:為搜尋要求啟用自然語言理解功能。

SearchResultList

搜尋結果清單。

JSON 表示法
{
  "searchResults": [
    {
      object (SearchResult)
    }
  ]
}
欄位
searchResults[]

object (SearchResult)

搜尋結果。

SearchResult

搜尋結果。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "unstructuredDocumentInfo": {
    object (UnstructuredDocumentInfo)
  },
  "chunkInfo": {
    object (ChunkInfo)
  }
  // End of mutually exclusive fields.
}
欄位
搜尋結果內容。以下列出互斥的欄位。回應中最多只會設定一個欄位:
unstructuredDocumentInfo

object (UnstructuredDocumentInfo)

非結構化文件資訊。

chunkInfo

object (ChunkInfo)

區塊資訊。

互斥欄位的結尾。

UnstructuredDocumentInfo

非結構化文件資訊。

JSON 表示法
{
  "document": string,
  "uri": string,
  "title": string,
  "documentContexts": [
    {
      object (DocumentContext)
    }
  ],
  "extractiveSegments": [
    {
      object (ExtractiveSegment)
    }
  ],
  "extractiveAnswers": [
    {
      object (ExtractiveAnswer)
    }
  ]
}
欄位
document

string

文件資源名稱。

uri

string

文件的 URI。

title

string

標題:

documentContexts[]

object (DocumentContext)

文件內容清單。該內容將用於答案生成。這應該是文件的主要內容,可以很長且詳盡。

extractiveSegments[]

object (ExtractiveSegment)

擷取區隔清單。

extractiveAnswers[]
(deprecated)

object (ExtractiveAnswer)

已淘汰:這個欄位已淘汰,不會影響答案生成功能。請改用 documentContexts 和 extractiveSegments 欄位。擷取答案清單。

DocumentContext

文件脈絡。

JSON 表示法
{
  "pageIdentifier": string,
  "content": string
}
欄位
pageIdentifier

string

網頁 ID。

content

string

用於生成答案的文件內容。

ExtractiveSegment

擷取片段。指南:只有在 documentContexts 為空時,系統才會使用這項設定生成回覆。這應該是較短的摘要。

JSON 表示法
{
  "pageIdentifier": string,
  "content": string
}
欄位
pageIdentifier

string

網頁 ID。

content

string

擷取片段內容。

ExtractiveAnswer

擷取式答案。指南

JSON 表示法
{
  "pageIdentifier": string,
  "content": string
}
欄位
pageIdentifier

string

網頁 ID。

content

string

擷取的答案內容。

ChunkInfo

區塊資訊。

JSON 表示法
{
  "chunk": string,
  "content": string,
  "documentMetadata": {
    object (DocumentMetadata)
  }
}
欄位
chunk

string

區塊資源名稱。

content

string

將文字內容分塊。

documentMetadata

object (DocumentMetadata)

目前區塊的文件中繼資料。

DocumentMetadata

文件的中繼資料包含目前區塊的文件資訊。

JSON 表示法
{
  "uri": string,
  "title": string
}
欄位
uri

string

文檔的 URI。

title

string

文件標題。