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-rag-java.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,23 +26,23 @@ Requests to the search endpoint must be authenticated and authorized. You can us
26
26
27
27
You're setting up two clients, so you need permissions on both resources.
28
28
29
-
Azure AI Search is receiving the query request from your local system. Assign yourself the **Search Index Data Reader** role assignment if the hotels sample index already exists. If it doesn't exist, assign yourself **Search Service Contributor** and **Search Index Data Contributor** roles so that you can create and query the index.
29
+
Azure AI Search receives the query request from your local system. Assign yourself the **Search Index Data Reader** role assignment if the hotels sample index already exists. If it doesn't exist, assign yourself **Search Service Contributor** and **Search Index Data Contributor** roles so that you can create and query the index.
30
30
31
-
Azure OpenAI is receiving the query and the search results from your local system. Assign yourself the **Cognitive Services OpenAI User** role on Azure OpenAI.
31
+
Azure OpenAI receives the query and the search results from your local system. Assign yourself the **Cognitive Services OpenAI User** role on Azure OpenAI.
32
32
33
33
1. Sign in to the [Azure portal](https://portal.azure.com).
34
34
35
35
1. Configure Azure AI Search for role-based access:
36
36
37
37
1. In the Azure portal, find your Azure AI Search service.
38
38
39
-
1. On the left menu, select **Settings** > **Keys**, and then select either **Role-based access control** or **Both**.
39
+
1. On the left menu, select **Settings** > **Keys**, then select either **Role-based access control** or **Both**.
40
40
41
41
1. Assign roles:
42
42
43
43
1. On the left menu, select **Access control (IAM)**.
44
44
45
-
1. On Azure AI Search, select these roles to create, load, and query a search index, and then assign them to your Microsoft Entra ID user identity:
45
+
1. On Azure AI Search, select these roles to create, load, and query a search index, then assign them to your Microsoft Entra ID user identity:
46
46
47
47
-**Search Index Data Contributor**
48
48
-**Search Service Contributor**
@@ -55,7 +55,7 @@ It can take several minutes for permissions to take effect.
55
55
56
56
## Create an index
57
57
58
-
A search index provides grounding data for the chat model. We recommend the hotels-sample-index, which can be created in minutes and runs on any search service tier. This index is created using built-in sample data.
58
+
A search index provides grounding data for the chat model. We recommend the **hotels-sample-index**, which you can create in minutes and runs on any search service tier. This index uses built-in sample data.
59
59
60
60
1. In the Azure portal, [find your search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices).
61
61
@@ -71,7 +71,7 @@ A search index provides grounding data for the chat model. We recommend the hote
71
71
72
72
1. Select **Edit JSON**.
73
73
74
-
1. Scroll to the end of the index, where you can find placeholders for constructs that can be added to an index.
74
+
1. Scroll to the end of the index, where you find placeholders for constructs that you can add to an index.
75
75
76
76
```json
77
77
"analyzers": [],
@@ -116,7 +116,7 @@ A search index provides grounding data for the chat model. We recommend the hote
116
116
117
117
1. Run the following query in [Search Explorer](../../search-explorer.md) to test your index: `complimentary breakfast`.
118
118
119
-
Output should look similar to the following example. Results that are returned directly from the search engine consist of fields and their verbatim values, along with metadata like a search score and a semantic ranking score and caption if you use semantic ranker. We used a [select statement](../../search-query-odata-select.md) to return just the HotelName, Description, and Tags fields.
119
+
The output should look similar to the following example. Results that are returned directly from the search engine consist of fields and their verbatim values, along with metadata like a search score and a semantic ranking score and caption if you use semantic ranker. We used a [select statement](../../search-query-odata-select.md) to return just the HotelName, Description, and Tags fields.
120
120
121
121
```
122
122
{
@@ -180,7 +180,7 @@ A search index provides grounding data for the chat model. We recommend the hote
180
180
181
181
## Get service endpoints
182
182
183
-
In the remaining sections, you set up API calls to Azure OpenAI and Azure AI Search. Get the service endpoints so that you can provide them as variables in your code.
183
+
In the following sections, you set up API calls to Azure OpenAI and Azure AI Search. Get the service endpoints so that you can provide them as variables in your code.
184
184
185
185
1. Sign in to the [Azure portal](https://portal.azure.com).
You're using Microsoft Entra ID and role assignments for the connection. Make sure you're logged in to the same tenant and subscription as Azure AI Search and Azure OpenAI. You can use the Azure CLI on the command line to show current properties, change properties, and to sign in. For more information, see [Connect without keys](../../search-get-started-rbac.md).
208
+
You're using Microsoft Entra ID and role assignments for the connection. Make sure you're signed in to the same tenant and subscription as Azure AI Search and Azure OpenAI. You can use the Azure CLI on the command line to show current properties, change properties, and to sign in. For more information, see [Connect without keys](../../search-get-started-rbac.md).
209
209
210
210
Run each of the following commands in sequence.
211
211
@@ -217,7 +217,7 @@ az account set --subscription <PUT YOUR SUBSCRIPTION ID HERE>
217
217
az login --tenant <PUT YOUR TENANT ID HERE>
218
218
```
219
219
220
-
You should now be logged in to Azure from your local device.
220
+
You're now signed in to Azure from your local device.
221
221
222
222
## Set up the Java project
223
223
@@ -372,10 +372,10 @@ Create a query script that uses the Azure AI Search index and the chat model to
372
372
}
373
373
```
374
374
375
-
The preceding code does the following:
376
-
-Loads environment variables using `System.getenv`.
377
-
-ConfiguresAzureAISearch and AzureOpenAI clients using role-based authentication.
378
-
-QueriesAzureAISearchfor hotels with complimentary breakfast using semantic search.
375
+
The preceding code does the following steps:
376
+
-Loads environment variables by using `System.getenv`.
377
+
-ConfiguresAzureAISearch and AzureOpenAI clients by using role-based authentication.
378
+
-QueriesAzureAISearchfor hotels with complimentary breakfast by using semantic search.
379
379
-Sends the search results to AzureOpenAI as context for a chat completion.
380
380
-Prints the model's response.
381
381
@@ -408,7 +408,7 @@ Create a query script that uses the Azure AI Search index and the chat model to
408
408
409
409
## Troubleshooting
410
410
411
-
If you get a **Forbidden** error message, check AzureAISearch configuration to make sure role-based access is enabled.
411
+
If you get a **Forbidden** error message, check your AzureAISearch configuration to make sure you enable role-based access.
412
412
413
413
If you get an **Authorization failed** error message, wait a few minutes and try again. It can take several minutes for role assignments to become operational.
414
414
@@ -577,7 +577,7 @@ Tell me their description, address, tags, and the rate for one room that sleeps
577
577
578
578
## Troubleshooting errors
579
579
580
-
To debug AzureSDK errors, you can enable logging by adding the following dependency to your `pom.xml`:
580
+
To debug AzureSDK errors, enable logging by adding the following dependency to your `pom.xml`:
This will enable detailed logging for the Azure SDK, which can help identify [issues with authentication](https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Troubleshooting), network connectivity, or other problems.
597
+
This configuration enables detailed logging for the Azure SDK, which can help you identify [issues with authentication](https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Troubleshooting), network connectivity, or other problems.
598
598
599
-
Rerun the query script. You should now get informational statements from the SDKs in the output that provide more detail about any issues.
599
+
Rerun the query script. You should now see informational statements from the SDKs in the output that provide more detail about any issues.
600
600
601
-
If you see output messages related to ManagedIdentityCredential and token acquisition failures, it could be that you have multiple tenants, and your Azure sign-in is using a tenant that doesn't have your search service. To get your tenant ID, search the Azure portal for "tenant properties" or run `az login tenant list`.
601
+
If you see output messages related to `ManagedIdentityCredential` and token acquisition failures, it might be that you have multiple tenants, and your Azure sign-in uses a tenant that doesn't have your search service. To get your tenant ID, search the Azure portal for "tenant properties" or run `az login tenant list`.
602
602
603
-
Once you have your tenant ID, run `az login --tenant <YOUR-TENANT-ID>` at a command prompt, and then rerun the script.
603
+
After you get your tenant ID, run `az login --tenant <YOUR-TENANT-ID>` at a command prompt, then rerun the script.
604
604
605
605
## Clean up
606
606
607
-
When you're working in your own subscription, it's a good idea at the end of a project to identify whether you still need the resources you created. Resources left running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.
607
+
When you're working in your own subscription, it's a good idea at the end of a project to check if you still need the resources you created. Resources left running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.
608
608
609
609
You can find and manage resources in the Azure portal by using the **All resources** or **Resource groups** link in the leftmost pane.
0 commit comments