Skip to content

Commit 68f6a79

Browse files
committed
added troubleshooting steps
1 parent 69a6a45 commit 68f6a79

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

Quickstart-RAG/Quickstart-rag.ipynb

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
"\n",
1111
"We took a few shortcuts to keep the exercise basic and focused on query definitions:\n",
1212
"\n",
13-
"- We use the hotels-sample-index, which can be created in minutes and runs on any search service tier. This index is created by a wizard using built-in sample data.\n",
13+
"- We use the **hotels-sample-index**, which can be created in minutes and runs on any search service tier. This index is created by a wizard using built-in sample data.\n",
1414
"\n",
1515
"- We omit vectors so that we can skip chunking and embedding. The index contains plain text.\n",
1616
"\n",
17+
"A non-vector index isn't ideal for RAG patterns, but it makes for a simpler example.\n",
18+
"\n",
1719
"Once you understand the fundamentals of integrating queries from Azure AI Search to an LLM, you can build on that experience by adding vector fields and vector and hybrid queries. We recommend the [phi-chat Python code example](https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/phi-chat/phi-chat.ipynb) for that step.\n",
1820
"\n",
1921
"This example is fully documented in [Quickstart: Generative search (RAG) with grounding data from Azure AI Search](https://learn.microsoft.com/azure/search/search-get-started-rag). If you need more guidance than the readme provides, please refer to the article.\n"
@@ -54,9 +56,17 @@
5456
"\n",
5557
"This quickstart assumes the hotels-sample-index, which you can create in minutes using [this quickstart](https://learn.microsoft.com/azure/search/search-get-started-portal).\n",
5658
"\n",
57-
"Once the index exists, modify it in the Azure portal to use this semantic configuration:\n",
58-
" \n",
59-
" ```json\n",
59+
"Once the index exists, modify it in the Azure portal to use this semantic configuration:"
60+
]
61+
},
62+
{
63+
"cell_type": "raw",
64+
"metadata": {
65+
"vscode": {
66+
"languageId": "raw"
67+
}
68+
},
69+
"source": [
6070
" \"semantic\": {\n",
6171
" \"defaultConfiguration\": \"semantic-config\",\n",
6272
" \"configurations\": [\n",
@@ -69,9 +79,13 @@
6979
" { \"fieldName\": \"Category\" },\n",
7080
" { \"fieldName\": \"Tags\" }\n",
7181
" ]}\n",
72-
" }]},\n",
73-
" ```\n",
74-
"\n",
82+
" }]},"
83+
]
84+
},
85+
{
86+
"cell_type": "markdown",
87+
"metadata": {},
88+
"source": [
7589
"Now that you have your Azure resources, an index, and model in place, you can run the script to chat with the index."
7690
]
7791
},
@@ -83,7 +97,7 @@
8397
"\n",
8498
"Create a virtual environment so that you can install the dependencies in isolation.\n",
8599
"\n",
86-
"1. In Visual Studio Code, open the folder containing quickstart-rag.ipynb.\n",
100+
"1. In Visual Studio Code, open the folder containing Quickstart-RAG.ipynb.\n",
87101
"\n",
88102
"1. Press Ctrl-shift-P to open the command palette, search for \"Python: Create Environment\", and then select `Venv` to create a virtual environment in the current workspace.\n",
89103
"\n",
@@ -130,23 +144,9 @@
130144
},
131145
{
132146
"cell_type": "code",
133-
"execution_count": 5,
147+
"execution_count": null,
134148
"metadata": {},
135-
"outputs": [
136-
{
137-
"name": "stdout",
138-
"output_type": "stream",
139-
"text": [
140-
"Sure, here are a few hotels that match your criteria: \n",
141-
"\n",
142-
"- Ocean Air Motel, which is an oceanfront hotel with beach access, private balconies, indoor and outdoor pools, shops, and art entertainment nearby.\n",
143-
"- Marquis Plaza & Suites, which offers ocean views, free Wi-Fi, a full kitchen, and free breakfast buffet, along with beach access and a pool.\n",
144-
"- Oceanside Resort is a new luxury hotel with bay views from every room, a rooftop pool, waterfront dining, and laundry service. \n",
145-
"\n",
146-
"Unfortunately, the Double Sanctuary Resort and Triple Landscape Hotel don't have beach access or mention views.\n"
147-
]
148-
}
149-
],
149+
"outputs": [],
150150
"source": [
151151
"# Set up the query for generating responses\n",
152152
"from azure.identity import DefaultAzureCredential\n",
@@ -208,7 +208,15 @@
208208
"cell_type": "markdown",
209209
"metadata": {},
210210
"source": [
211-
"If you get an authorization error instead of results, wait a few minutes and try again. It can take several minutes for role assignments to become operational."
211+
"If you get an authorization error instead of results:\n",
212+
"\n",
213+
"+ If you just enabled role assignments, wait a few minutes and try again. It can take several minutes for role assignments to become operational.\n",
214+
"\n",
215+
"+ Make sure you [enabled RBAC](https://learn.microsoft.com/azure/search/search-security-enable-roles?tabs=config-svc-portal%2Cdisable-keys-portal) on Azure AI Search. An HttpStatusMessage of **Forbidden** is an indicator that RBAC isn't enabled.\n",
216+
"\n",
217+
"+ Recheck role assignments for yourself and for the search service system identity.\n",
218+
"\n",
219+
"+ Check firewall settings. This quickstart assumes public network access. If you have a firewall, you need to add rules to allow inbound requests from your device and for service-to-service connections."
212220
]
213221
}
214222
],

0 commit comments

Comments
 (0)