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
fix: em dash spacing + Bicep param validation (round 3)
- Remove spaces around 13 em dashes in README per Microsoft Learn standards
- Add @minlength(36)/@maxlength(36) to deploymentUserPrincipalId in main.bicep
to catch missing AZURE_PRINCIPAL_ID early with clear validation error
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: samples/features/vector-search/infra/main.bicep
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ param environmentName string
26
26
})
27
27
paramlocationstring
28
28
29
-
@description('Id of the principal to assign database and application roles.')
29
+
@description('Object ID of the principal to assign database and application roles. Required — must be set via AZURE_PRINCIPAL_ID. Expected as UUID (36 characters).')
30
+
@minLength(36)
31
+
@maxLength(36)
30
32
paramdeploymentUserPrincipalIdstring = ''
31
33
32
34
@description('Client IP address for SQL firewall rule (for local development).')
> DiskANN index creation requires at least **1,000 rows** with non-null vectors. The 50-hotel sample dataset is too small — load a larger dataset before using `VECTOR_SEARCH_ALGORITHM=diskann`.
35
+
> DiskANN index creation requires at least **1,000 rows** with non-null vectors. The 50-hotel sample dataset is too small—load a larger dataset before using `VECTOR_SEARCH_ALGORITHM=diskann`.
36
36
37
37
## Prerequisites
38
38
39
-
-**Azure subscription** — [Create one free](https://azure.microsoft.com/free/)
40
-
-**Azure SQL Database** with native vector support — [Quickstart: Create a single database](https://learn.microsoft.com/azure/azure-sql/database/single-database-create-quickstart)
41
-
-**Azure OpenAI resource** with a `text-embedding-3-small` deployment — [Create and deploy an Azure OpenAI Service resource](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource)
-**Azure CLI** — [Install the Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli), signed in with `az login`
39
+
-**Azure subscription**—[Create one free](https://azure.microsoft.com/free/)
40
+
-**Azure SQL Database** with native vector support—[Quickstart: Create a single database](https://learn.microsoft.com/azure/azure-sql/database/single-database-create-quickstart)
41
+
-**Azure OpenAI resource** with a `text-embedding-3-small` deployment—[Create and deploy an Azure OpenAI Service resource](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource)
-**Azure CLI**—[Install the Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli), signed in with `az login`
44
44
45
45
> [!IMPORTANT]
46
46
> Your Azure identity must be configured as a **Microsoft Entra admin** on the Azure SQL server. The `azd up` deployment sets this automatically using `deploymentUserPrincipalId`. For the Azure OpenAI resource, you need the **Cognitive Services OpenAI User** role.
**Exact search (default)** — The `VECTOR_DISTANCE()` function computes cosine distance between the query vector and all stored embeddings:
223
+
**Exact search (default)**—The `VECTOR_DISTANCE()` function computes cosine distance between the query vector and all stored embeddings:
224
224
225
225
```sql
226
226
SELECT TOP 3
@@ -230,7 +230,7 @@ FROM dbo.hotels_typescript
230
230
ORDER BY distance;
231
231
```
232
232
233
-
**Approximate search (DiskANN)** — The `VECTOR_SEARCH()` function uses a DiskANN index for 10–100× faster queries on large datasets:
233
+
**Approximate search (DiskANN)**—The `VECTOR_SEARCH()` function uses a DiskANN index for 10–100× faster queries on large datasets:
234
234
235
235
```sql
236
236
SELECT TOP 3
@@ -275,13 +275,13 @@ To avoid ongoing charges, delete the Azure resources you created if they were on
275
275
276
276
### Authentication failures
277
277
278
-
**"Login failed"** — Ensure your Azure identity is set as Microsoft Entra admin on the SQL server. Run `az login` to refresh your credentials.
278
+
**"Login failed"**—Ensure your Azure identity is set as Microsoft Entra admin on the SQL server. Run `az login` to refresh your credentials.
279
279
280
-
**"AuthenticationError" from Azure OpenAI** — Verify you have the **Cognitive Services OpenAI User** role on the Azure OpenAI resource. Check the endpoint URL and deployment name in your `.env` file.
280
+
**"AuthenticationError" from Azure OpenAI**—Verify you have the **Cognitive Services OpenAI User** role on the Azure OpenAI resource. Check the endpoint URL and deployment name in your `.env` file.
281
281
282
282
### Firewall errors
283
283
284
-
**"Cannot open server"** — Your client IP may not be in the SQL firewall rules. Add it:
284
+
**"Cannot open server"**—Your client IP may not be in the SQL firewall rules. Add it:
285
285
286
286
```bash
287
287
az sql server firewall-rule create \
@@ -291,15 +291,15 @@ az sql server firewall-rule create \
291
291
292
292
### DiskANN errors
293
293
294
-
**"DiskANN index requires at least 1,000 rows"** — The 50-hotel sample dataset is too small for DiskANN. The sample automatically detects this and falls back to exact nearest-neighbor search using `VECTOR_DISTANCE` without a vector index. To use DiskANN, load a larger dataset first.
294
+
**"DiskANN index requires at least 1,000 rows"**—The 50-hotel sample dataset is too small for DiskANN. The sample automatically detects this and falls back to exact nearest-neighbor search using `VECTOR_DISTANCE` without a vector index. To use DiskANN, load a larger dataset first.
295
295
296
296
### Vector dimension errors
297
297
298
298
**"Invalid or missing vector dimensions"**—The precomputed embeddings in `HotelsData_Vector.json` must use 1536 dimensions (matching `text-embedding-3-small`). Re-run `npm run embed` if you changed the embedding model.
299
299
300
300
## Explore your database
301
301
302
-
To browse tables, run queries, and inspect vector data directly from VS Code, install the [SQL Server (mssql)](https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql) extension. Connect using your Azure AD credentials — the same authentication the sample uses.
302
+
To browse tables, run queries, and inspect vector data directly from VS Code, install the [SQL Server (mssql)](https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql) extension. Connect using your Azure AD credentials—the same authentication the sample uses.
0 commit comments