Skip to content

Commit 9c75a8e

Browse files
authored
Merge pull request #5308 from HeidiSteen/heidist-ar-updates
[azure search] Updates on AR docs
2 parents 2002a90 + f27f17a commit 9c75a8e

4 files changed

+117
-79
lines changed

articles/search/search-agentic-retrieval-how-to-create.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,38 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: azure-ai-search
1010
ms.topic: how-to
11-
ms.date: 05/05/2025
11+
ms.date: 05/30/2025
1212
---
1313

1414
# Create a knowledge agent in Azure AI Search
1515

1616
[!INCLUDE [Feature preview](./includes/previews/preview-generic.md)]
1717

18-
In Azure AI Search, a *knowledge agent* is a top-level resource representing a connection to a conversational language model for use in agentic retrieval workloads. It specifies a model that provides reasoning capabilities, and it identifies the search index used at query time.
18+
In Azure AI Search, a *knowledge agent* is a top-level resource representing a connection to a chat completion model for use in agentic retrieval workloads. A knowledge agent is used by the [retrieve method](search-agentic-retrieval-how-to-retrieve.md) in an LLM-powered information retrieval pipeline.
19+
20+
A knowledge agent specifies:
21+
22+
+ A model that provides reasoning capabilities
23+
+ A target search index used at query time
24+
+ Parameters on the index for setting default behaviors and response shaping
1925

2026
After you can create a knowledge agent, you can update its properties at any time. If the knowledge agent is in use, updates take effect on the next job.
2127

2228
## Prerequisites
2329

2430
+ Familiarity with [agentic retrieval concepts and use cases](search-agentic-retrieval-concept.md).
2531

26-
+ A conversational language model on Azure OpenAI, either gpt-4o or gpt-4o-mini.
32+
+ A [supported chat completion model](#supported-models) on Azure OpenAI.
2733

28-
+ Azure AI Search, in any [region that provides semantic ranker](search-region-support.md), on basic tier and above. Your search service must have a [managed identity](search-howto-managed-identities-data-sources.md) for role-based access to a chat model.
34+
+ Azure AI Search, in any [region that provides semantic ranker](search-region-support.md), on the basic pricing tier or higher. Your search service must have a [managed identity](search-howto-managed-identities-data-sources.md) for role-based access to the model.
2935

30-
+ Permission requirements on Azure AI Search. An **Owner/Contributor** or **Search Service Contributor** can create and manage a knowledge agent. **Search Index Data Contributor** uploads and indexes document. **Search Index Data Reader** runs queries. Instructions are provided in this article.
36+
+ Permissions on Azure AI Search. **Search Service Contributor** can create and manage a knowledge agent. **Search Index Data Reader** can run queries. Instructions are provided in this article.
3137

32-
+ A search index containing plain text or vectors. The index must [meet requirements for agentic retrieval](search-agentic-retrieval-how-to-index.md), including a [semantic configuration](semantic-how-to-configure.md) with the `defaultConfiguration` specified.
38+
+ A search index containing plain text or vectors. The index must [meet the requirements for agentic retrieval](search-agentic-retrieval-how-to-index.md), including a [semantic configuration](semantic-how-to-configure.md) with the `defaultConfiguration` specified.
3339

34-
+ API requirements. To create or use a knowledge agent, use 2025-05-01-preview data plane REST API or a prerelease package of an Azure SDK that provides knowledge agent APIs.
40+
+ API requirements. To create or use a knowledge agent, use [2025-05-01-preview](/rest/api/searchservice/operation-groups?view=rest-searchservice-2025-05-01-preview&preserve-view=true) data plane REST API. Or, use a prerelease package of an Azure SDK that provides knowledge agent APIs: [Azure SDK for Python](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/CHANGELOG.md), [Azure SDK for .NET](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/CHANGELOG.md#1170-beta3-2025-03-25), [Azure SDK for Java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/CHANGELOG.md).
3541

36-
To follow the steps in this guide, we recommend [Visual Studio Code](https://code.visualstudio.com/download) with a [REST client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) for sending REST API calls to Azure AI Search. There's no portal support at this time.
42+
To follow the steps in this guide, we recommend [Visual Studio Code](https://code.visualstudio.com/download) with a [REST client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) for sending preview REST API calls to Azure AI Search. There's no portal support at this time.
3743

3844
## Deploy a model for agentic retrieval
3945

@@ -43,7 +49,9 @@ Make sure you have a supported model that Azure AI Search can access. The follow
4349

4450
1. Deploy a supported model using [these instructions](/azure/ai-foundry/how-to/deploy-models-openai).
4551

46-
1. Verify the search service managed identity has **Cognitive Services User** permissions on the Azure OpenAI resource. If you're testing locally, you also need **Cognitive Services User** permissions.
52+
1. Verify the search service managed identity has **Cognitive Services User** permissions on the Azure OpenAI resource.
53+
54+
If you're testing locally, you also need **Cognitive Services User** permissions.
4755

4856
### Supported models
4957

@@ -97,34 +105,37 @@ You can use API keys if you don't have permission to create role assignments.
97105
98106
# List Indexes
99107
GET https://{{search-url}}/indexes?api-version=2025-05-01-preview
100-
api-key: {{search-api-key}}
108+
Content-Type: application/json
109+
@api-key: {{search-api-ke}}
101110
```
102111

103112
## Check for existing knowledge agents
104113

105-
The following request lists knowledge agents by name. Within the knowledge agents collection, all knowledge agents must be uniquely named. It's helpful for knowing about existing knowledge agents for reuse or naming purposes.
114+
The following request lists knowledge agents by name on your search service. Within the knowledge agents collection, all knowledge agents are uniquely named. It's helpful for knowing about existing knowledge agents for reuse or naming purposes.
106115

107116
<!-- ### [**REST APIs**](#tab/rest-get) -->
108117

109118
```http
110119
# List knowledge agents
111120
GET https://{{search-url}}/agents?api-version=2025-05-01-preview
112-
api-key: {{search-api-key}}
121+
Content-Type: application/json
122+
Authorization: Bearer {{accessToken}}
113123
```
114124

115-
You can also return a single agent by name.
125+
You can also return a single agent by name to review its JSON definition.
116126

117127
```http
118128
# Get knowledge agent
119129
GET https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
120-
api-key: {{search-api-key}}
130+
Content-Type: application/json
131+
Authorization: Bearer {{accessToken}}
121132
```
122133

123134
<!-- --- -->
124135

125136
## Create a knowledge agent
126137

127-
A knowledge agent represents a connection to a model that you've deployed. Parameters on the model establish the connection.
138+
A knowledge agent represents a connection between a model that you've deployed in Azure OpenAI and a target index on Azure AI Search. Parameters on the model establish the connection. Parameters on the index establish defaults that inform query execution and the response.
128139

129140
<!-- ### [**REST APIs**](#tab/rest-create) -->
130141

@@ -136,12 +147,12 @@ To create an agent, use the 2025-05-01-preview data plane REST API or an Azure S
136147
@agent-name=<YOUR AGENT NAME>
137148
@index-name=<YOUR INDEX NAME>
138149
@model-provider-url=<YOUR AZURE OPENAI RESOURCE URI>
139-
@model-api-key=<YOUR AZURE OPENAI API KEY>
150+
@accessToken = <a long GUID>
140151
141152
# Create knowledge agent
142153
PUT https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
143-
api-key: {{search-api-key}}
144-
Content-Type: application/json
154+
Content-Type: application/json
155+
Authorization: Bearer {{accessToken}}
145156
146157
{
147158
"name" : "{{agent-name}}",
@@ -174,7 +185,7 @@ Content-Type: application/json
174185

175186
**Key points**:
176187

177-
+ `name` must be unique within the knowledge agents collection it must adhere to [naming rules](/rest/api/searchservice/naming-rules) for objects on Azure AI Search.
188+
+ `name` must be unique within the knowledge agents collection and follow the [naming guidelines](/rest/api/searchservice/naming-rules) for objects on Azure AI Search.
178189

179190
+ `targetIndexes` is required for knowledge agent creation. It lists the search indexes that can use the knowledge agent. Currently in this preview release, the `targetIndexes` array can contain only one index. *It must have a default semantic configuration* (`defaultConfiguration`). For more information, see [Design an index for agentic retrieval](search-agentic-retrieval-how-to-index.md).
180191

@@ -213,8 +224,8 @@ Replace "What are my vision benefits?" with a query string that's valid for your
213224
```http
214225
# Send Grounding Request
215226
POST https://{{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-05-01-preview
216-
api-key: {{search-api-key}}
217-
Content-Type: application/json
227+
Content-Type: application/json
228+
Authorization: Bearer {{accessToken}}
218229

219230
{
220231
"messages" : [
@@ -247,14 +258,18 @@ For more information about the **retrieve** API and the shape of the response, s
247258

248259
## Delete an agent
249260

261+
If you no longer need the agent, or if you need to rebuild it on the search service, use this request to delete the current object.
262+
250263
```http
251264
# Delete Agent
252265
DELETE https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
253-
api-key: {{search-api-key}}
266+
Authorization: Bearer {{accessToken}}
254267
```
255268

256269
## Related content
257270

258271
+ [Agentic retrieval in Azure AI Search](search-agentic-retrieval-concept.md)
259272

273+
+ [Agentic RAG: build a reasoning retrieval engine with Azure AI Search (YouTube video)](https://www.youtube.com/watch?v=PeTmOidqHM8)
274+
260275
+ [Azure OpenAI Demo featuring agentic retrieval](https://github.com/Azure-Samples/azure-search-openai-demo)

articles/search/search-agentic-retrieval-how-to-index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,6 @@ Synonym maps are defined as a top-level resource on a search index and assigned
323323

324324
+ [Agentic retrieval in Azure AI Search](search-agentic-retrieval-concept.md)
325325

326+
+ [Agentic RAG: build a reasoning retrieval engine with Azure AI Search (YouTube video)](https://www.youtube.com/watch?v=PeTmOidqHM8)
327+
326328
+ [Azure OpenAI Demo featuring agentic retrieval](https://github.com/Azure-Samples/azure-search-openai-demo)

articles/search/search-agentic-retrieval-how-to-pipeline.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,6 @@ Look at output tokens in the [activity array](search-agentic-retrieval-how-to-re
263263

264264
+ [Agentic retrieval in Azure AI Search](search-agentic-retrieval-concept.md)
265265

266+
+ [Agentic RAG: build a reasoning retrieval engine with Azure AI Search (YouTube video)](https://www.youtube.com/watch?v=PeTmOidqHM8)
267+
266268
+ [Azure OpenAI Demo featuring agentic retrieval](https://github.com/Azure-Samples/azure-search-openai-demo)

0 commit comments

Comments
 (0)