Knowledge Retrieval - Retrieve

KnowledgeBase retrieves relevant data from backing stores.

POST {endpoint}/knowledgebases('{knowledgeBaseName}')/retrieve?api-version=2026-08-01-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

The endpoint URL of the search service.

knowledgeBaseName
path True

string

The name of the knowledge base.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
Accept

Accept

The Accept header.

x-ms-query-source-authorization

string

Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents.

x-ms-query-work-iq-source-authorization

string (password)

User assertion token for a customer-owned Entra app registration configured on a Work IQ knowledge source. Used for on-behalf-of authentication to the Work IQ API.

x-ms-client-request-id

string (uuid)

An opaque, globally-unique, client-generated string identifier for the request.

Request Body

Name Type Description
includeActivity

boolean

Indicates retrieval results should include activity information.

intents KnowledgeRetrievalIntent[]:

KnowledgeRetrievalSemanticIntent[]

A list of intended queries to execute without model query planning.

knowledgeSourceParams KnowledgeSourceParams[]:

A list of runtime parameters for the knowledge sources.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents in the output.

maxOutputSize

integer (int32)

Limits the maximum size of the content in the output.

maxOutputSizeInTokens

integer (int32)

Limits the maximum size of the content in the output.

maxRuntimeInSeconds

integer (int32)

The maximum runtime in seconds.

messages

KnowledgeBaseMessage[]

A list of chat message style input.

outputMode

KnowledgeRetrievalOutputMode

The output configuration for this retrieval.

retrievalReasoningEffort KnowledgeRetrievalReasoningEffort:

The retrieval reasoning effort configuration.

Responses

Name Type Description
200 OK

KnowledgeBaseRetrievalResponse

Successful retrieval response.

Other Status Codes

KnowledgeBaseRetrievalResponse

Partial retrieval response.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

api-key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://search.azure.com/.default

Examples

KnowledgeBaseRetrieve
KnowledgeBaseRetrieveAzureBlobImageServing
KnowledgeBaseRetrieveWithIntents
KnowledgeBaseRetrieveWithSourceExclusion

KnowledgeBaseRetrieve

Sample request

POST https://typespecpreviewexampleservice.search.windows.net/knowledgebases('base-preview-test')/retrieve?api-version=2026-08-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
          }
        ]
      }
    }
  ]
}

Sample 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": 10,
      "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 (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 (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": 10,
      "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-08-01-preview",
      "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-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world"
      }
    }
  ]
}
{
  "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": 10,
      "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 (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 (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": 10,
      "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-08-01-preview",
      "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-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world"
      }
    }
  ]
}

KnowledgeBaseRetrieveAzureBlobImageServing

Sample request

POST https://typespecpreviewexampleservice.search.windows.net/knowledgebases('base-azureblob-preview-test')/retrieve?api-version=2026-08-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": "azureblob-ks-preview-test",
      "includeReferences": true,
      "includeReferenceSourceData": true,
      "alwaysQuerySource": false,
      "failOnError": false,
      "rerankerThreshold": 2.1,
      "kind": "azureBlob",
      "enableImageServing": true
    }
  ]
}

Sample 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": 10,
      "model": {
        "modelName": "gpt-4o",
        "deploymentId": "gpt-4o-deployment"
      }
    },
    {
      "type": "azureBlob",
      "id": 1,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "knowledgeSourceName": "azureblob-ks-preview-test",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 2,
      "elapsedMs": 1234,
      "azureBlobArguments": {
        "search": "hello world"
      },
      "imageServing": {
        "imagesRetrieved": 2,
        "imagesSentToModel": 1,
        "totalImageSizeBytes": 3,
        "verbalizationUsed": true,
        "servedImages": [
          {
            "imageId": "1.1",
            "imagePath": "doc/normalized_images_0.jpg",
            "sizeBytes": 3
          }
        ]
      }
    },
    {
      "type": "azureBlob",
      "id": 2,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "knowledgeSourceName": "azureblob-ks-preview-test",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 2,
      "elapsedMs": 1234,
      "azureBlobArguments": {
        "search": "hello world two"
      }
    },
    {
      "type": "modelAnswerSynthesis",
      "id": 3,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "inputTokens": 11,
      "outputTokens": 22,
      "elapsedMs": 10,
      "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": "azureBlob",
      "id": "83dd7d40",
      "activitySource": 1,
      "rerankerScore": 4,
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/azureblob-ks-preview-test-index/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey1",
        "title": "high_doc",
        "content": "hello world",
        "image_path": "1.1:doc/normalized_images_0.jpg"
      }
    },
    {
      "type": "azureBlob",
      "id": "83dd7d41",
      "activitySource": 1,
      "rerankerScore": 3.9,
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/azureblob-ks-preview-test-index/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world",
        "image_path": "3.2:doc/normalized_images_1.jpg"
      }
    }
  ]
}
{
  "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": 10,
      "model": {
        "modelName": "gpt-4o",
        "deploymentId": "gpt-4o-deployment"
      }
    },
    {
      "type": "azureBlob",
      "id": 1,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "knowledgeSourceName": "azureblob-ks-preview-test",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 2,
      "elapsedMs": 1234,
      "azureBlobArguments": {
        "search": "hello world"
      },
      "imageServing": {
        "imagesRetrieved": 2,
        "imagesSentToModel": 1,
        "totalImageSizeBytes": 3,
        "verbalizationUsed": true,
        "servedImages": [
          {
            "imageId": "1.1",
            "imagePath": "doc/normalized_images_0.jpg",
            "sizeBytes": 3
          }
        ]
      }
    },
    {
      "type": "azureBlob",
      "id": 2,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "knowledgeSourceName": "azureblob-ks-preview-test",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 2,
      "elapsedMs": 1234,
      "azureBlobArguments": {
        "search": "hello world two"
      }
    },
    {
      "type": "modelAnswerSynthesis",
      "id": 3,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "inputTokens": 11,
      "outputTokens": 22,
      "elapsedMs": 10,
      "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": "azureBlob",
      "id": "83dd7d40",
      "activitySource": 1,
      "rerankerScore": 4,
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/azureblob-ks-preview-test-index/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey1",
        "title": "high_doc",
        "content": "hello world",
        "image_path": "1.1:doc/normalized_images_0.jpg"
      }
    },
    {
      "type": "azureBlob",
      "id": "83dd7d41",
      "activitySource": 1,
      "rerankerScore": 3.9,
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/azureblob-ks-preview-test-index/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world",
        "image_path": "3.2:doc/normalized_images_1.jpg"
      }
    }
  ]
}

KnowledgeBaseRetrieveWithIntents

Sample request

POST https://typespecpreviewexampleservice.search.windows.net/knowledgebases('base-preview-test')/retrieve?api-version=2026-08-01-preview





{
  "intents": [
    {
      "type": "semantic",
      "search": "foo"
    }
  ],
  "maxRuntimeInSeconds": 60,
  "maxOutputSize": 100000,
  "maxOutputDocuments": 50,
  "retrievalReasoningEffort": {
    "kind": "minimal"
  },
  "includeActivity": true,
  "outputMode": "extractiveData",
  "knowledgeSourceParams": [
    {
      "knowledgeSourceName": "ks-preview-test",
      "includeReferences": true,
      "includeReferenceSourceData": true,
      "alwaysQuerySource": true,
      "failOnError": true,
      "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
          }
        ]
      }
    }
  ]
}

Sample response

{
  "response": [
    {
      "content": [
        {
          "type": "text",
          "text": "[{...}]"
        }
      ]
    }
  ],
  "activity": [
    {
      "type": "searchIndex",
      "id": 0,
      "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": "foo",
        "filter": "(category eq 'news') and (foo eq bar)",
        "semanticConfigurationName": "testconfig",
        "sourceDataFields": [
          {
            "name": "category"
          },
          {
            "name": "description"
          },
          {
            "name": "ownerId"
          },
          {
            "name": "id"
          }
        ],
        "searchFields": []
      }
    },
    {
      "type": "agenticReasoning",
      "id": 1,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "reasoningTokens": 39,
      "retrievalReasoningEffort": {
        "kind": "minimal"
      },
      "logicalReasoningEffort": {
        "kind": "minimal"
      }
    }
  ],
  "references": [
    {
      "type": "searchIndex",
      "id": "83dd7d40",
      "activitySource": 0,
      "rerankerScore": 4,
      "docKey": "myDocKey1",
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey1",
        "title": "high_doc",
        "content": "hello world"
      }
    },
    {
      "type": "searchIndex",
      "id": "83dd7d41",
      "activitySource": 0,
      "rerankerScore": 3.9,
      "docKey": "myDocKey2",
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world"
      }
    }
  ]
}
{
  "response": [
    {
      "content": [
        {
          "type": "text",
          "text": "[{...}]"
        }
      ]
    }
  ],
  "activity": [
    {
      "type": "searchIndex",
      "id": 0,
      "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": "foo",
        "filter": "(category eq 'news') and (foo eq bar)",
        "semanticConfigurationName": "testconfig",
        "sourceDataFields": [
          {
            "name": "category"
          },
          {
            "name": "description"
          },
          {
            "name": "ownerId"
          },
          {
            "name": "id"
          }
        ],
        "searchFields": []
      }
    },
    {
      "type": "agenticReasoning",
      "id": 1,
      "startedAt": "2025-01-01T00:08:45.045Z",
      "completedAt": "2025-01-01T00:08:46.279Z",
      "reasoningTokens": 39,
      "retrievalReasoningEffort": {
        "kind": "minimal"
      },
      "logicalReasoningEffort": {
        "kind": "minimal"
      }
    }
  ],
  "references": [
    {
      "type": "searchIndex",
      "id": "83dd7d40",
      "activitySource": 0,
      "rerankerScore": 4,
      "docKey": "myDocKey1",
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey1?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey1",
        "title": "high_doc",
        "content": "hello world"
      }
    },
    {
      "type": "searchIndex",
      "id": "83dd7d41",
      "activitySource": 0,
      "rerankerScore": 3.9,
      "docKey": "myDocKey2",
      "citationUrl": "https://typespecpreviewexampleservice.search.windows.net/indexes/preview-test/docs/myDocKey2?$select=category%2Cdescription%2CownerId%2Cid&api-version=2026-08-01-preview",
      "sourceData": {
        "id": "myDocKey2",
        "title": "low_doc",
        "content": "goodbye world"
      }
    }
  ]
}

KnowledgeBaseRetrieveWithSourceExclusion

Sample request

POST https://previewexampleservice.search.windows.net/knowledgebases('support-kb')/retrieve?api-version=2026-08-01-preview




{
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "text": "Explain the SSO provisioning steps from the product documentation only.",
          "type": "text"
        }
      ]
    }
  ],
  "includeActivity": true,
  "outputMode": "answerSynthesis",
  "knowledgeSourceParams": [
    {
      "knowledgeSourceName": "product-docs-ks",
      "includeReferences": true,
      "includeReferenceSourceData": true,
      "kind": "searchIndex"
    },
    {
      "knowledgeSourceName": "troubleshooting-ks",
      "neverQuerySource": true,
      "kind": "searchIndex"
    },
    {
      "knowledgeSourceName": "release-notes-web",
      "neverQuerySource": true,
      "kind": "web"
    }
  ]
}

Sample response

{
  "response": [
    {
      "content": [
        {
          "type": "text",
          "text": "To provision SSO, register the enterprise application, configure the redirect URI, upload the signing certificate, and complete the tenant-specific identity settings described in the product documentation."
        }
      ]
    }
  ],
  "activity": [
    {
      "type": "modelQueryPlanning",
      "id": 0,
      "inputTokens": 11,
      "outputTokens": 22,
      "elapsedMs": 10
    },
    {
      "type": "searchIndex",
      "id": 1,
      "knowledgeSourceName": "product-docs-ks",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 4,
      "elapsedMs": 64,
      "searchIndexArguments": {
        "search": "SSO provisioning steps",
        "sourceDataFields": [
          {
            "name": "title"
          },
          {
            "name": "content"
          },
          {
            "name": "id"
          }
        ],
        "searchFields": [],
        "semanticConfigurationName": "testconfig"
      }
    },
    {
      "type": "agenticReasoning",
      "id": 2,
      "retrievalReasoningEffort": {
        "kind": "low"
      },
      "reasoningTokens": 74
    },
    {
      "type": "modelAnswerSynthesis",
      "id": 3,
      "inputTokens": 664,
      "outputTokens": 1328,
      "elapsedMs": 10
    }
  ],
  "references": [
    {
      "type": "searchIndex",
      "id": "83dd7d40",
      "activitySource": 1,
      "sourceData": {
        "id": "sso-provisioning-guide",
        "title": "SSO provisioning guide",
        "content": "Register the enterprise application and configure the redirect URI."
      },
      "rerankerScore": 3.5,
      "docKey": "sso-provisioning-guide"
    }
  ]
}
{
  "response": [
    {
      "content": [
        {
          "type": "text",
          "text": "Partial results were returned before the retrieval completed."
        }
      ]
    }
  ],
  "activity": [
    {
      "type": "modelQueryPlanning",
      "id": 0,
      "inputTokens": 11,
      "outputTokens": 22,
      "elapsedMs": 10
    },
    {
      "type": "searchIndex",
      "id": 1,
      "knowledgeSourceName": "product-docs-ks",
      "queryTime": "2025-01-01T00:08:45.045Z",
      "count": 1,
      "elapsedMs": 64,
      "searchIndexArguments": {
        "search": "SSO provisioning steps",
        "sourceDataFields": [
          {
            "name": "title"
          },
          {
            "name": "content"
          },
          {
            "name": "id"
          }
        ],
        "searchFields": [],
        "semanticConfigurationName": "testconfig"
      }
    }
  ],
  "references": [
    {
      "type": "searchIndex",
      "id": "83dd7d40",
      "activitySource": 1,
      "sourceData": {
        "id": "sso-provisioning-guide",
        "title": "SSO provisioning guide",
        "content": "Register the enterprise application and configure the redirect URI."
      },
      "rerankerScore": 3.5,
      "docKey": "sso-provisioning-guide"
    }
  ]
}

Definitions

Name Description
Accept

The Accept header.

AzureBlobKnowledgeSourceParams

Specifies runtime parameters for a azure blob knowledge source

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

FabricDataAgentKnowledgeSourceParams

Specifies runtime parameters for a Fabric Data Agent knowledge source

FabricOntologyKnowledgeSourceParams

Specifies runtime parameters for a Fabric Ontology knowledge source

FileKnowledgeSourceParams

Specifies runtime parameters for a File knowledge source

ImageServingStatistics

Statistics about image serving during a retrieval activity.

IndexedOneLakeKnowledgeSourceParams

Specifies runtime parameters for a indexed OneLake knowledge source

IndexedSharePointKnowledgeSourceParams

Specifies runtime parameters for a indexed SharePoint knowledge source

IndexedSqlKnowledgeSourceParams

Specifies runtime parameters for an indexed SQL knowledge source

KnowledgeBaseActivityRecordModel

Represents the model used for a knowledge base LLM activity, including its model name and deployment identifier.

KnowledgeBaseActivityRecordType

The type of activity record.

KnowledgeBaseAgenticReasoningActivityRecord

Represents an agentic reasoning activity record.

KnowledgeBaseAzureBlobActivityArguments

Represents the arguments the azure blob retrieval activity was run with.

KnowledgeBaseAzureBlobActivityRecord

Represents a azure blob retrieval activity record.

KnowledgeBaseAzureBlobReference

Represents an Azure Blob Storage document reference.

KnowledgeBaseErrorAdditionalInfo

The resource management error additional info.

KnowledgeBaseErrorDetail

The error details.

KnowledgeBaseFabricDataAgentActivityArguments

Represents the arguments the Fabric Data Agent retrieval activity was run with.

KnowledgeBaseFabricDataAgentActivityRecord

Represents a Fabric Data Agent retrieval activity record.

KnowledgeBaseFabricDataAgentReference

Represents a Fabric Data Agent document reference.

KnowledgeBaseFabricOntologyActivityArguments

Represents the arguments the Fabric Ontology retrieval activity was run with.

KnowledgeBaseFabricOntologyActivityRecord

Represents a Fabric Ontology retrieval activity record.

KnowledgeBaseFabricOntologyReference

Represents a Fabric Ontology document reference.

KnowledgeBaseFileActivityArguments

Represents the arguments the File retrieval activity was run with.

KnowledgeBaseFileActivityRecord

Represents a File retrieval activity record.

KnowledgeBaseFileReference

Represents a file document reference.

KnowledgeBaseImageContent

Image content.

KnowledgeBaseIndexedOneLakeActivityArguments

Represents the arguments the indexed OneLake retrieval activity was run with.

KnowledgeBaseIndexedOneLakeActivityRecord

Represents a indexed OneLake retrieval activity record.

KnowledgeBaseIndexedOneLakeReference

Represents an indexed OneLake document reference.

KnowledgeBaseIndexedSharePointActivityArguments

Represents the arguments the indexed SharePoint retrieval activity was run with.

KnowledgeBaseIndexedSharePointActivityRecord

Represents a indexed SharePoint retrieval activity record.

KnowledgeBaseIndexedSharePointReference

Represents an indexed SharePoint document reference.

KnowledgeBaseIndexedSqlActivityArguments

Represents the arguments the indexed SQL retrieval activity was run with.

KnowledgeBaseIndexedSqlActivityRecord

Represents an indexed SQL retrieval activity record.

KnowledgeBaseIndexedSqlReference

Represents an Azure SQL document reference.

KnowledgeBaseMcpServerActivityArguments

Represents the arguments the MCP server retrieval activity was run with.

KnowledgeBaseMcpServerActivityRecord

Represents an MCP server retrieval activity record.

KnowledgeBaseMcpServerReference

Represents an MCP server document reference.

KnowledgeBaseMessage

The natural language message style object.

KnowledgeBaseMessageContentType

The type of message content.

KnowledgeBaseMessageImageContent

Image message type.

KnowledgeBaseMessageTextContent

Text message type.

KnowledgeBaseModelAnswerSynthesisActivityRecord

Represents an LLM answer synthesis activity record.

KnowledgeBaseModelQueryPlanningActivityRecord

Represents an LLM query planning activity record.

KnowledgeBaseModelWebSummarizationActivityRecord

Represents an LLM web summarization activity record.

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for a retrieval activity.

KnowledgeBaseReferenceType

The type of reference.

KnowledgeBaseRemoteSharePointActivityArguments

Represents the arguments the remote SharePoint retrieval activity was run with.

KnowledgeBaseRemoteSharePointActivityRecord

Represents a remote SharePoint retrieval activity record.

KnowledgeBaseRemoteSharePointReference

Represents a remote SharePoint document reference.

KnowledgeBaseRetrievalRequest

The input contract for the retrieval request.

KnowledgeBaseRetrievalResponse

The output contract for the retrieval response.

KnowledgeBaseSearchIndexActivityArguments

Represents the arguments the search index retrieval activity was run with.

KnowledgeBaseSearchIndexActivityRecord

Represents a search index retrieval activity record.

KnowledgeBaseSearchIndexReference

Represents an Azure Search document reference.

KnowledgeBaseWebActivityArguments

Represents the arguments the web retrieval activity was run with.

KnowledgeBaseWebActivityRecord

Represents a web retrieval activity record.

KnowledgeBaseWebReference

Represents a web document reference.

KnowledgeBaseWorkIQActivityArguments

Represents the arguments the WorkIQ retrieval activity was run with.

KnowledgeBaseWorkIQActivityRecord

Represents a WorkIQ retrieval activity record.

KnowledgeBaseWorkIQReference

Represents a WorkIQ document reference.

KnowledgeRetrievalAutoReasoningEffort

Automatically select the reasoning effort during retrieval. The service seeds every request at the cheapest tier and escalates only as far as needed, up to the service's maximum available tier.

KnowledgeRetrievalIntentType

The kind of knowledge base configuration to use.

KnowledgeRetrievalLowReasoningEffort

Run knowledge retrieval with low reasoning effort.

KnowledgeRetrievalMediumReasoningEffort

Run knowledge retrieval with medium reasoning effort.

KnowledgeRetrievalMinimalReasoningEffort

Run knowledge retrieval with minimal reasoning effort.

KnowledgeRetrievalOutputMode

The output configuration for this retrieval.

KnowledgeRetrievalReasoningEffortKind

The amount of effort to use during retrieval.

KnowledgeRetrievalSemanticIntent

A semantic query intent.

KnowledgeSourceKind

The kind of the knowledge source.

KnowledgeSourceResultsProcessing

Controls whether a knowledge source's results are reranked.

McpServerKnowledgeSourceParams

Specifies runtime parameters for an MCP server knowledge source

PurviewSensitivityLabelInfo

Information about the sensitivity label applied to a document

QueryType

Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax and 'semantic' if query syntax is not needed.

RemoteSharePointKnowledgeSourceParams

Specifies runtime parameters for a remote SharePoint knowledge source

SearchIndexFieldReference

Field reference for a search index.

SearchIndexKnowledgeSourceBoostKind

The kind of boost hint for a search index knowledge source.

SearchIndexKnowledgeSourceFieldValueBoost

A hint that boosts documents based on a field value.

SearchIndexKnowledgeSourceFilterHint

A hint that identifies a field and representative values the query planner can use when constructing a filter.

SearchIndexKnowledgeSourceMultiWordExpressionBoost

A hint that boosts documents based on a multi-word expression.

SearchIndexKnowledgeSourceParams

Specifies runtime parameters for a search index knowledge source

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts for a search index knowledge source.

ServedImage

Describes a single image that the model selected to be served during a retrieval activity.

WebKnowledgeSourceParams

Specifies runtime parameters for a web knowledge source

WorkIQKnowledgeSourceParams

Specifies runtime parameters for a WorkIQ knowledge source

Accept

The Accept header.

Value Description
application/json;odata.metadata=minimal

AzureBlobKnowledgeSourceParams

Specifies runtime parameters for a azure blob knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

azureBlob

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

searchservice.knowledgeretrieval.retrieve

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error

ErrorDetail

The error object.

FabricDataAgentKnowledgeSourceParams

Specifies runtime parameters for a Fabric Data Agent knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

fabricDataAgent

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

FabricOntologyKnowledgeSourceParams

Specifies runtime parameters for a Fabric Ontology knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

fabricOntology

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

FileKnowledgeSourceParams

Specifies runtime parameters for a File knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

file

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

ImageServingStatistics

Statistics about image serving during a retrieval activity.

Name Type Description
imagesRetrieved

integer (int32)

The number of images retrieved from the asset store.

imagesSentToModel

integer (int32)

The number of images sent to the downstream model.

servedImages

ServedImage[]

The set of images the model selected to be served to the downstream model for this retrieval activity.

totalImageSizeBytes

integer (int64)

The total size in bytes of images sent to the model.

verbalizationUsed

boolean

Indicates whether image verbalization was used instead of direct image serving.

IndexedOneLakeKnowledgeSourceParams

Specifies runtime parameters for a indexed OneLake knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

indexedOneLake

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

IndexedSharePointKnowledgeSourceParams

Specifies runtime parameters for a indexed SharePoint knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

indexedSharePoint

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

IndexedSqlKnowledgeSourceParams

Specifies runtime parameters for an indexed SQL knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

indexedSql

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

KnowledgeBaseActivityRecordModel

Represents the model used for a knowledge base LLM activity, including its model name and deployment identifier.

Name Type Description
deploymentId

string

The deployment identifier of the model used for the activity.

modelName

string

The name of the model used for the activity.

KnowledgeBaseActivityRecordType

The type of activity record.

Value Description
searchIndex

Search index retrieval activity.

azureBlob

Azure Blob retrieval activity.

indexedSharePoint

Indexed SharePoint retrieval activity.

indexedOneLake

Indexed OneLake retrieval activity.

web

Web retrieval activity.

remoteSharePoint

Remote SharePoint retrieval activity.

workIQ

WorkIQ retrieval activity.

fabricDataAgent

Fabric Data Agent retrieval activity.

fabricOntology

Fabric Ontology retrieval activity.

mcpServer

MCP server retrieval activity.

file

File retrieval activity.

indexedSql

Indexed SQL retrieval activity.

modelQueryPlanning

LLM query planning activity.

modelAnswerSynthesis

LLM answer synthesis activity.

modelWebSummarization

LLM web summarization activity.

agenticReasoning

Agentic reasoning activity.

KnowledgeBaseAgenticReasoningActivityRecord

Represents an agentic reasoning activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

logicalReasoningEffort KnowledgeRetrievalReasoningEffort:

The logical reasoning effort requested by the customer. This is distinct from retrievalReasoningEffort, which reports the reasoning effort used for billing.

reasoningTokens

integer (int32)

The number of input tokens for agentic reasoning.

retrievalReasoningEffort KnowledgeRetrievalReasoningEffort:

The retrieval reasoning effort configuration.

startedAt

string (date-time)

The time at which the activity started.

type string:

agenticReasoning

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseAzureBlobActivityArguments

Represents the arguments the azure blob retrieval activity was run with.

Name Type Description
search

string

The search string used to query blob contents.

KnowledgeBaseAzureBlobActivityRecord

Represents a azure blob retrieval activity record.

Name Type Description
azureBlobArguments

KnowledgeBaseAzureBlobActivityArguments

The azure blob arguments for the retrieval activity.

completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

azureBlob

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseAzureBlobReference

Represents an Azure Blob Storage document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

blobUrl

string

The blob URL for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

azureBlob

The type of the reference.

KnowledgeBaseErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

searchservice.knowledgeretrieval.retrieve

The additional info.

type

string

The additional info type.

KnowledgeBaseErrorDetail

The error details.

Name Type Description
additionalInfo

KnowledgeBaseErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

KnowledgeBaseErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

KnowledgeBaseFabricDataAgentActivityArguments

Represents the arguments the Fabric Data Agent retrieval activity was run with.

Name Type Description
search

string

The search string used to query the Fabric Data Agent knowledge source.

KnowledgeBaseFabricDataAgentActivityRecord

Represents a Fabric Data Agent retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

fabricDataAgentArguments

KnowledgeBaseFabricDataAgentActivityArguments

The Fabric Data Agent arguments for the retrieval activity.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

fabricDataAgent

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseFabricDataAgentReference

Represents a Fabric Data Agent document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

dataAgentId

string

The Fabric Data Agent ID.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

fabricDataAgent

The type of the reference.

workspaceId

string

The Fabric workspace ID.

KnowledgeBaseFabricOntologyActivityArguments

Represents the arguments the Fabric Ontology retrieval activity was run with.

Name Type Description
search

string

The search string used to query the Fabric Ontology knowledge source.

KnowledgeBaseFabricOntologyActivityRecord

Represents a Fabric Ontology retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

fabricOntologyArguments

KnowledgeBaseFabricOntologyActivityArguments

The Fabric Ontology arguments for the retrieval activity.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

fabricOntology

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseFabricOntologyReference

Represents a Fabric Ontology document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

id

string

The ID of the reference.

ontologyId

string

The ontology ID within the workspace.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

fabricOntology

The type of the reference.

workspaceId

string

The Fabric workspace ID.

KnowledgeBaseFileActivityArguments

Represents the arguments the File retrieval activity was run with.

Name Type Description
search

string

The search string used to query file contents.

KnowledgeBaseFileActivityRecord

Represents a File retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

fileArguments

KnowledgeBaseFileActivityArguments

The File arguments for the retrieval activity.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

file

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseFileReference

Represents a file document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

docName

string

The document name for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

file

The type of the reference.

KnowledgeBaseImageContent

Image content.

Name Type Description
url

string (uri)

The url of the image.

KnowledgeBaseIndexedOneLakeActivityArguments

Represents the arguments the indexed OneLake retrieval activity was run with.

Name Type Description
search

string

The search string used to query indexed OneLake contents.

KnowledgeBaseIndexedOneLakeActivityRecord

Represents a indexed OneLake retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

indexedOneLakeArguments

KnowledgeBaseIndexedOneLakeActivityArguments

The indexed OneLake arguments for the retrieval activity.

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

indexedOneLake

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseIndexedOneLakeReference

Represents an indexed OneLake document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

docUrl

string

The document URL for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

indexedOneLake

The type of the reference.

KnowledgeBaseIndexedSharePointActivityArguments

Represents the arguments the indexed SharePoint retrieval activity was run with.

Name Type Description
search

string

The search string used to query indexed SharePoint contents.

KnowledgeBaseIndexedSharePointActivityRecord

Represents a indexed SharePoint retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

indexedSharePointArguments

KnowledgeBaseIndexedSharePointActivityArguments

The indexed SharePoint arguments for the retrieval activity.

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

indexedSharePoint

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseIndexedSharePointReference

Represents an indexed SharePoint document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

docUrl

string

The document URL for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

indexedSharePoint

The type of the reference.

KnowledgeBaseIndexedSqlActivityArguments

Represents the arguments the indexed SQL retrieval activity was run with.

Name Type Description
search

string

The search string used to query indexed SQL contents.

KnowledgeBaseIndexedSqlActivityRecord

Represents an indexed SQL retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

indexedSqlArguments

KnowledgeBaseIndexedSqlActivityArguments

The indexed SQL arguments for the retrieval activity.

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

indexedSql

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseIndexedSqlReference

Represents an Azure SQL document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

docUrl

string

The document URL for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

indexedSql

The type of the reference.

KnowledgeBaseMcpServerActivityArguments

Represents the arguments the MCP server retrieval activity was run with.

Name Type Description
toolArguments

searchservice.knowledgeretrieval.retrieve

The arguments passed to the MCP server tool.

toolName

string

The name of the MCP server tool used for the retrieval activity.

KnowledgeBaseMcpServerActivityRecord

Represents an MCP server retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

mcpServerArguments

KnowledgeBaseMcpServerActivityArguments

The MCP server arguments for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

mcpServer

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseMcpServerReference

Represents an MCP server document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

title

string

The title of the MCP server tool result.

toolName

string

The name of the MCP server tool that produced the reference.

type string:

mcpServer

The type of the reference.

KnowledgeBaseMessage

The natural language message style object.

Name Type Description
content KnowledgeBaseMessageContent[]:

The content of the message.

role

string

The role of the tool response.

KnowledgeBaseMessageContentType

The type of message content.

Value Description
text

Text message content kind.

image

Image message content kind.

KnowledgeBaseMessageImageContent

Image message type.

Name Type Description
image

KnowledgeBaseImageContent

The image content.

type string:

image

The type of the message

KnowledgeBaseMessageTextContent

Text message type.

Name Type Description
text

string

The text content.

type string:

text

The type of the message

KnowledgeBaseModelAnswerSynthesisActivityRecord

Represents an LLM answer synthesis activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

inputTokens

integer (int32)

The number of input tokens for the LLM answer synthesis activity.

model

KnowledgeBaseActivityRecordModel

The model used for the LLM answer synthesis activity.

outputTokens

integer (int32)

The number of output tokens for the LLM answer synthesis activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

modelAnswerSynthesis

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseModelQueryPlanningActivityRecord

Represents an LLM query planning activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

inputTokens

integer (int32)

The number of input tokens for the LLM query planning activity.

model

KnowledgeBaseActivityRecordModel

The model used for the LLM query planning activity.

outputTokens

integer (int32)

The number of output tokens for the LLM query planning activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

modelQueryPlanning

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseModelWebSummarizationActivityRecord

Represents an LLM web summarization activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

inputTokens

integer (int32)

The number of input tokens for the LLM web summarization activity.

model

KnowledgeBaseActivityRecordModel

The model used for the LLM web summarization activity.

outputTokens

integer (int32)

The number of output tokens for the LLM web summarization activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

modelWebSummarization

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for a retrieval activity.

Name Type Description
generatedBoost

string

The search clause generated from boost hints for this activity.

generatedFilter

string

The filter expression generated from filter hints for this activity.

KnowledgeBaseReferenceType

The type of reference.

Value Description
searchIndex

Search index document reference.

azureBlob

Azure Blob document reference.

indexedSharePoint

Indexed SharePoint document reference.

indexedOneLake

Indexed OneLake document reference.

web

Web document reference.

remoteSharePoint

Remote SharePoint document reference.

workIQ

Work IQ document reference.

fabricDataAgent

Fabric Data Agent document reference.

fabricOntology

Fabric Ontology document reference.

mcpServer

MCP server document reference.

file

File document reference.

indexedSql

Indexed SQL document reference.

KnowledgeBaseRemoteSharePointActivityArguments

Represents the arguments the remote SharePoint retrieval activity was run with.

Name Type Description
filterExpressionAddOn

string

The filter expression add-on for the retrieval activity.

search

string

The search string used to query the remote SharePoint knowledge source.

KnowledgeBaseRemoteSharePointActivityRecord

Represents a remote SharePoint retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

remoteSharePointArguments

KnowledgeBaseRemoteSharePointActivityArguments

The remote SharePoint arguments for the retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

remoteSharePoint

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseRemoteSharePointReference

Represents a remote SharePoint document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

remoteSharePoint

The type of the reference.

webUrl

string (uri)

The url the reference data originated from.

KnowledgeBaseRetrievalRequest

The input contract for the retrieval request.

Name Type Description
includeActivity

boolean

Indicates retrieval results should include activity information.

intents KnowledgeRetrievalIntent[]:

KnowledgeRetrievalSemanticIntent[]

A list of intended queries to execute without model query planning.

knowledgeSourceParams KnowledgeSourceParams[]:

A list of runtime parameters for the knowledge sources.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents in the output.

maxOutputSize

integer (int32)

Limits the maximum size of the content in the output.

maxOutputSizeInTokens

integer (int32)

Limits the maximum size of the content in the output.

maxRuntimeInSeconds

integer (int32)

The maximum runtime in seconds.

messages

KnowledgeBaseMessage[]

A list of chat message style input.

outputMode

KnowledgeRetrievalOutputMode

The output configuration for this retrieval.

retrievalReasoningEffort KnowledgeRetrievalReasoningEffort:

The retrieval reasoning effort configuration.

KnowledgeBaseRetrievalResponse

The output contract for the retrieval response.

Name Type Description
activity KnowledgeBaseActivityRecord[]:

The activity records for tracking progress and billing implications.

references KnowledgeBaseReference[]:

The references for the retrieval data used in the response.

response

KnowledgeBaseMessage[]

The response messages.

responseSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the overall response.

KnowledgeBaseSearchIndexActivityArguments

Represents the arguments the search index retrieval activity was run with.

Name Type Description
filter

string

The filter string.

queryType

QueryType

The query syntax used to execute the search. Query hints can cause semantic queries to use full query syntax.

search

string

The search string used to query the search index.

searchFields

SearchIndexFieldReference[]

What fields were searched against.

semanticConfigurationName

string

What semantic configuration was used from the search index.

sourceDataFields

SearchIndexFieldReference[]

What fields were selected for search.

KnowledgeBaseSearchIndexActivityRecord

Represents a search index retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryHintProcessing

KnowledgeBaseQueryHintProcessing

Details about the expressions generated from query hints for this activity.

queryTime

string (date-time)

The query time for this retrieval activity.

searchIndexArguments

KnowledgeBaseSearchIndexActivityArguments

The search index arguments for the retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

searchIndex

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

KnowledgeBaseSearchIndexReference

Represents an Azure Search document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

citationUrl

string (uri)

A Search-owned URL that points at the backing document for this reference, usable as a citation target.

docKey

string

The document key for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

searchIndex

The type of the reference.

KnowledgeBaseWebActivityArguments

Represents the arguments the web retrieval activity was run with.

Name Type Description
count

integer (int32)

The number of web results returned.

freshness

string

The freshness for the retrieval activity.

language

string

The language for the retrieval activity.

market

string

The market for the retrieval activity.

search

string

The search string used to query the web.

KnowledgeBaseWebActivityRecord

Represents a web retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

web

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

webArguments

KnowledgeBaseWebActivityArguments

The web arguments for the retrieval activity.

KnowledgeBaseWebReference

Represents a web document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

title

string

The title of the web document.

type string:

web

The type of the reference.

url

string (uri)

The url the reference data originated from.

KnowledgeBaseWorkIQActivityArguments

Represents the arguments the WorkIQ retrieval activity was run with.

Name Type Description
search

string

The search string used to query the WorkIQ knowledge source.

KnowledgeBaseWorkIQActivityRecord

Represents a WorkIQ retrieval activity record.

Name Type Description
completedAt

string (date-time)

The time at which the activity completed.

count

integer (int32)

The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.

elapsedMs

integer (int32)

The elapsed time in milliseconds for the retrieval activity.

error

KnowledgeBaseErrorDetail

The error detail explaining why the operation failed. This property is only included when the activity does not succeed.

id

integer (int32)

The ID of the activity record.

imageServing

ImageServingStatistics

Statistics about image serving for this retrieval activity

knowledgeSourceName

string

The knowledge source for the retrieval activity.

queryTime

string (date-time)

The query time for this retrieval activity.

startedAt

string (date-time)

The time at which the activity started.

type string:

workIQ

The type of the activity record.

warning

string

A warning message surfacing potential configuration issues observed during the activity, such as documents dropped due to score thresholding, token limit truncation, or timeout conditions.

workIQArguments

KnowledgeBaseWorkIQActivityArguments

The WorkIQ arguments for the retrieval activity.

KnowledgeBaseWorkIQReference

Represents a WorkIQ document reference.

Name Type Description
activitySource

integer (int32)

The source activity ID for the reference.

id

string

The ID of the reference.

rerankerScore

number (float)

The reranker score for the document reference.

searchSensitivityLabelInfo

PurviewSensitivityLabelInfo

The sensitivity label information for the reference.

sourceData

searchservice.knowledgeretrieval.retrieve

The source data for the reference.

type string:

workIQ

The type of the reference.

KnowledgeRetrievalAutoReasoningEffort

Automatically select the reasoning effort during retrieval. The service seeds every request at the cheapest tier and escalates only as far as needed, up to the service's maximum available tier.

Name Type Description
kind string:

auto

The kind of reasoning effort.

KnowledgeRetrievalIntentType

The kind of knowledge base configuration to use.

Value Description
semantic

A natural language semantic query intent.

KnowledgeRetrievalLowReasoningEffort

Run knowledge retrieval with low reasoning effort.

Name Type Description
kind string:

low

The kind of reasoning effort.

KnowledgeRetrievalMediumReasoningEffort

Run knowledge retrieval with medium reasoning effort.

Name Type Description
kind string:

medium

The kind of reasoning effort.

KnowledgeRetrievalMinimalReasoningEffort

Run knowledge retrieval with minimal reasoning effort.

Name Type Description
kind string:

minimal

The kind of reasoning effort.

KnowledgeRetrievalOutputMode

The output configuration for this retrieval.

Value Description
extractiveData

Return data from the knowledge sources directly without generative alteration.

answerSynthesis

Synthesize an answer for the response payload.

KnowledgeRetrievalReasoningEffortKind

The amount of effort to use during retrieval.

Value Description
minimal

Does not perform any source selections, query planning, or iterative search.

low

Use low reasoning during retrieval.

medium

Use a moderate amount of reasoning during retrieval.

auto

Automatically select the reasoning effort during retrieval, escalating from the cheapest tier only as far as needed.

KnowledgeRetrievalSemanticIntent

A semantic query intent.

Name Type Description
search

string

The semantic query to execute

type string:

semantic

The type of the intent.

KnowledgeSourceKind

The kind of the knowledge source.

Value Description
searchIndex

A knowledge source that reads data from a Search Index.

azureBlob

A knowledge source that read and ingest data from Azure Blob Storage to a Search Index.

indexedSharePoint

A knowledge source that reads data from indexed SharePoint.

indexedOneLake

A knowledge source that reads data from indexed OneLake.

indexedSql

A knowledge source that retrieves and ingests data from Azure SQL Database or SQL Managed Instance to a Search Index.

web

A knowledge source that reads data from the web.

remoteSharePoint

A knowledge source that reads data from remote SharePoint.

workIQ

A knowledge source that reads data from work IQ

file

A knowledge source that supports direct file upload and indexing.

mcpServer

A knowledge source backed by an MCP (Model Context Protocol) server.

fabricDataAgent

A knowledge source that retrieves data from a Fabric Data Agent.

fabricOntology

A knowledge source that retrieves data from Microsoft Fabric Ontology ontologies.

KnowledgeSourceResultsProcessing

Controls whether a knowledge source's results are reranked.

Value Description
rerank

Results from this knowledge source go through the reranking pipeline. This is the default behavior.

none

Results from this knowledge source bypass reranking and preserve their underlying order.

McpServerKnowledgeSourceParams

Specifies runtime parameters for an MCP server knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

mcpServer

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

PurviewSensitivityLabelInfo

Information about the sensitivity label applied to a document

Name Type Description
color

string

The color that the UI should display for the label, if configured.

displayName

string

The display name for the sensitivity label.

isEncrypted

boolean

Indicates whether the sensitivity label enforces encryption.

priority

integer (int32)

The priority in which the sensitivity label is applied.

sensitivityLabelId

string

The ID of the sensitivity label.

toolTip

string

The tooltip that should be displayed for the label in a UI.

QueryType

Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax and 'semantic' if query syntax is not needed.

Value Description
simple

Uses the simple query syntax for searches. Search text is interpreted using a simple query language that allows for symbols such as +, * and "". Queries are evaluated across all searchable fields by default, unless the searchFields parameter is specified.

full

Uses the full Lucene query syntax for searches. Search text is interpreted using the Lucene query language which allows field-specific and weighted searches, as well as other advanced features.

semantic

Best suited for queries expressed in natural language as opposed to keywords. Improves precision of search results by re-ranking the top search results using a ranking model trained on the Web corpus.

RemoteSharePointKnowledgeSourceParams

Specifies runtime parameters for a remote SharePoint knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

filterExpressionAddOn

string

A filter condition applied to the SharePoint data source. It must be specified in the Keyword Query Language syntax. It will be combined as a conjunction with the filter expression specified in the knowledge source definition.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

remoteSharePoint

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

SearchIndexFieldReference

Field reference for a search index.

Name Type Description
name

string

The name of the field.

SearchIndexKnowledgeSourceBoostKind

The kind of boost hint for a search index knowledge source.

Value Description
fieldValue

Boost documents based on a field value.

multiWordExpression

Boost documents based on a multi-word expression.

SearchIndexKnowledgeSourceFieldValueBoost

A hint that boosts documents based on a field value.

Name Type Description
boost

number (double)

A multiplier for the document score. Must be a positive number not equal to 1.0.

boostInstructions

string

Natural-language instructions that explain when and how to apply the boost.

field

string

minLength: 1

The name of the search index field.

fieldValues

string[]

Representative values for the field.

kind string:

fieldValue

The kind of boost hint.

SearchIndexKnowledgeSourceFilterHint

A hint that identifies a field and representative values the query planner can use when constructing a filter.

Name Type Description
field

string

minLength: 1

The name of the filterable search index field.

fieldValues

string[]

Representative values for the field.

filterInstructions

string

Natural-language instructions that explain when and how to filter on the field.

SearchIndexKnowledgeSourceMultiWordExpressionBoost

A hint that boosts documents based on a multi-word expression.

Name Type Description
boost

number (double)

A multiplier for the document score. Must be a positive number not equal to 1.0.

boostInstructions

string

Natural-language instructions that explain when and how to apply the boost.

fieldValues

string[]

Representative values for the boost.

kind string:

multiWordExpression

The kind of boost hint.

SearchIndexKnowledgeSourceParams

Specifies runtime parameters for a search index knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

filterAddOn

string

A filter condition applied to the index (e.g., 'State eq VA').

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

searchIndex

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

queryHintOverrides

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts. If specified, this object replaces the complete set of query hints configured on the knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

SearchIndexKnowledgeSourceQueryHints

Hints that guide query planning toward useful filters and boosts for a search index knowledge source.

Name Type Description
boosts SearchIndexKnowledgeSourceBoost[]:

Boost hints that identify conditions the query planner can use to influence document ranking.

filters

SearchIndexKnowledgeSourceFilterHint[]

Filter hints that identify fields and representative values the query planner can use when constructing filters.

ServedImage

Describes a single image that the model selected to be served during a retrieval activity.

Name Type Description
imageId

string

The image label extracted from the source document by Content Understanding enrichment. Corresponds to the figure numbering in the original document.

imagePath

string

The relative path to the image within the asset store.

sizeBytes

integer (int64)

The size in bytes of this image as sent to the model.

WebKnowledgeSourceParams

Specifies runtime parameters for a web knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

count

integer (int32)

The number of web results to return.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

freshness

string

The freshness of web results.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

web

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

language

string

The language of the web results.

market

string

The market of the web results.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.

WorkIQKnowledgeSourceParams

Specifies runtime parameters for a WorkIQ knowledge source

Name Type Description
alwaysQuerySource

boolean

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

enableImageServing

boolean

Indicates whether image serving should be enabled for this knowledge source at retrieval time. When true, images extracted during ingestion are delivered to downstream models.

failOnError

boolean

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

includeReferenceSourceData

boolean

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferences

boolean

Indicates whether references should be included for data retrieved from this source.

kind string:

workIQ

The type of the knowledge source.

knowledgeSourceName

string

The name of the index the params apply to.

maxOutputDocuments

integer (int32)

Limits the maximum number of documents returned from this knowledge source.

neverQuerySource

boolean

Indicates that this knowledge source should be excluded from the request's candidate set and never queried at retrieval time. The exclusion is request-local and does not modify knowledge base membership. Cannot be combined with alwaysQuerySource on the same knowledge source.

rerankerThreshold

number (float)

The reranker threshold all retrieved documents must meet to be included in the response.

resultsProcessing

KnowledgeSourceResultsProcessing

Overrides the knowledge source's stored resultsProcessing for this retrieve call only. When omitted, the stored knowledge source value applies.