Skip to content

Commit 3ab2fcf

Browse files
Merge pull request #4795 from haileytap/release-build-azure-search
[Azure Search] Update variable names in AR quickstart
2 parents db13e88 + 6bd74fe commit 3ab2fcf

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: haileytap
44
ms.author: haileytapia
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 05/08/2025
7+
ms.date: 05/12/2025
88
---
99

1010
[!INCLUDE [Feature preview](../previews/preview-generic.md)]
@@ -152,7 +152,7 @@ To install the packages and load the connections:
152152

153153
## Create a search index
154154

155-
In Azure AI Search, an index is a structured collection of data. The following code defines an index named `earth-at-night`, which you specified using the `index_name` variable in the previous section.
155+
In Azure AI Search, an index is a structured collection of data. The following code defines an index named `earth_at_night`, which you specified using the `index_name` variable in the previous section.
156156

157157
```Python
158158
from azure.search.documents.indexes.models import SearchIndex, SearchField, VectorSearch, VectorSearchProfile, HnswAlgorithmConfiguration, AzureOpenAIVectorizer, AzureOpenAIVectorizerParameters, SemanticSearch, SemanticConfiguration, SemanticPrioritizedFields, SemanticField
@@ -212,7 +212,7 @@ The index schema contains fields for document identification and page content, e
212212

213213
## Upload documents to the index
214214

215-
Currently, the `earth-at-night` index is empty. Run the following code to populate the index with JSON documents from NASA's Earth at Night e-book. As required by Azure AI Search, each document conforms to the fields and data types defined in the index schema.
215+
Currently, the `earth_at_night` index is empty. Run the following code to populate the index with JSON documents from NASA's Earth at Night e-book. As required by Azure AI Search, each document conforms to the fields and data types defined in the index schema.
216216

217217
```Python
218218
from azure.search.documents import SearchIndexingBufferedSender
@@ -229,7 +229,7 @@ print(f"Documents uploaded to index '{index_name}'")
229229

230230
## Create a search agent
231231

232-
To connect Azure AI Search to your `gpt-4o-mini` deployment and target the `earth-at-night` index at query time, you need a search agent. The following code defines an agent named `earth-search-agent`, which you specified using the `agent_name` variable in a previous section.
232+
To connect Azure AI Search to your `gpt-4o-mini` deployment and target the `earth_at_night` index at query time, you need a search agent. The following code defines an agent named `earth-search-agent`, which you specified using the `agent_name` variable in a previous section.
233233

234234
To ensure relevant and semantically meaningful responses, `default_reranker_threshold` is set to exclude responses with a reranker score of `2.5` or lower.
235235

@@ -284,7 +284,7 @@ messages = [
284284

285285
You're ready to initiate the agentic retrieval pipeline. The input for this pipeline is the `messages` array, whose conversation history includes the instructions you previously provided and user queries. Additionally, `target_index_params` specifies the index to query and other configurations, such as the semantic ranker threshold.
286286

287-
The following code sends a two-part user query to `earth-search-agent`, which deconstructs the query into subqueries, runs the subqueries against both text fields and vector embeddings in the `earth-at-night` index, and ranks and merges the results. The response is then appended to the `messages` array.
287+
The following code sends a two-part user query to `earth-search-agent`, which deconstructs the query into subqueries, runs the subqueries against both text fields and vector embeddings in the `earth_at_night` index, and ranks and merges the results. The response is then appended to the `messages` array.
288288

289289
```Python
290290
from azure.search.documents.agent import KnowledgeAgentRetrievalClient
@@ -446,7 +446,7 @@ Suburban belts tend to display larger December brightening than urban cores, des
446446

447447
## Continue the conversation
448448

449-
Continue the conversation by sending another user query to `earth-search-agent`. The following code reruns the retrieval pipeline, fetching relevant content from the `earth-at-night` index and appending the response to the `messages` array. However, unlike before, you can now use the Azure OpenAI client to generate an answer based on the retrieved content.
449+
Continue the conversation by sending another user query to `earth-search-agent`. The following code reruns the retrieval pipeline, fetching relevant content from the `earth_at_night` index and appending the response to the `messages` array. However, unlike before, you can now use the Azure OpenAI client to generate an answer based on the retrieved content.
450450

451451
```Python
452452
messages.append({

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: haileytap
44
ms.author: haileytapia
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 05/08/2025
7+
ms.date: 05/12/2025
88
---
99

1010
[!INCLUDE [Feature preview](../previews/preview-generic.md)]
@@ -36,7 +36,7 @@ To run agentic retrieval, you must deploy three models to your Azure OpenAI reso
3636

3737
+ (Optional) An embedding model for vector queries.
3838

39-
Agentic retrieval [supports several models](../../search-agentic-retrieval-how-to-create.md#supported-models), but this quickstart assumes `gpt-4o-mini` for the query-planning LLM and `text-embedding-3-large` for the embedding model. To use the answer-generating LLM, which is excluded from the REST version of this quickstart, see the Python version.
39+
Agentic retrieval [supports several models](../../search-agentic-retrieval-how-to-create.md#supported-models), but this quickstart assumes `gpt-4o-mini` for the query-planning LLM and `text-embedding-3-large` for the embedding model. To use the answer-generating LLM, see the Python version of this quickstart.
4040

4141
To deploy the Azure OpenAI models:
4242

@@ -157,7 +157,7 @@ To load the connections:
157157
158158
## Create a search index
159159
160-
In Azure AI Search, an index is a structured collection of data. Use [Create Index](/rest/api/searchservice/indexes/create) to define an index named `earth-at-night`, which you specified using the `@index-name` variable in the previous section.
160+
In Azure AI Search, an index is a structured collection of data. Use [Create Index](/rest/api/searchservice/indexes/create) to define an index named `earth_at_night`, which you specified using the `@index-name` variable in the previous section.
161161
162162
```HTTP
163163
### Create an index
@@ -247,7 +247,7 @@ The index schema contains fields for document identification and page content, e
247247
248248
## Upload documents to the index
249249

250-
Currently, the `earth-at-night` index is empty. Use [Index Documents](/rest/api/searchservice/documents/index) to populate the index with JSON documents from NASA's Earth at Night e-book. As required by Azure AI Search, each document conforms to the fields and data types defined in the index schema.
250+
Currently, the `earth_at_night` index is empty. Use [Index Documents](/rest/api/searchservice/documents/index) to populate the index with JSON documents from NASA's Earth at Night e-book. As required by Azure AI Search, each document conforms to the fields and data types defined in the index schema.
251251

252252
```HTTP
253253
### Load documents
@@ -281,7 +281,7 @@ POST {{baseUrl}}/indexes/{{index-name}}/docs/index?api-version={{api-version}}
281281

282282
## Create a search agent
283283

284-
To connect Azure AI Search to your `gpt-4o-mini` deployment and target the `earth-at-night` index at query time, you need a search agent. Use [Create Knowledge Agents](/rest/api/searchservice/knowledge-agents/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true) to define an agent named `earth-search-agent`, which you specified using the `@agent-name` variable in a previous section.
284+
To connect Azure AI Search to your `gpt-4o-mini` deployment and target the `earth_at_night` index at query time, you need a search agent. Use [Create Knowledge Agents](/rest/api/searchservice/knowledge-agents/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true) to define an agent named `earth-search-agent`, which you specified using the `@agent-name` variable in a previous section.
285285

286286
To ensure relevant and semantically meaningful responses, `defaultRerankerThreshold` is set to exclude responses with a reranker score of `2.5` or lower.
287287

@@ -314,7 +314,7 @@ PUT {{baseUrl}}/agents/{{agent-name}}?api-version={{api-version}} HTTP/1.1
314314

315315
## Run the retrieval pipeline
316316

317-
You're ready to initiate the agentic retrieval pipeline. Use [Knowledge Retrieval - Retrieve](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-05-01-preview&preserve-view=true) to send a two-part user query to `earth-search-agent`, which deconstructs the query into subqueries, runs the subqueries against both text fields and vector embeddings in the `earth-at-night` index, and ranks and merges the results.
317+
You're ready to initiate the agentic retrieval pipeline. Use [Knowledge Retrieval - Retrieve](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-05-01-preview&preserve-view=true) to send a two-part user query to `earth-search-agent`, which deconstructs the query into subqueries, runs the subqueries against both text fields and vector embeddings in the `earth_at_night` index, and ranks and merges the results.
318318

319319
```HTTP
320320
### Run agentic retrieval

0 commit comments

Comments
 (0)