Skip to content

Commit 2b21883

Browse files
committed
Updated AR code samples to use GPT-5-mini
1 parent 2dfab49 commit 2b21883

10 files changed

+42
-42
lines changed

articles/search/includes/quickstarts/agentic-retrieval-csharp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ To create and run the agentic retrieval pipeline:
113113
114114
string aoaiEmbeddingModel = "text-embedding-3-large";
115115
string aoaiEmbeddingDeployment = "text-embedding-3-large";
116-
string aoaiGptModel = "gpt-4.1-mini";
117-
string aoaiGptDeployment = "gpt-4.1-mini";
116+
string aoaiGptModel = "gpt-5-mini";
117+
string aoaiGptDeployment = "gpt-5-mini";
118118
119119
string indexName = "earth-at-night";
120120
string knowledgeSourceName = "earth-knowledge-source";
@@ -723,7 +723,7 @@ Console.WriteLine($"Knowledge source '{knowledgeSourceName}' created or updated
723723

724724
### Create a knowledge agent
725725

726-
To target `earth-knowledge-source` and your `gpt-4.1-mini` deployment at query time, you need a knowledge agent. Add and run a code cell with the following code to define a knowledge agent named `earth-knowledge-agent`, which you previously specified using the `knowledgeAgentName` variable.
726+
To target `earth-knowledge-source` and your `gpt-5-mini` deployment at query time, you need a knowledge agent. Add and run a code cell with the following code to define a knowledge agent named `earth-knowledge-agent`, which you previously specified using the `knowledgeAgentName` variable.
727727

728728
`RerankerThreshold` ensures semantic relevance by excluding responses with a reranker score of `2.5` or lower. Meanwhile, `Modality` is set to `AnswerSynthesis`, enabling natural-language answers that cite the retrieved documents.
729729

@@ -832,7 +832,7 @@ The following code displays the response, activity, and results of the retrieval
832832

833833
+ `Response` provides a synthesized, LLM-generated answer to the query that cites the retrieved documents. When answer synthesis isn't enabled, this section contains content extracted directly from the documents.
834834

835-
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
835+
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
836836

837837
+ `Results` lists the documents that contributed to the response, each one identified by their `DocKey`.
838838

articles/search/includes/quickstarts/agentic-retrieval-java.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The sample in this quickstart works with the Java Runtime. Install a Java Develo
117117

118118
```plaintext
119119
AZURE_OPENAI_ENDPOINT=https://<your-ai-foundry-resource-name>.openai.azure.com/
120-
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-4.1-mini
120+
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-5-mini
121121
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-3-large
122122
AZURE_SEARCH_ENDPOINT=https://<your-search-service-name>.search.windows.net
123123
AZURE_SEARCH_INDEX_NAME=agentic-retrieval-sample
@@ -167,7 +167,7 @@ The sample in this quickstart works with the Java Runtime. Install a Java Develo
167167
private static final String SEARCH_ENDPOINT;
168168
private static final String AZURE_OPENAI_ENDPOINT;
169169
private static final String AZURE_OPENAI_GPT_DEPLOYMENT;
170-
private static final String AZURE_OPENAI_GPT_MODEL = "gpt-4.1-mini";
170+
private static final String AZURE_OPENAI_GPT_MODEL = "gpt-5-mini";
171171
private static final String AZURE_OPENAI_EMBEDDING_DEPLOYMENT;
172172
private static final String AZURE_OPENAI_EMBEDDING_MODEL = "text-embedding-3-large";
173173
private static final String INDEX_NAME = "earth_at_night";
@@ -182,7 +182,7 @@ The sample in this quickstart works with the Java Runtime. Install a Java Develo
182182
"https://contoso-agentic-search-service.search.windows.net");
183183
AZURE_OPENAI_ENDPOINT = getEnvVar(dotenv, "AZURE_OPENAI_ENDPOINT",
184184
"https://contoso-proj-agentic-foundry-res.openai.azure.com/");
185-
AZURE_OPENAI_GPT_DEPLOYMENT = getEnvVar(dotenv, "AZURE_OPENAI_GPT_DEPLOYMENT", "gpt-4.1-mini");
185+
AZURE_OPENAI_GPT_DEPLOYMENT = getEnvVar(dotenv, "AZURE_OPENAI_GPT_DEPLOYMENT", "gpt-5-mini");
186186
AZURE_OPENAI_EMBEDDING_DEPLOYMENT = getEnvVar(dotenv, "AZURE_OPENAI_EMBEDDING_DEPLOYMENT", "text-embedding-3-large");
187187
}
188188
@@ -1150,7 +1150,7 @@ try {
11501150
11511151
### Create a knowledge agent
11521152
1153-
To connect Azure AI Search to your `gpt-4.1-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
1153+
To connect Azure AI Search to your `gpt-5-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
11541154
11551155
To ensure relevant and semantically meaningful responses, `defaultRerankerThreshold` is set to exclude responses with a reranker score of `2.5` or lower.
11561156
@@ -1324,13 +1324,13 @@ The output should include:
13241324
13251325
+ `Response` provides a text string of the most relevant documents (or chunks) in the search index based on the user query. As shown later in this quickstart, you can pass this string to an LLM for answer generation.
13261326
1327-
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for query planning and execution.
1327+
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for query planning and execution.
13281328
13291329
+ `Results` lists the documents that contributed to the response, each one identified by their `DocKey`.
13301330
13311331
### Create the Azure OpenAI client
13321332
1333-
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-4.1-mini` deployment.
1333+
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-5-mini` deployment.
13341334
13351335
```java
13361336
OpenAIAsyncClient openAIClient = new OpenAIClientBuilder()

articles/search/includes/quickstarts/agentic-retrieval-javascript.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Although you can provide your own data, this quickstart uses [sample JSON docume
7171

7272
```plaintext
7373
AZURE_OPENAI_ENDPOINT=https://<your-ai-foundry-resource-name>.openai.azure.com/
74-
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-4.1-mini
74+
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-5-mini
7575
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-3-large
7676
AZURE_SEARCH_ENDPOINT=https://<your-search-service-name>.search.windows.net
7777
AZURE_SEARCH_INDEX_NAME=agentic-retrieval-sample
@@ -92,8 +92,8 @@ Although you can provide your own data, this quickstart uses [sample JSON docume
9292
const config = {
9393
searchEndpoint: process.env.AZURE_SEARCH_ENDPOINT || "https://your-search-service.search.windows.net",
9494
azureOpenAIEndpoint: process.env.AZURE_OPENAI_ENDPOINT || "https://your-ai-foundry-resource.openai.azure.com/",
95-
azureOpenAIGptDeployment: process.env.AZURE_OPENAI_GPT_DEPLOYMENT || "gpt-4.1-mini",
96-
azureOpenAIGptModel: "gpt-4.1-mini",
95+
azureOpenAIGptDeployment: process.env.AZURE_OPENAI_GPT_DEPLOYMENT || "gpt-5-mini",
96+
azureOpenAIGptModel: "gpt-5-mini",
9797
azureOpenAIApiVersion: process.env.OPENAI_API_VERSION || "2025-03-01-preview",
9898
azureOpenAIEmbeddingDeployment: process.env.AZURE_OPENAI_EMBEDDING_DEPLOYMENT || "text-embedding-3-large",
9999
azureOpenAIEmbeddingModel: "text-embedding-3-large",
@@ -878,7 +878,7 @@ try {
878878
879879
### Create a knowledge agent
880880
881-
To connect Azure AI Search to your `gpt-4.1-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
881+
To connect Azure AI Search to your `gpt-5-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
882882
883883
To ensure relevant and semantically meaningful responses, `defaultRerankerThreshold` is set to exclude responses with a reranker score of `2.5` or lower.
884884
@@ -1011,13 +1011,13 @@ The output should include:
10111011
10121012
+ `Response` provides a text string of the most relevant documents (or chunks) in the search index based on the user query. As shown later in this quickstart, you can pass this string to an LLM for answer generation.
10131013
1014-
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for query planning and execution.
1014+
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for query planning and execution.
10151015
10161016
+ `Results` lists the documents that contributed to the response, each one identified by their `DocKey`.
10171017
10181018
### Create the Azure OpenAI client
10191019
1020-
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-4.1-mini` deployment.
1020+
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-5-mini` deployment.
10211021
10221022
```javascript
10231023
const scope = "https://cognitiveservices.azure.com/.default";

articles/search/includes/quickstarts/agentic-retrieval-python.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ To install the packages and load the connections:
8181
aoai_endpoint = "PUT-YOUR-AOAI-FOUNDRY-URL-HERE"
8282
aoai_embedding_model = "text-embedding-3-large"
8383
aoai_embedding_deployment = "text-embedding-3-large"
84-
aoai_gpt_model = "gpt-4.1-mini"
85-
aoai_gpt_deployment = "gpt-4.1-mini"
84+
aoai_gpt_model = "gpt-5-mini"
85+
aoai_gpt_deployment = "gpt-5-mini"
8686
index_name = "earth-at-night"
8787
knowledge_source_name = "earth-knowledge-source"
8888
knowledge_agent_name = "earth-knowledge-agent"
@@ -191,7 +191,7 @@ print(f"Knowledge source '{knowledge_source_name}' created or updated successful
191191

192192
## Create a knowledge agent
193193

194-
To target `earth-knowledge-source` and your `gpt-4.1-mini` deployment at query time, you need a knowledge agent. Add and run a code cell with the following code to define a knowledge agent named `earth-knowledge-agent`, which you previously specified using the `knowledge_agent_name` variable.
194+
To target `earth-knowledge-source` and your `gpt-5-mini` deployment at query time, you need a knowledge agent. Add and run a code cell with the following code to define a knowledge agent named `earth-knowledge-agent`, which you previously specified using the `knowledge_agent_name` variable.
195195

196196
`reranker_threshold` ensures semantic relevance by excluding responses with a reranker score of `2.5` or lower. Meanwhile, `modality` is set to `ANSWER_SYNTHESIS`, enabling natural-language answers that cite the retrieved documents.
197197

@@ -315,7 +315,7 @@ The output should be similar to the following example, where:
315315

316316
+ `Response` provides a synthesized, LLM-generated answer to the query that cites the retrieved documents. When answer synthesis isn't enabled, this section contains content extracted directly from the documents.
317317

318-
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
318+
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
319319

320320
+ `Results` lists the documents that contributed to the response, each one identified by their `doc_key`.
321321

articles/search/includes/quickstarts/agentic-retrieval-rest.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ To load the connections:
7070
@aoai-url = PUT-YOUR-AOAI-FOUNDRY-URL-HERE
7171
@aoai-embedding-model = text-embedding-3-large
7272
@aoai-embedding-deployment = text-embedding-3-large
73-
@aoai-gpt-model = gpt-4.1-mini
74-
@aoai-gpt-deployment = gpt-4.1-mini
73+
@aoai-gpt-model = gpt-5-mini
74+
@aoai-gpt-deployment = gpt-5-mini
7575
@index-name = earth-at-night
7676
@knowledge-source-name = earth-knowledge-source
7777
@knowledge-agent-name = earth-knowledge-agent
@@ -232,7 +232,7 @@ POST {{search-url}}/knowledgesources?api-version={{api-version}} HTTP/1.1
232232

233233
## Create a knowledge agent
234234

235-
To target your `earth-knowledge-source` and `gpt-4.1-mini` deployment at query time, you need a knowledge agent. Use [Knowledge Agents - Create (REST API)](/rest/api/searchservice/knowledge-agents/create?view=rest-searchservice-2025-08-01-preview&preserve-view=true) to define an agent named `earth-knowledge-agent`, which you previously specified using the `@knowledge-agent-name` variable.
235+
To target your `earth-knowledge-source` and `gpt-5-mini` deployment at query time, you need a knowledge agent. Use [Knowledge Agents - Create (REST API)](/rest/api/searchservice/knowledge-agents/create?view=rest-searchservice-2025-08-01-preview&preserve-view=true) to define an agent named `earth-knowledge-agent`, which you previously specified using the `@knowledge-agent-name` variable.
236236

237237
`knowledgeSources.rerankerThreshold` ensures semantic relevance by excluding responses with a reranker score of `2.5` or lower. Meanwhile, `outputConfiguration.modality` is set to `answerSynthesis`, enabling natural-language answers that cite the retrieved documents.
238238

@@ -301,7 +301,7 @@ The output should be similar to the following JSON, where:
301301

302302
+ `response` provides a synthesized, LLM-generated answer to the query that cites the retrieved documents. When answer synthesis isn't enabled, this section contains content extracted directly from the documents.
303303

304-
+ `activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
304+
+ `activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for semantic ranking, query planning, and answer synthesis.
305305

306306
+ `references` lists the documents that contributed to the response, each one identified by their `docKey`.
307307

articles/search/includes/quickstarts/agentic-retrieval-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ To use agentic retrieval, you must deploy two Azure OpenAI models to your Azure
8585

8686
+ An embedding model for text-to-vector conversion. This quickstart uses `text-embedding-3-large`, but you can use any embedding model that supports the `text-embedding` task.
8787

88-
+ A [supported chat completion model](../../search-agentic-retrieval-how-to-create.md#supported-models) for query planning and answer generation. This quickstart uses `gpt-4.1-mini`. Optionally, you can use one model for query planning and another model for answer generation, but this quickstart uses the same model for simplicity.
88+
+ A [supported chat completion model](../../search-agentic-retrieval-how-to-create.md#supported-models) for query planning and answer generation. This quickstart uses `gpt-5-mini`. Optionally, you can use one model for query planning and another model for answer generation, but this quickstart uses the same model for simplicity.
8989

9090
To deploy the Azure OpenAI models:
9191

@@ -101,4 +101,4 @@ To deploy the Azure OpenAI models:
101101

102102
1. Select **Deploy**.
103103

104-
1. Repeat the previous steps, but this time, deploy **gpt-4.1-mini** from the model catalog.
104+
1. Repeat the previous steps, but this time, deploy **gpt-5-mini** from the model catalog.

articles/search/includes/quickstarts/agentic-retrieval-typescript.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Although you can provide your own data, this quickstart uses [sample JSON docume
7777

7878
```plaintext
7979
AZURE_OPENAI_ENDPOINT=https://<your-ai-foundry-resource-name>.openai.azure.com/
80-
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-4.1-mini
80+
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-5-mini
8181
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-3-large
8282
AZURE_SEARCH_ENDPOINT=https://<your-search-service-name>.search.windows.net
8383
AZURE_SEARCH_INDEX_NAME=agentic-retrieval-sample
@@ -114,8 +114,8 @@ Although you can provide your own data, this quickstart uses [sample JSON docume
114114
const config = {
115115
searchEndpoint: process.env.AZURE_SEARCH_ENDPOINT || "https://your-search-service.search.windows.net",
116116
azureOpenAIEndpoint: process.env.AZURE_OPENAI_ENDPOINT || "https://your-ai-foundry-resource.openai.azure.com/",
117-
azureOpenAIGptDeployment: process.env.AZURE_OPENAI_GPT_DEPLOYMENT || "gpt-4.1-mini",
118-
azureOpenAIGptModel: "gpt-4.1-mini",
117+
azureOpenAIGptDeployment: process.env.AZURE_OPENAI_GPT_DEPLOYMENT || "gpt-5-mini",
118+
azureOpenAIGptModel: "gpt-5-mini",
119119
azureOpenAIApiVersion: process.env.OPENAI_API_VERSION || "2025-03-01-preview",
120120
azureOpenAIEmbeddingDeployment: process.env.AZURE_OPENAI_EMBEDDING_DEPLOYMENT || "text-embedding-3-large",
121121
azureOpenAIEmbeddingModel: "text-embedding-3-large",
@@ -1079,7 +1079,7 @@ try {
10791079
10801080
### Create a knowledge agent
10811081
1082-
To connect Azure AI Search to your `gpt-4.1-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
1082+
To connect Azure AI Search to your `gpt-5-mini` deployment and target the `earth_at_night` index at query time, you need a knowledge agent. The following code defines a knowledge agent named `earth-search-agent` that uses the agent definition to process queries and retrieve relevant documents from the `earth_at_night` index.
10831083
10841084
To ensure relevant and semantically meaningful responses, `defaultRerankerThreshold` is set to exclude responses with a reranker score of `2.5` or lower.
10851085
@@ -1220,13 +1220,13 @@ The output should include:
12201220
12211221
+ `Response` provides a text string of the most relevant documents (or chunks) in the search index based on the user query. As shown later in this quickstart, you can pass this string to an LLM for answer generation.
12221222
1223-
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-4.1-mini` deployment and the tokens used for query planning and execution.
1223+
+ `Activity` tracks the steps that were taken during the retrieval process, including the subqueries generated by your `gpt-5-mini` deployment and the tokens used for query planning and execution.
12241224
12251225
+ `Results` lists the documents that contributed to the response, each one identified by their `DocKey`.
12261226
12271227
### Create the Azure OpenAI client
12281228
1229-
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-4.1-mini` deployment.
1229+
To extend the retrieval pipeline from answer *extraction* to answer *generation*, set up the Azure OpenAI client to interact with your `gpt-5-mini` deployment.
12301230
12311231
```typescript
12321232
const scope = "https://cognitiveservices.azure.com/.default";

0 commit comments

Comments
 (0)