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
This repository includes an optional feature that uses agentic retrieval to find the most relevant content given a user's conversation history.
3
+
This repository includes an optional feature that uses [agentic retrieval from Azure AI Search](https://learn.microsoft.com/azure/search/search-agentic-retrieval-concept)to find the most relevant content given a user's conversation history. The agentic retrieval feature uses a LLM to analyze the conversation and generate multiple search queries to find relevant content. This can improve the quality of the responses, especially for complex or multi-faceted questions.
4
4
5
-
## Using the feature
6
-
7
-
### Supported Models
8
-
9
-
See the agentic retrieval documentation.
10
-
11
-
### Prerequisites
12
-
13
-
* A deployment of any of the supported agentic retrieval models in the [supported regions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability). If you're not sure, try to create a gpt-4.1-mini deployment from your Azure OpenAI deployments page.
14
-
15
-
### Deployment
5
+
## Deployment
16
6
17
7
1.**Enable agentic retrieval:**
18
8
19
-
Set the environment variables for your Azure OpenAI GPT deployments to your reasoning model
9
+
Set the azd environment variable to enable the agentic retrieval feature:
20
10
21
11
```shell
22
12
azd env set USE_AGENTIC_RETRIEVAL true
23
13
```
24
14
25
-
2.**(Optional) Set the agentic retrieval model**
15
+
2.**(Optional) Customize the agentic retrieval model**
26
16
27
17
You can configure which model agentic retrieval uses. By default, gpt-4.1-mini is used.
28
18
@@ -34,17 +24,19 @@ See the agentic retrieval documentation.
34
24
azd env set AZURE_OPENAI_SEARCHAGENT_MODEL_VERSION 2025-04-14
35
25
```
36
26
27
+
You can only change it to one of the [supported models](https://learn.microsoft.com/azure/search/search-agentic-retrieval-how-to-create#supported-models).
28
+
37
29
3.**Update the infrastructure and application:**
38
30
39
-
Execute `azd up` to provision the infrastructure changes (only the new model, if you ran `up` previously) and deploy the application code with the updated environment variables.
31
+
Execute `azd up` to provision the infrastructure changes (only the new model, if you ran `up` previously) and deploy the application code with the updated environment variables. The post-provision script will configure Azure AI Search with a Knowledge agent pointing at the search index.
40
32
41
33
4.**Try out the feature:**
42
34
43
35
Open the web app and start a new chat. Agentic retrieval will be used to find all sources.
44
36
45
37
5.**Review the query plan**
46
38
47
-
Agentic retrieval use additional billed tokens behind the scenes for the planning process.
39
+
Agentic retrieval uses additional billed tokens behind the scenes for the planning process.
48
40
To see the token usage, select the lightbulb icon on a chat answer. This will open the "Thought process" tab, which shows the amount of tokens used by and the queries produced by the planning process
49
41
50
42

0 commit comments