- JSON 表示法
- SearchParams
- SearchResultList
- SearchResult
- UnstructuredDocumentInfo
- DocumentContext
- ExtractiveSegment
- ExtractiveAnswer
- ChunkInfo
- DocumentMetadata
搜尋規格。
JSON 表示法 |
---|
{ // Union field |
欄位 | |
---|---|
聯集欄位 input 。控制搜尋行為的搜尋參數。或提供搜尋結果清單來生成答案。input 只能是下列其中一項: |
|
searchParams |
搜尋參數。 |
searchResultList |
搜尋結果清單。 |
SearchParams
搜尋參數。
JSON 表示法 |
---|
{ "maxReturnResults": integer, "filter": string, "boostSpec": { object ( |
欄位 | |
---|---|
maxReturnResults |
要傳回的搜尋結果數量。預設值為 10。 |
filter |
篩選器語法包含運算式語言,可從要篩選的文件的一或多個欄位建構述詞。篩選運算式會區分大小寫。系統會使用這項資訊篩選搜尋結果,這可能會影響答案回覆。 如果無法辨識這個欄位,系統會傳回 如要在 Vertex AI Search 中進行篩選,請將左側的篩選鍵對應至 Vertex AI Search 後端定義的鍵屬性,這項對應是由客戶在結構定義中定義。舉例來說,媒體客戶的結構定義中可能會有「名稱」欄位。在本例中,篩選器會如下所示:filter --> name:'ANY("king kong")' 如要進一步瞭解篩選功能,包括語法和篩選運算子,請參閱「篩選」 |
boostSpec |
提升規格,在搜尋結果中提升特定文件,這可能會影響答案查詢的回覆。如要進一步瞭解加成,請參閱「加成」一文。 |
orderBy |
傳回文件的順序。文件可依 如果無法辨識這個欄位,系統會傳回 |
searchResultMode |
指定搜尋結果模式。如未指定,搜尋結果模式預設為 |
dataStoreSpecs[] |
規格會定義要在搜尋呼叫中篩選的 dataStore,以及這些 dataStore 的設定。只有在引擎有多個資料儲存庫時,才會考慮這個做法。如果引擎內只有一個 dataStore,則應使用頂層規格。 |
SearchResultList
搜尋結果清單。
JSON 表示法 |
---|
{
"searchResults": [
{
object ( |
欄位 | |
---|---|
searchResults[] |
搜尋結果。 |
SearchResult
搜尋結果。
JSON 表示法 |
---|
{ // Union field |
欄位 | |
---|---|
聯集欄位 content 。搜尋結果內容。content 只能是下列其中一項: |
|
unstructuredDocumentInfo |
非結構化文件資訊。 |
chunkInfo |
區塊資訊。 |
UnstructuredDocumentInfo
非結構化文件資訊。
JSON 表示法 |
---|
{ "document": string, "uri": string, "title": string, "documentContexts": [ { object ( |
欄位 | |
---|---|
document |
文件資源名稱。 |
uri |
文件的 URI。 |
title |
標題: |
documentContexts[] |
文件內容清單。系統會使用這項內容生成回覆。這應該是文件的主要內容,可以很長且詳盡。 |
extractiveSegments[] |
擷取區隔清單。 |
extractiveAnswers[] |
已淘汰:這個欄位已淘汰,不會影響答案生成。請改用 documentContexts 和 extractiveSegments 欄位。擷取答案清單。 |
DocumentContext
文件內容。
JSON 表示法 |
---|
{ "pageIdentifier": string, "content": string } |
欄位 | |
---|---|
pageIdentifier |
網頁 ID。 |
content |
用於生成答案的文件內容。 |
ExtractiveSegment
擷取式片段。指南:只有在 documentContexts 為空時,系統才會使用這項功能生成回覆。這應該是較短的程式碼片段。
JSON 表示法 |
---|
{ "pageIdentifier": string, "content": string } |
欄位 | |
---|---|
pageIdentifier |
網頁 ID。 |
content |
擷取片段內容。 |
ExtractiveAnswer
擷取式答案。指南
JSON 表示法 |
---|
{ "pageIdentifier": string, "content": string } |
欄位 | |
---|---|
pageIdentifier |
網頁 ID。 |
content |
擷取的答案內容。 |
ChunkInfo
區塊資訊。
JSON 表示法 |
---|
{
"chunk": string,
"content": string,
"documentMetadata": {
object ( |
欄位 | |
---|---|
chunk |
區塊資源名稱。 |
content |
將文字內容分塊。 |
documentMetadata |
目前區塊的文件中繼資料。 |
DocumentMetadata
文件的中繼資料包含目前區塊的文件資訊。
JSON 表示法 |
---|
{ "uri": string, "title": string } |
欄位 | |
---|---|
uri |
文件 URI。 |
title |
文件標題。 |