You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/search-agentic-retrieval-how-to-create.md
+58-3Lines changed: 58 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,18 +241,73 @@ PUT {{search-url}}/agents/{{agent-name}}?api-version=2025-08-01-preview
241
241
242
242
<!-- --- -->
243
243
244
-
## Confirm knowledge agent operations
244
+
## Query the knowledge agent
245
245
246
246
Call the **retrieve** action on the knowledge agent object to confirm the model connection and return a response. Use the [2025-08-01-preview](/rest/api/searchservice/operation-groups?view=rest-searchservice-2025-08-01-preview&preserve-view=true) data plane REST API or an Azure SDK preview package that provides equivalent functionality for this task.
247
247
248
-
Replace "What are my vision benefits?" with a query string that's valid for your search index.
248
+
Replace "where does the ocean look green?" with a query string that's valid for your search index.
249
249
250
250
```http
251
251
# Send grounding request
252
252
POST {{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-08-01-preview
253
253
Content-Type: application/json
254
254
Authorization: Bearer {{accessToken}}
255
255
256
+
{
257
+
"messages" : [
258
+
{ "role" : "assistant",
259
+
"content" : [
260
+
{ "type" : "text", "text" : "Use the earth at night index to answer the question. If you can't find relevant content, say you don't know." }
261
+
]
262
+
},
263
+
{
264
+
"role" : "user",
265
+
"content" : [
266
+
{
267
+
"text" : "where does the ocean look green?",
268
+
"type" : "text"
269
+
}
270
+
]
271
+
}
272
+
],
273
+
"knowledgeSourceParams": [
274
+
{
275
+
"filterAddOn": null,
276
+
"knowledgeSourceName": "earth-at-night-blob-ks",
277
+
"kind": "searchIndex"
278
+
}
279
+
]
280
+
}
281
+
```
282
+
283
+
[messages](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-08-01-preview#knowledgeagentmessage&preserve-view=true) is required, but you can run this example using just "user" role that provides the query.
284
+
285
+
[`knowledgeSourceParams`](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-08-01-preview#searchindexknowledgesourceparams&preserve-view=true) is optional. Specify a knowledge source if the agent is configured for multiple sources and you want to focus the retrieve action on just one of them.
286
+
287
+
A knowledge source specification on the retrieve action describes the target search index on the search service. So even if the knowledge source "kind" is Azure blob, the valid value here is `searchIndex`. In this first public preview release, `knowledgeSourceParams.kind` is always `searchIndex`.
288
+
289
+
The response to the previous query might look like this:
290
+
291
+
```http
292
+
"response": [
293
+
{
294
+
"content": [
295
+
{
296
+
"type": "text",
297
+
"text": "The ocean appears green off the coast of Antarctica due to phytoplankton flourishing in the water, particularly in Granite Harbor near Antarctica’s Ross Sea, where they can grow in large quantities during spring, summer, and even autumn under the right conditions [ref_id:0]. Additionally, off the coast of Namibia, the ocean can also look green due to blooms of phytoplankton and yellow-green patches of sulfur precipitating from bacteria in oxygen-depleted waters [ref_id:1]. In the Strait of Georgia, Canada, the waters turned bright green due to a massive bloom of coccolithophores, a type of phytoplankton [ref_id:5]. Furthermore, a milky green and blue bloom was observed off the coast of Patagonia, Argentina, where nutrient-rich waters from different currents converge [ref_id:6]. Lastly, a large bloom of cyanobacteria was captured in the Baltic Sea, which can also give the water a green appearance [ref_id:9]."
298
+
}
299
+
]
300
+
}
301
+
],
302
+
```
303
+
304
+
305
+
<!-- ```http
306
+
# Send grounding request
307
+
POST {{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-08-01-preview
308
+
Content-Type: application/json
309
+
Authorization: Bearer {{accessToken}}
310
+
256
311
{
257
312
"messages" : [
258
313
{
@@ -278,7 +333,7 @@ POST {{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-08-01-previe
278
333
}
279
334
]
280
335
}
281
-
```
336
+
```-->
282
337
283
338
For more information about the **retrieve** API and the shape of the response, see [Retrieve data using a knowledge agent in Azure AI Search](search-agentic-retrieval-how-to-retrieve.md).
Copy file name to clipboardExpand all lines: articles/search/search-knowledge-source-how-to-blob.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,10 +211,12 @@ We recommend using the Azure portal to validate output creation.
211
211
212
212
## Assign to a knowledge agent
213
213
214
-
If you're satisfied with the index, continue to the next step: specifying the knowledge source in a [knowledge agent](search-agentic-retrieval-how-to-create.md).
214
+
If you're satisfied with the index, continue to the next step: specify the knowledge source in a [knowledge agent](search-agentic-retrieval-how-to-create.md).
215
215
216
216
Within the knowledge agent, there are more properties to set on the knowledge source that are specific to query operations.
217
217
218
+
After the knowledge agent is configured, use the retrieve action to query the knowledge source.
219
+
218
220
## Delete a knowledge source
219
221
220
222
If you no longer need the knowledge source, or if you need to rebuild it on the search service, use this request to delete the current object.
Copy file name to clipboardExpand all lines: articles/search/search-knowledge-source-overview.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ Make sure you have at least one knowledge source before creating a knowledge age
22
22
23
23
## Key points about a knowledge source
24
24
25
+
+ Creation path: first create knowledge source, then create knowledge agents. Deletion path: update or delete knowledge agents, delete knowledge sources last.
26
+
25
27
+ A knowledge source, its index, and the knowledge agent must all exist on the same search service.
26
28
27
29
+ Each knowledge source points to exactly one index, and that index must [meet the criteria for agentic retrieval](search-agentic-retrieval-how-to-index.md).
@@ -80,3 +82,36 @@ To achieve the fastest possible response times, follow these best practices:
80
82
+ Retain `includeReferences` set to true (default setting) for details about each individually scored result.
81
83
82
84
+ Set `includeReferenceSourceData` to false if you don't need the verbatim content from the index. Omitting this information simplifies the response and makes it more readable.
85
+
86
+
## Delete a knowledge source
87
+
88
+
Before you can delete a knowledge source, you must delete or update any knowledge agent that references it. The associated index is a standalone object in Azure AI Search and doesn't need to be deleted or updated in tandem with the knowledge source, but no references to the knowledge source can exist if you want to delete it.
89
+
90
+
If you try to delete a knowledge source that's in use, the action fails and a list of affected knowledge agents is returned.
91
+
92
+
1. Get the knowledge agent definition to confirm knowledge source references.
93
+
94
+
```http
95
+
### Get the knowledge agent
96
+
GET {{search-endpoint}}/agents/hotels-index-ka?api-version=2025-08-01-preview
97
+
api-key: {{api-key}}
98
+
Content-Type: application/json
99
+
```
100
+
101
+
1. Either update the knowledge agent by removing the knowledge source, or delete the knowledge agent. This example shows deletion.
0 commit comments