Knowledge Retrieval - Retrieve Stream
從備份儲存庫擷取相關資料,並將進度與結果以伺服器傳送事件的形式串流。
利用伺服器傳送的事件框架,以增量方式處理回應。 每個事件都包含一個事件名稱以及一個以 JSON 編碼的資料負載。 直播以事件 response.completed 或事件 error 結束。 OpenAPI 2.0 將回應主體以字串表示,因此產生的客戶端可以在不進行型別事件解析的情況下,直接公開原始回應。 不要將完整的回應主體反序列化為單一 JSON 文件。
POST {endpoint}/knowledgebases('{knowledgeBaseName}')/retrieve?_overload=retrieveStream&api-version=2026-11-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
搜尋服務的端點 URL。 |
|
knowledge
|
path | True |
string |
知識庫名稱。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| Accept | True |
Accept 標頭。 |
|
| x-ms-query-source-authorization |
string (password) |
識別正在執行查詢的使用者的權杖。 此權杖可用來對文件強制執行安全性限制。 |
|
| x-ms-query-work-iq-source-authorization |
string (password) |
用戶聲明令牌用於客戶擁有的 Entra 應用程式註冊,設定在 Work IQ 知識來源上。 用於代表 Work IQ API 的認證。 |
|
| x-ms-client-request-id |
string (uuid) |
要求不透明、全域唯一、用戶端產生的字串標識碼。 |
要求本文
| 名稱 | 類型 | Description |
|---|---|---|
| includeActivity |
boolean |
表示擷取結果應包含活動資訊。 |
| intents | KnowledgeRetrievalIntent[]: |
在沒有模型查詢規劃的情況下執行的預期查詢清單。 |
| knowledgeSourceParams |
KnowledgeSourceParams[]:
|
知識來源的執行階段參數清單。 |
| maxOutputDocuments |
integer (int32) |
限制輸出中最大文件數量。 |
| maxOutputSize |
integer (int32) |
限制輸出中內容的大小上限。 |
| maxOutputSizeInTokens |
integer (int32) |
限制輸出中內容的大小上限。 |
| maxRuntimeInSeconds |
integer (int32) |
執行時間上限 (以秒為單位)。 |
| messages |
聊天訊息樣式輸入的清單。 |
|
| outputMode |
此擷取的輸出組態。 |
|
| retrievalReasoningEffort | KnowledgeRetrievalReasoningEffort: |
檢索推理努力的配置。 |
| toolName |
string |
要選取的工具。 在 KB 全域擷取時省略。 |
回覆
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
string |
要求已成功。 Media Types: "text/event-stream", "application/json" |
| Other Status Codes |
未預期的錯誤回應。 Media Types: "text/event-stream", "application/json" |
安全性
api-key
類型:
apiKey
位於:
header
OAuth2Auth
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍
| 名稱 | Description |
|---|---|
| https://search.azure.com/.default |
範例
KnowledgeBaseRetrieveStream
範例要求
POST https://typespecpreviewexampleservice.search.windows.net/knowledgebases('base-preview-test')/retrieve?_overload=retrieveStream&api-version=2026-11-01-preview
{
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "hello world"
}
]
}
],
"maxRuntimeInSeconds": 60,
"maxOutputSize": 100000,
"maxOutputDocuments": 50,
"retrievalReasoningEffort": {
"kind": "low"
},
"includeActivity": true,
"outputMode": "answerSynthesis",
"knowledgeSourceParams": [
{
"knowledgeSourceName": "ks-preview-test",
"includeReferences": true,
"includeReferenceSourceData": true,
"alwaysQuerySource": false,
"neverQuerySource": false,
"failOnError": false,
"rerankerThreshold": 2.1,
"resultsProcessing": "rerank",
"kind": "searchIndex",
"filterAddOn": "foo eq bar",
"queryHintOverrides": {
"filters": [
{
"field": "country",
"fieldValues": [
"United States",
"Japan",
"France",
"Germany"
],
"filterInstructions": "Country associated with the document."
}
],
"boosts": [
{
"kind": "fieldValue",
"boostInstructions": "Prefer documents matching the user's locale.",
"field": "language",
"fieldValues": [
"en-US",
"ja-JP",
"fr-FR",
"de-DE"
],
"boost": 1.5
}
]
},
"topicGraph": {
"kind": "diverse",
"diversityFactor": 0.1
}
}
],
"toolName": "product-search"
}
範例回覆
"event: retrieval.started\ndata: {\"requestId\":\"00000000-0000-0000-0000-000000000000\",\"knowledgeBaseName\":\"base-preview-test\",\"outputMode\":\"answerSynthesis\",\"reasoningEffort\":{\"kind\":\"low\"}}\n\nevent: activity.started\ndata: {\"id\":0,\"type\":\"modelQueryPlanning\",\"startedAt\":\"2025-01-01T00:08:45.045Z\"}\n\nevent: activity.completed\ndata: {\"type\":\"modelQueryPlanning\",\"id\":0,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"inputTokens\":11,\"outputTokens\":22,\"elapsedMs\":1234,\"model\":{\"modelName\":\"gpt-4o\",\"deploymentId\":\"gpt-4o-deployment\"}}\n\nevent: activity.started\ndata: {\"id\":1,\"type\":\"searchIndex\",\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"knowledgeSourceName\":\"ks-preview-test\"}\n\nevent: activity.completed\ndata: {\"type\":\"searchIndex\",\"id\":1,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"knowledgeSourceName\":\"ks-preview-test\",\"queryTime\":\"2025-01-01T00:08:45.045Z\",\"count\":2,\"elapsedMs\":1234,\"searchIndexArguments\":{\"search\":\"hello world\",\"filter\":\"((category eq 'news') and ((id ne null) and (foo eq bar))) and (Key eq 'myDocKey1')\",\"semanticConfigurationName\":\"testconfig\",\"queryType\":\"simple\",\"sourceDataFields\":[{\"name\":\"category\"},{\"name\":\"description\"},{\"name\":\"ownerId\"},{\"name\":\"id\"}],\"searchFields\":[]},\"queryHintProcessing\":{\"generatedFilter\":\"Key eq 'myDocKey1'\"}}\n\nevent: activity.started\ndata: {\"id\":2,\"type\":\"searchIndex\",\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"knowledgeSourceName\":\"ks-preview-test\"}\n\nevent: activity.completed\ndata: {\"type\":\"searchIndex\",\"id\":2,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"knowledgeSourceName\":\"ks-preview-test\",\"queryTime\":\"2025-01-01T00:08:45.045Z\",\"count\":2,\"elapsedMs\":1234,\"searchIndexArguments\":{\"search\":\"hello world two\",\"filter\":\"((category eq 'news') and ((id ne null) and (foo eq bar))) and (Key eq 'myDocKey1')\",\"semanticConfigurationName\":\"testconfig\",\"queryType\":\"simple\",\"sourceDataFields\":[{\"name\":\"category\"},{\"name\":\"description\"},{\"name\":\"ownerId\"},{\"name\":\"id\"}],\"searchFields\":[]},\"queryHintProcessing\":{\"generatedFilter\":\"Key eq 'myDocKey1'\"}}\n\nevent: activity.started\ndata: {\"id\":3,\"type\":\"modelAnswerSynthesis\",\"startedAt\":\"2025-01-01T00:08:45.045Z\"}\n\nevent: activity.completed\ndata: {\"type\":\"modelAnswerSynthesis\",\"id\":3,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"inputTokens\":11,\"outputTokens\":22,\"elapsedMs\":1234,\"model\":{\"modelName\":\"gpt-4o\",\"deploymentId\":\"gpt-4o-deployment\"}}\n\nevent: activity.started\ndata: {\"id\":4,\"type\":\"agenticReasoning\",\"startedAt\":\"2025-01-01T00:08:45.045Z\"}\n\nevent: activity.completed\ndata: {\"type\":\"agenticReasoning\",\"id\":4,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"reasoningTokens\":78,\"retrievalReasoningEffort\":{\"kind\":\"low\"},\"logicalReasoningEffort\":{\"kind\":\"low\"}}\n\nevent: answer.completed\ndata: {\"messageIndex\":0,\"message\":{\"content\":[{\"type\":\"text\",\"text\":\"[{...}]\"}]}}\n\nevent: references.completed\ndata: [{\"type\":\"searchIndex\",\"id\":\"83dd7d40\",\"activitySource\":1,\"rerankerScore\":4,\"docKey\":\"myDocKey1\",\"citationUrl\":\"https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-11-01-preview&allowUnsafeKeys=true\",\"sourceData\":{\"id\":\"myDocKey1\",\"title\":\"high_doc\",\"content\":\"hello world\"}},{\"type\":\"searchIndex\",\"id\":\"83dd7d41\",\"activitySource\":1,\"rerankerScore\":3.9,\"docKey\":\"myDocKey2\",\"citationUrl\":\"https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-11-01-preview&allowUnsafeKeys=true\",\"sourceData\":{\"id\":\"myDocKey2\",\"title\":\"low_doc\",\"content\":\"goodbye world\"}}]\n\nevent: response.completed\ndata: {\"statusCode\":200,\"response\":{\"response\":[{\"content\":[{\"type\":\"text\",\"text\":\"[{...}]\"}]}],\"activity\":[{\"type\":\"modelQueryPlanning\",\"id\":0,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"inputTokens\":11,\"outputTokens\":22,\"elapsedMs\":1234,\"model\":{\"modelName\":\"gpt-4o\",\"deploymentId\":\"gpt-4o-deployment\"}},{\"type\":\"searchIndex\",\"id\":1,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"knowledgeSourceName\":\"ks-preview-test\",\"queryTime\":\"2025-01-01T00:08:45.045Z\",\"count\":2,\"elapsedMs\":1234,\"searchIndexArguments\":{\"search\":\"hello world\",\"filter\":\"((category eq 'news') and ((id ne null) and (foo eq bar))) and (Key eq 'myDocKey1')\",\"semanticConfigurationName\":\"testconfig\",\"queryType\":\"simple\",\"sourceDataFields\":[{\"name\":\"category\"},{\"name\":\"description\"},{\"name\":\"ownerId\"},{\"name\":\"id\"}],\"searchFields\":[]},\"queryHintProcessing\":{\"generatedFilter\":\"Key eq 'myDocKey1'\"}},{\"type\":\"searchIndex\",\"id\":2,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"knowledgeSourceName\":\"ks-preview-test\",\"queryTime\":\"2025-01-01T00:08:45.045Z\",\"count\":2,\"elapsedMs\":1234,\"searchIndexArguments\":{\"search\":\"hello world two\",\"filter\":\"((category eq 'news') and ((id ne null) and (foo eq bar))) and (Key eq 'myDocKey1')\",\"semanticConfigurationName\":\"testconfig\",\"queryType\":\"simple\",\"sourceDataFields\":[{\"name\":\"category\"},{\"name\":\"description\"},{\"name\":\"ownerId\"},{\"name\":\"id\"}],\"searchFields\":[]},\"queryHintProcessing\":{\"generatedFilter\":\"Key eq 'myDocKey1'\"}},{\"type\":\"modelAnswerSynthesis\",\"id\":3,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"inputTokens\":11,\"outputTokens\":22,\"elapsedMs\":1234,\"model\":{\"modelName\":\"gpt-4o\",\"deploymentId\":\"gpt-4o-deployment\"}},{\"type\":\"agenticReasoning\",\"id\":4,\"startedAt\":\"2025-01-01T00:08:45.045Z\",\"completedAt\":\"2025-01-01T00:08:46.279Z\",\"reasoningTokens\":78,\"retrievalReasoningEffort\":{\"kind\":\"low\"},\"logicalReasoningEffort\":{\"kind\":\"low\"}}],\"references\":[{\"type\":\"searchIndex\",\"id\":\"83dd7d40\",\"activitySource\":1,\"rerankerScore\":4,\"docKey\":\"myDocKey1\",\"citationUrl\":\"https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-11-01-preview&allowUnsafeKeys=true\",\"sourceData\":{\"id\":\"myDocKey1\",\"title\":\"high_doc\",\"content\":\"hello world\"}},{\"type\":\"searchIndex\",\"id\":\"83dd7d41\",\"activitySource\":1,\"rerankerScore\":3.9,\"docKey\":\"myDocKey2\",\"citationUrl\":\"https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-11-01-preview&allowUnsafeKeys=true\",\"sourceData\":{\"id\":\"myDocKey2\",\"title\":\"low_doc\",\"content\":\"goodbye world\"}}]}}\n\n"
定義
Accept
Accept 標頭。
| 值 | Description |
|---|---|
| text/event-stream |
AgentRuntimeGraphHydrateDocumentsParams
知識檢索回傳的水合原始文件的選取與數量限制。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| select |
string |
包含逗號分隔的可檢索來源欄位。 |
|
| top |
integer (int32) minimum: 1maximum: 100 |
50 |
要回傳的最大含水文件數。 預設為 50;這與圖形列數無關。 |
AgentRuntimeGraphParams
擷取過程中,針對啟用圖形的 Azure Blob 知識來源進行特定圖形的覆寫。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| includeQuery |
boolean |
False |
在 graphSearchArguments.gql 中包含產生的 GQL。 省略或錯誤不會顯示產生的查詢文字。 |
| provenance |
控制是否回傳支援圖表結果的來源文件。 |
AgentRuntimeGraphProvenanceParams
資料來源文件水合政策,用於知識檢索圖結果。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| hydrateDocuments |
來源文件選項;僅當類型為 hydrate 時才有效。 |
||
| kind | none |
圖擷取是僅回傳圖形列,還是同時對來源文件進行水合。 |
AzureBlobKnowledgeSourceParams
指定 Azure Blob 知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| graphParameters |
啟用圖形的來源的圖形查詢可見性與來源文件水合選項。 |
|
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
azure |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
|
| topicGraph | VectorQueryTopicGraph: |
在此擷取時覆寫知識來源儲存的 topicGraph。 若省略,則適用儲存的知識來源值。 |
BalancedVectorQueryTopicGraph
將純向量相似性與多樣性感知檢索結合。 建議預設選擇在多樣性與相關性之間取得平衡。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
balanced |
該使用的主題圖向量搜尋類型。 |
| minDiversityPoolSize |
integer (int32) minimum: 250maximum: 10000 |
在主題圖抽樣前,需檢索的最小向量候選數量。 預設值為 1,000。 |
DiverseVectorQueryTopicGraph
採用主題圖譜多樣化檢索。
| 名稱 | 類型 | Description |
|---|---|---|
| diversityFactor |
number (float) minimum: 0maximum: 1 |
主題圖多樣性檢索所使用的多樣性因子。 若省略,則會使用主題圖表設定檔中預設設定的設定。 |
| kind |
string:
diverse |
該使用的主題圖向量搜尋類型。 |
| minDiversityPoolSize |
integer (int32) minimum: 250maximum: 10000 |
在主題圖抽樣前,需檢索的最小向量候選數量。 預設值為 1,000。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
其他資訊。 |
|
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細資料。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤的其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳情 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
所有 Azure Resource Manager API 的常見錯誤回應,用於回傳失敗操作的錯誤細節。 (這也遵循 OData 錯誤回應格式。)。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
FabricDataAgentKnowledgeSourceParams
指定 Fabric Data Agent 知識來源的執行時參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
fabric |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
FabricOntologyKnowledgeSourceParams
指定 Fabric 本體知識來源的執行時參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
fabric |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
FileKnowledgeSourceParams
指定檔案知識來源的執行時參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
file |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
IndexedOneLakeKnowledgeSourceParams
指定索引 OneLake 知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
indexed |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
IndexedSharePointKnowledgeSourceParams
指定已編製索引的 SharePoint 知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
indexed |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
IndexedSqlKnowledgeSourceParams
指定索引 SQL 知識來源的執行時參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
indexed |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
KnowledgeBaseImageContent
圖片內容。
| 名稱 | 類型 | Description |
|---|---|---|
| url |
string (uri) |
影像的網址。 |
KnowledgeBaseMessage
自然語言訊息樣式物件。
| 名稱 | 類型 | Description |
|---|---|---|
| content | KnowledgeBaseMessageContent[]: |
訊息的內容。 |
| role |
string |
工具回應的作用。 |
KnowledgeBaseMessageContentType
訊息內容的類型。
| 值 | Description |
|---|---|
| text |
短信內容類型。 |
| image |
圖像訊息內容類型。 |
KnowledgeBaseMessageImageContent
影像訊息類型。
| 名稱 | 類型 | Description |
|---|---|---|
| image |
圖片內容。 |
|
| type |
string:
image |
訊息的類型 |
KnowledgeBaseMessageTextContent
簡訊類型。
| 名稱 | 類型 | Description |
|---|---|---|
| text |
string |
文字內容。 |
| type |
string:
text |
訊息的類型 |
KnowledgeBaseRetrievalRequest
擷取要求的輸入合約。
| 名稱 | 類型 | Description |
|---|---|---|
| includeActivity |
boolean |
表示擷取結果應包含活動資訊。 |
| intents | KnowledgeRetrievalIntent[]: |
在沒有模型查詢規劃的情況下執行的預期查詢清單。 |
| knowledgeSourceParams |
KnowledgeSourceParams[]:
|
知識來源的執行階段參數清單。 |
| maxOutputDocuments |
integer (int32) |
限制輸出中最大文件數量。 |
| maxOutputSize |
integer (int32) |
限制輸出中內容的大小上限。 |
| maxOutputSizeInTokens |
integer (int32) |
限制輸出中內容的大小上限。 |
| maxRuntimeInSeconds |
integer (int32) |
執行時間上限 (以秒為單位)。 |
| messages |
聊天訊息樣式輸入的清單。 |
|
| outputMode |
此擷取的輸出組態。 |
|
| retrievalReasoningEffort | KnowledgeRetrievalReasoningEffort: |
檢索推理努力的配置。 |
| toolName |
string |
要選取的工具。 在 KB 全域擷取時省略。 |
KnowledgeRetrievalAutoReasoningEffort
檢索時自動選擇推理努力。 服務會將每個請求放在最便宜的層級,並只會在需要時逐步升級,直到服務最高可用層級。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
auto |
那種推理努力。 |
KnowledgeRetrievalIntentType
要使用的知識庫組態類型。
| 值 | Description |
|---|---|
| semantic |
自然語言語意查詢意圖。 |
KnowledgeRetrievalLowReasoningEffort
以低推理工作量運行知識檢索。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
low |
那種推理努力。 |
KnowledgeRetrievalMediumReasoningEffort
以中等推理努力運行知識檢索。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
medium |
那種推理努力。 |
KnowledgeRetrievalMinimalReasoningEffort
以最少的推理工作執行知識檢索。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
minimal |
那種推理努力。 |
KnowledgeRetrievalOutputMode
此擷取的輸出組態。
| 值 | Description |
|---|---|
| extractiveData |
直接從知識來源傳回資料,無需生成式變更。 |
| answerSynthesis |
合成回應承載的答案。 |
KnowledgeRetrievalReasoningEffortKind
擷取期間要使用的工作量。
| 值 | Description |
|---|---|
| minimal |
不會執行任何來源選取、查詢規劃或反覆搜尋。 |
| low |
在檢索期間使用低推理。 |
| medium |
在檢索過程中使用適量的推理。 |
| auto |
在取回時自動選擇推理努力,從最低層級逐步升級到所需程度。 |
KnowledgeRetrievalSemanticIntent
語意查詢意圖。
| 名稱 | 類型 | Description |
|---|---|---|
| search |
string |
要執行的語意查詢 |
| type |
string:
semantic |
意圖的類型。 |
KnowledgeSourceGraphProvenanceKind
基於圖形的知識檢索的來源文件行為。
| 值 | Description |
|---|---|
| none |
在不對來源文件進行水合的情況下,回傳圖表結果。 |
| hydrate |
同時還會從已設定的來源索引中回傳選取的來源文件。 |
KnowledgeSourceKind
知識來源的那種。
| 值 | Description |
|---|---|
| searchIndex |
從搜尋索引讀取資料的知識來源。 |
| azureBlob |
從 Azure Blob 儲存體讀取資料並將其擷取至搜尋索引的知識來源。 |
| indexedSharePoint |
一個讀取索引 SharePoint 資料的知識來源。 |
| indexedOneLake |
一個讀取索引 OneLake 資料的知識來源。 |
| indexedSql |
一個知識來源,能從 Azure SQL Database 或 SQL 受管理執行個體 擷取並匯入資料到搜尋索引。 |
| web |
一個能從網路讀取資料的知識來源。 |
| remoteSharePoint |
一個能從遠端 SharePoint 讀取資料的知識來源。 |
| workIQ |
一個讀取工作智商數據的知識來源 |
| file |
一個支援直接檔案上傳與索引的知識來源。 |
| mcpServer |
一個由MCP(模型情境協定)伺服器支持的知識來源。 |
| fabricDataAgent |
一個從 Fabric 資料代理擷取資料的知識來源。 |
| fabricOntology |
一個從 Microsoft Fabric 本體論中擷取資料的知識來源。 |
KnowledgeSourceResultsProcessing
控制知識來源的結果是否會被重新排序。
| 值 | Description |
|---|---|
| rerank |
這些知識來源的成果會經過重新排序的流程。 此為預設行為。 |
| none |
這些知識來源的結果可繞過重新排序,保留其底層順序。 |
McpServerKnowledgeSourceParams
指定 MCP 伺服器知識來源的執行參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
mcp |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
NoneVectorQueryTopicGraph
使用一般向量搜尋,不使用主題圖多樣化檢索。
| 名稱 | 類型 | Description |
|---|---|---|
| kind |
string:
none |
該使用的主題圖向量搜尋類型。 |
RemoteSharePointKnowledgeSourceParams
指定遠端 SharePoint 知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| filterExpressionAddOn |
string |
套用至 SharePoint 資料來源的篩選條件。 它必須在關鍵字查詢語言語法中指定。 它將與知識來源定義中指定的篩選運算式結合。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
remote |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
SearchIndexKnowledgeSourceBoostKind
這是搜尋索引資訊來源的提升提示。
| 值 | Description |
|---|---|
| fieldValue |
根據欄位值提升文件。 |
| multiWordExpression |
根據多詞表達式提升文件。 |
SearchIndexKnowledgeSourceFieldValueBoost
一個提示,根據欄位值提升文件。
| 名稱 | 類型 | Description |
|---|---|---|
| boost |
number (double) |
文件分數的乘數。 必須是不等於 1.0 的正數。 |
| boostInstructions |
string |
自然語言說明何時以及如何施加加成。 |
| field |
string minLength: 1 |
搜尋索引欄位的名稱。 |
| fieldValues |
string[] |
該場的代表性值。 |
| kind |
string:
field |
那種加速提示。 |
SearchIndexKnowledgeSourceFilterHint
一個用來識別欄位的提示,以及查詢規劃器在建立篩選條件時可以使用的詳盡基礎值。
| 名稱 | 類型 | Description |
|---|---|---|
| autoConfiguration |
設定服務以解析欄位各面的接地值。 它的存在可啟用自動設定。 欄位必須具備可篩選性且可面式。 當目標索引啟用文件層級權限或啟用 Purview 敏感度標籤時,不支援此限制;此限制會在知識來源建立/更新及知識庫檢索時驗證。 與 |
|
| field |
string minLength: 1 |
可篩選搜尋索引欄位的名稱。 |
| fieldValues |
string[] |
該領域的完整數值集合。 最多 160 個值,每個值最多 128 個字元,總共 2048 個字元。 在支援 |
| filterInstructions |
string |
自然語言教學,說明何時以及如何在場上篩選。 |
SearchIndexKnowledgeSourceFilterHintAutoConfiguration
自動從目標索引面板解析濾鏡提示的接地值。
| 名稱 | 類型 | Description |
|---|---|---|
| cacheTtl |
integer (int32) minimum: 60maximum: 3600 |
解析的分面數會被快取。 專用服務允許的範圍為 60 至 3600,無伺服器服務則為 60 至 900。 若省略,專用服務預設為 3600 秒,無伺服器服務則為 900 秒。 |
| maxFacetValueCount |
integer (int32) minimum: 1maximum: 64 |
用作接地的最大面數值。 預設為 64;允許的範圍為 1 到 64。 數值依面數由多到低排列選取,並受與手動篩選器值相同的 2048 字元合併長度限制及每值 128 字元限制。 |
SearchIndexKnowledgeSourceMultiWordExpressionBoost
一個基於多字表達式提升文件的提示。
| 名稱 | 類型 | Description |
|---|---|---|
| boost |
number (double) |
文件分數的乘數。 必須是不等於 1.0 的正數。 |
| boostInstructions |
string |
自然語言說明何時以及如何施加加成。 |
| fieldValues |
string[] |
代表性的加速值。 |
| kind |
string:
multi |
那種加速提示。 |
SearchIndexKnowledgeSourceParams
指定搜尋索引知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| filterAddOn |
string |
套用至索引的篩選條件 (例如,'State eq VA')。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
search |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| queryHintOverrides |
引導查詢規劃的提示,幫助你找到有用的篩選與提升。 若有指定,此物件將取代知識來源上完整設定的查詢提示集合。 |
|
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
|
| topicGraph | VectorQueryTopicGraph: |
在此擷取時覆寫知識來源儲存的 topicGraph。 若省略,則適用儲存的知識來源值。 |
SearchIndexKnowledgeSourceQueryHints
指引查詢規劃,為搜尋索引知識來源提供有用的篩選與提升。
| 名稱 | 類型 | Description |
|---|---|---|
| boosts | SearchIndexKnowledgeSourceBoost[]: |
提升提示,指出查詢規劃者可用來影響文件排名的條件。 |
| filters |
篩選提示,識別欄位與代表性值,查詢規劃器在構建篩選時可用。 |
VectorSearchTopicGraphKind
該使用的主題圖向量搜尋類型。
| 值 | Description |
|---|---|
| none |
當主題圖的多樣化檢索失效時,請使用一般向量搜尋。 |
| diverse |
使用主題圖譜多樣化檢索。 |
| balanced |
將純向量相似性與多樣性感知檢索結合。 建議預設選擇在多樣性與相關性之間取得平衡。 |
WebKnowledgeSourceParams
指定 Web 知識來源的執行階段參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| count |
integer (int32) |
要傳回的 Web 結果數目。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| freshness |
string |
網路結果的新鮮度。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
web |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| language |
string |
網路結果的語言。 |
| market |
string |
網絡結果的市場。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |
WorkIQKnowledgeSourceParams
指定 WorkIQ 知識來源的執行時參數
| 名稱 | 類型 | Description |
|---|---|---|
| alwaysQuerySource |
boolean |
表示此知識來源應該略過來源選取,並一律在擷取時進行查詢。 |
| enableImageServing |
boolean |
指示檢索時是否應啟用影像服務。 若屬實,擷取時擷取的影像會傳送至下游模型。 |
| failOnError |
boolean |
表示如果從此知識來源的檢索遇到錯誤,整個檢索請求應該會失敗。 預設為 False。 |
| includeReferenceSourceData |
boolean |
指出參照是否應該在其承載中包含擷取期間取得的結構化資料。 |
| includeReferences |
boolean |
指出是否應包含從此來源擷取的資料的參考。 |
| kind |
string:
workIQ |
知識來源的類型。 |
| knowledgeSourceName |
string |
參數套用的索引名稱。 |
| maxOutputDocuments |
integer (int32) |
限制從此知識來源回傳的文件數量。 |
| neverQuerySource |
boolean |
表示此知識來源應排除在請求的候選集合中,且檢索時絕不查詢。 排除為請求本地,且不會修改知識庫成員資格。 無法在同一個知識來源上與 alwaysQuerySource 合併使用。 |
| rerankerThreshold |
number (float) |
所有擷取的文件都必須符合重新排序器臨界值,才能包含在回應中。 |
| resultsProcessing |
僅覆蓋知識來源儲存的結果,處理此擷取呼叫。 若省略,則適用儲存的知識來源值。 |