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/includes/quickstarts/search-get-started-rbac-python.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,18 @@ To sign in:
33
33
34
34
1. On your local system, open a command-line tool.
35
35
36
-
1.Sign in to Azure. If you have multiple subscriptions, select the one whose ID you obtained in [Get service information](#get-service-information).
36
+
1.Check for the active tenant and subscription in your local environment.
37
37
38
38
```azurecli
39
-
az login
39
+
az account show
40
+
```
41
+
42
+
1. If the active subscription and tenant aren't valid for your search service, change the variables. You can check for the subscription ID on the search service overview page in the Azure portal. You can check for the tenant ID by clicking through to the subscription. In the Azure portal, the tenant ID is referred to as the **Parent management group**. Make a note of the values that are valid for your search service and run the following commands to update your local environment.
43
+
44
+
```azurecli
45
+
az account set --subscription <your-subscription-id>
Before you connect to your Azure AI Search service, use the Azure CLI to sign in to the subscription that contains your service and generate a Microsoft Entra ID token. You use this token to authenticate requests in the next section.
31
-
32
-
To get your token:
28
+
## Sign in to Azure
33
29
34
-
1. On your local system, open a command-line tool.
30
+
Before you connect to your Azure AI Search service, use the Azure CLI to sign in to the subscription that contains your service.
35
31
36
32
1. Check for the active tenant and subscription in your local environment.
37
33
38
34
```azurecli
39
35
az account show
40
36
```
41
37
42
-
1. If the active subscription and tenant aren't valid for your search service, change the variables. You can check for the subscription ID on the search service overview page in the Azure portal. You can check for the tenant ID by clicking through to the subscription. Make a note of the values that are valid for your search service and run the following commands to update your local environment.
38
+
1. If the active subscription and tenant aren't valid for your search service, change the variables. You can check for the subscription ID on the search service overview page in the Azure portal. You can check for the tenant ID by clicking through to the subscription. In the Azure portal, the tenant ID is referred to as the **Parent management group**. Make a note of the values that are valid for your search service and run the following commands to update your local environment.
43
39
44
40
```azurecli
45
41
az account set --subscription <your-subscription-id>
46
42
47
43
az login --tenant <your-tenant-id>
48
44
```
49
45
46
+
## Get token
47
+
48
+
REST API calls require the inclusion of a Microsoft Entra ID token. You use this token to authenticate requests in the next section.
49
+
50
+
To get your token:
51
+
52
+
1. On your local system, open a command-line tool.
53
+
50
54
1. Generate an access token.
51
55
52
56
```azurecli
53
57
az account get-access-token --scope https://search.azure.com/.default --query accessToken --output tsv
Copy file name to clipboardExpand all lines: articles/search/search-agentic-retrieval-how-to-index.md
+8-17Lines changed: 8 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: HeidiSteen
7
7
ms.author: heidist
8
8
ms.service: azure-ai-search
9
9
ms.topic: how-to
10
-
ms.date: 08/29/2025
10
+
ms.date: 10/01/2025
11
11
---
12
12
13
13
# Design an index for agentic retrieval in Azure AI Search
@@ -16,13 +16,13 @@ ms.date: 08/29/2025
16
16
17
17
In Azure AI Search, *agentic retrieval* is a new parallel query architecture that uses a chat completion model for query planning, generating subqueries that broaden the scope of what's searchable and relevant.
18
18
19
-
Subqueries are created internally. Certain aspects of the subqueries are determined by your search index. This article explains which index elements have an effect on agentic retrieval. None of the required elements are new or specific to agentic retrieval, which means you can use an existing index if it meets the criteria identified in this article, even if it was created using earlier API versions.
19
+
Subqueries are created internally. Certain aspects of the subqueries are determined by your search index. This article explains which index elements have an effect on the query logic. None of the required elements are new or specific to agentic retrieval, which means you can use an existing index if it meets the criteria identified in this article, even if it was created using earlier API versions.
20
20
21
-
A search index that's used in agentic retrieval is specified as *knowledge source* and is either:
21
+
A search index that's used in agentic retrieval is specified as *knowledge source*on a *knowledge agent*, and is either:
22
22
23
23
+ An existing indexing containing searchable content. This index is made available to agentic retrieval through a [search index knowledge source](search-knowledge-source-how-to-index.md) definition.
24
24
25
-
+ A generated index created from a generated blob indexer pipeline. This index is generated and populated using information from a [blob knowledge source](search-knowledge-source-how-to-blob.md). It's based on a template that meets all of the criteria for knowledge agents and agentic retrieval.
25
+
+ A generated index created from a blob indexer pipeline. This index is generated and populated using information from a [blob knowledge source](search-knowledge-source-how-to-blob.md). It's based on a template that meets all of the criteria for knowledge agents and agentic retrieval.
26
26
27
27
## Criteria for agentic retrieval
28
28
@@ -64,7 +64,7 @@ Here's an example index that works for agentic retrieval. It meets the criteria
@@ -152,21 +150,14 @@ Here's an example index that works for agentic retrieval. It meets the criteria
152
150
153
151
In agentic retrieval, a large language model (LLM) is used twice. First, it's used to create a query plan. After the query plan is executed and search results are generated, those results are passed to the LLM again, this time as grounding data that's used to formulate an answer.
154
152
155
-
LLMs consume and emit tokenized strings of human readable plain text content. For this reason, you must have `searchable` fields that provide plain text strings, and are `retrievable` in the response. Vector fields and vector search are also important because they add similarity search to information retrieval. Vectors enhance and improve the quality of search, but aren't otherwise strictly required. Azure AI Search has built-in capabilities that [simplify and automate vectorization](vector-search-overview.md).
153
+
LLMs consume and emit tokenized strings of human readable plain text content. For this reason, you must have `searchable` fields that provide plain text strings, and are `retrievable` in the response. Vector fields and vector search are also important because they add similarity search to information retrieval. Vectors enhance and improve the quality of search that produces grounding data, but aren't otherwise strictly required. Azure AI Search has built-in capabilities that [simplify and automate vectorization](vector-search-overview.md).
156
154
157
155
The previous example index includes a vector field that's used at query time. You don't need the vector in results because it isn't human or LLM readable, but notice that its `searchable` for vector search. Since you don't need vectors in the response, both `retrievable` and `stored` are false.
158
156
159
-
The vectorizer defined in the vector search configuration is critical. It determines whether your vector field is used during query execution. The vectorizer encodes subqueries into vectors at query time for similarity search over the vectors. The vectorizer must be the same embedding model used to create the vectors in the index.
157
+
The vectorizer defined in the vector search configuration is critical. It determines whether your vector field is used during query execution. The vectorizer encodes string subqueries into vectors at query time for similarity search over the vectors. The vectorizer must be the same embedding model used to create the vectors in the index.
160
158
161
159
All `searchable` fields are included in query execution. There's no support for a `select` statement that explicitly states which fields to query.
162
160
163
-
<!--
164
-
> [!div class="checklist"]
165
-
> + A fields collection with `searchable` text and vetor fields, and `retrievable` text fields
166
-
> + Vector fields that are queried are fields having a vectorizer
167
-
> + Fields selected in the response string are semantic fields (title, terms, content)
168
-
> + Fields in reference source data are all `retrievable` fields, assuming reference source data is true -->
169
-
170
161
## Add a description
171
162
172
163
An index `description` field is a user-defined string that you can use to provide guidance to LLMs and Model Context Protocol (MCP) servers when deciding to use a specific index for a query. This human-readable text is invaluable when a system must access several indexes and make a decision based on the description.
A knowledge source wraps a search index with extra properties for agentic retrieval. It's a required definition in a knowledge agent. We provide guidance on how to create specific knowledge sources, but generally, you can:
16
18
17
19
+ Create multiple knowledge sources as top-level resources on your search service.
18
20
19
-
+ Reference one or more knowledge sources in a knowledge agent. In an agentic retrieval pipeline, it's possible to query against multiple knowledge sources in single request. Subqueries are generated for each knowledge sources. Top results are returned in the retrieval response.
21
+
+ Reference one or more knowledge sources in a knowledge agent. In an agentic retrieval pipeline, it's possible to query against multiple knowledge sources in single request. Subqueries are generated for each knowledge source. Top results are returned in the retrieval response.
20
22
21
-
Make sure you have at least one knowledge source before creating a knowledge agent. The full specification of a knowledge agent is in the [REST API reference](/rest/api/searchservice/knowledge-sources/create-or-update?view=rest-searchservice-2025-08-01-preview&preserve-view=true).
23
+
Make sure you have at least one knowledge source before creating a knowledge agent. The full specification of a knowledge source and a knowledge agent is in the [REST API reference](/rest/api/searchservice).
22
24
23
25
## Key points about a knowledge source
24
26
25
-
+ Creation path: first create knowledge source, then create knowledge agents. Deletion path: update or delete knowledge agents, delete knowledge sources last.
27
+
+ Creation path: first create a knowledge source, then create a knowledge agent. Deletion path: update or delete knowledge agents, delete knowledge sources last.
26
28
27
29
+ A knowledge source, its index, and the knowledge agent must all exist on the same search service.
28
30
@@ -53,15 +55,15 @@ When you have multiple knowledge sources, set the following properties to bias q
53
55
+ Setting `alwaysQuerySource` forces query planning to always include the knowledge source.
54
56
+ Setting `retrievalInstructions` provides guidance that includes or excludes a knowledge source.
55
57
56
-
Retrieval instructions are sent as a prompt to the large language model (LLM) used for query planning. This prompt is helpful when you have multiple knowledge sources and want to provide guidance on when to use each one. For example, if you have separate indexes for product information, job postings, and technical support, the retrieval instructions might say "use the jobs index only if the question is about a job application."
58
+
Retrieval instructions are sent as a user-defined prompt to the large language model (LLM) used for query planning. This prompt is helpful when you have multiple knowledge sources and want to provide guidance on when to use each one. For example, if you have separate indexes for product information, job postings, and technical support, the retrieval instructions might say "use the jobs index only if the question is about a job application."
57
59
58
60
The `alwaysQuerySource` property overrides `retrievalInstructions`. You should set `alwaysQuerySource` to false when providing retrieval instructions.
59
61
60
62
### Attempt fast path processing
61
63
62
64
Fast path is opportunistic query processing that approaches the millisecond query performance of regular search. If you enable it, the search engine attempts fast path under the following conditions:
63
65
64
-
+`attemptFastPath` is set to true in `knowledgeSourceReferences`.
66
+
+`attemptFastPath` is set to true in `outputConfiguration`.
65
67
66
68
+ The query input is a single message that's fewer than 512 characters.
67
69
@@ -75,13 +77,19 @@ Under fast path, `retrievalInstructions` are ignored. In general, `alwaysQuerySo
75
77
76
78
To achieve the fastest possible response times, follow these best practices:
77
79
78
-
+ Set `modality` to `answerSynthesis` to get a response framed as an LLM-formulated answer. It takes a few extra seconds, but it improves the quality of the response and saves time overall if the answer is usable without further LLM processing.
80
+
1. In the knowledge agent:
81
+
82
+
+ Set `outputConfiguration.attemptFastPath` to true.
83
+
84
+
+ Set `outputConfiguration.modality` to `answerSynthesis` to get a response framed as an LLM-formulated answer. It takes a few extra seconds, but it improves the quality of the response and saves time overall if the answer is usable without further LLM processing.
85
+
86
+
+ Retain `outputConfiguration.includeActivity` set to true (default setting) for insights about query execution and elapsed time.
79
87
80
-
+ Retain `includeActivity` set to true (default setting) for insights about query execution and elapsed time.
88
+
+ Retain `knowledgeSource.includeReferences` set to true (default setting) for details about each individually scored result.
81
89
82
-
+ Retain `includeReferences` set to true (default setting) for details about each individually scored result.
90
+
+ Set `knowledgeSource.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.
83
91
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.
92
+
1. In the [retrieve action](search-agentic-retrieval-how-to-retrieve.md), provide a query that's fewer than 512 characters.
0 commit comments