Skip to content

Commit bd23a4a

Browse files
committed
checkpoint
1 parent c979dee commit bd23a4a

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ ms.date: 05/30/2025
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 chat completion model for use in agentic retrieval workloads. A knowledge agent specifies:
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+
knowledge agent specifies:
1921

2022
+ A model that provides reasoning capabilities
21-
+ A search index used at query time
22-
+ Parameters on the index for setting default response behavior
23+
+ A target search index used at query time
24+
+ Parameters on the index for setting default behaviors and response shaping
2325

2426
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.
2527

2628
## Prerequisites
2729

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

30-
+ A chat completion model on Azure OpenAI.
32+
+ A [supported chat completion model](#supported-models) on Azure OpenAI.
3133

3234
+ 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.
3335

@@ -104,7 +106,7 @@ You can use API keys if you don't have permission to create role assignments.
104106
# List Indexes
105107
GET https://{{search-url}}/indexes?api-version=2025-05-01-preview
106108
Content-Type: application/json
107-
@api-key = <YOUR-SEARCH-SERVICE-API-KEY>
109+
@api-key: {{search-api-ke}}
108110
```
109111

110112
## Check for existing knowledge agents
@@ -117,7 +119,7 @@ The following request lists knowledge agents by name on your search service. Wit
117119
# List knowledge agents
118120
GET https://{{search-url}}/agents?api-version=2025-05-01-preview
119121
Content-Type: application/json
120-
@token = <a long GUID>
122+
Authorization: Bearer {{accessToken}}
121123
```
122124

123125
You can also return a single agent by name to review its JSON definition.
@@ -126,7 +128,7 @@ You can also return a single agent by name to review its JSON definition.
126128
# Get knowledge agent
127129
GET https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
128130
Content-Type: application/json
129-
@token = <a long GUID>
131+
Authorization: Bearer {{accessToken}}
130132
```
131133

132134
<!-- --- -->
@@ -145,12 +147,12 @@ To create an agent, use the 2025-05-01-preview data plane REST API or an Azure S
145147
@agent-name=<YOUR AGENT NAME>
146148
@index-name=<YOUR INDEX NAME>
147149
@model-provider-url=<YOUR AZURE OPENAI RESOURCE URI>
148-
@token = <a long GUID>
150+
@accessToken = <a long GUID>
149151
150152
# Create knowledge agent
151153
PUT https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
152154
Content-Type: application/json
153-
@token = <a long GUID>
155+
Authorization: Bearer {{accessToken}}
154156
155157
{
156158
"name" : "{{agent-name}}",
@@ -223,7 +225,7 @@ Replace "What are my vision benefits?" with a query string that's valid for your
223225
# Send Grounding Request
224226
POST https://{{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-05-01-preview
225227
Content-Type: application/json
226-
@token = <a long GUID>
228+
Authorization: Bearer {{accessToken}}
227229

228230
{
229231
"messages" : [
@@ -261,7 +263,7 @@ If you no longer need the agent, or if you need to rebuild it on the search serv
261263
```http
262264
# Delete Agent
263265
DELETE https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
264-
@token = <a long GUID>
266+
Authorization: Bearer {{accessToken}}
265267
```
266268

267269
## Related content

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.date: 05/30/2025
1717

1818
In Azure AI Search, *agentic retrieval* is a new parallel query architecture that uses a chat completion model for query planning. It generates subqueries that broaden the scope of what's searchable and relevant.
1919

20-
This article explains how to use the [**retrieve** method](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-05-01-preview&preserve-view=true) that invokes a knowledge agent and parallel query processing. This article also explains the three components of the retrieval response:
20+
This article explains how to use the [**retrieve method**](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-05-01-preview&preserve-view=true) that invokes a knowledge agent and parallel query processing. This article also explains the three components of the retrieval response:
2121

2222
+ *extracted response for the LLM*
2323
+ *referenced results*
@@ -26,7 +26,7 @@ This article explains how to use the [**retrieve** method](/rest/api/searchservi
2626
The retrieve request can include instructions for query processing that override the defaults set on the knowledge agent.
2727

2828
> [!NOTE]
29-
> There's no model-generated "answer" in the response. Instead, the response provides grounding data used to generate an answer from an LLM. For an end-to-end example, see [Build an agent-to-agent retrieval solution ](search-agentic-retrieval-how-to-pipeline.md) or [Azure OpenAI Demo](https://github.com/Azure-Samples/azure-search-openai-demo).
29+
> There's no model-generated "answer" in the response. Instead, the response passes content to an LLM that grounds its answer based on the content. For an end-to-end example that includes this step, see [Build an agent-to-agent retrieval solution ](search-agentic-retrieval-how-to-pipeline.md) or [Azure OpenAI Demo](https://github.com/Azure-Samples/azure-search-openai-demo).
3030
3131
## Prerequisites
3232

@@ -49,10 +49,13 @@ All `searchable` fields in the search index are in-scope for query execution. If
4949
The input for the retrieval route is chat conversation history in natural language, where the `messages` array contains the conversation.
5050

5151
```http
52+
@search-url=<YOUR SEARCH SERVICE URL>
53+
@accessToken=<YOUR PERSONAL ID>
54+
5255
# Send Grounding Request
5356
POST https://{{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-05-01-preview
54-
@accessToken=<YOUR PERSONAL ID>
5557
Content-Type: application/json
58+
Authorization: Bearer {{accessToken}}
5659
5760
{
5861
"messages" : [
@@ -155,32 +158,32 @@ Here's an example of an activity array.
155158
{
156159
"type": "ModelQueryPlanning",
157160
"id": 0,
158-
"inputTokens": 1308,
159-
"outputTokens": 141
161+
"inputTokens": 1270,
162+
"outputTokens": 221
160163
},
161164
{
162165
"type": "AzureSearchQuery",
163166
"id": 1,
164167
"targetIndex": "myindex",
165168
"query": {
166-
"search": "hello world programming",
169+
"search": "impact of prior authorization process on out-of-pocket costs",
167170
"filter": null
168171
},
169172
"queryTime": "2025-04-25T16:40:08.811Z",
170-
"count": 2,
171-
"elapsedMs": 867
173+
"count": 27,
174+
"elapsedMs": 623
172175
},
173176
{
174177
"type": "AzureSearchQuery",
175178
"id": 2,
176179
"targetIndex": "myindex",
177180
"query": {
178-
"search": "hello world meaning",
181+
"search": "copayment expectations for in-network services",
179182
"filter": null
180183
},
181184
"queryTime": "2025-04-25T16:40:08.955Z",
182-
"count": 2,
183-
"elapsedMs": 136
185+
"count": 22,
186+
"elapsedMs": 556
184187
}
185188
],
186189
```
@@ -201,7 +204,7 @@ Here's an example of the references array.
201204
"references": [
202205
{
203206
"type": "AzureSearchDoc",
204-
"id": "0",
207+
"id": "1",
205208
"activitySource": 2,
206209
"docKey": "2",
207210
"sourceData": {

0 commit comments

Comments
 (0)