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: samples/features/vector-search/vector-search-query-typescript/README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@ This sample demonstrates how to perform **native vector search** in Azure SQL Da
4
4
5
5
It uses:
6
6
7
-
-**[tedious](https://www.npmjs.com/package/tedious)** — Microsoft's Node.js driver for SQL Server, with Azure AD authentication
8
-
-**[openai](https://www.npmjs.com/package/openai)** — Azure OpenAI SDK for generating embeddings (via the `AzureOpenAI` class)
9
-
-**[@azure/identity](https://www.npmjs.com/package/@azure/identity)** — `DefaultAzureCredential` for passwordless authentication to both Azure SQL and Azure OpenAI
7
+
-**[tedious](https://www.npmjs.com/package/tedious)**—Microsoft's Node.js driver for SQL Server, with Azure AD authentication
8
+
-**[openai](https://www.npmjs.com/package/openai)**—Azure OpenAI SDK for generating embeddings (via the `AzureOpenAI` class)
9
+
-**[@azure/identity](https://www.npmjs.com/package/@azure/identity)**—`DefaultAzureCredential` for passwordless authentication to both Azure SQL and Azure OpenAI
10
10
11
11
## What the sample does
12
12
13
-
1. Loads 50 hotels with pre-computed embeddings from `data/HotelsData_Vector.json`
13
+
1. Loads 50 hotels with precomputed embeddings from `data/HotelsData_Vector.json`
14
14
2. Connects to Azure SQL Database using `DefaultAzureCredential` (no passwords or API keys)
15
15
3. Creates a table with `id`, `name`, `description`, `category`, `rating`, and a `VECTOR(1536)` column
16
-
4. Inserts all 50 hotels with their pre-computed vector embeddings
16
+
4. Inserts all 50 hotels with their precomputed vector embeddings
17
17
5. Generates a fresh query embedding using Azure OpenAI `text-embedding-3-small`
18
18
6. Performs a vector similarity search using either **exact kNN** (`VECTOR_DISTANCE`) or **approximate ANN** (`VECTOR_SEARCH` with DiskANN index), based on the `VECTOR_SEARCH_ALGORITHM` environment variable
19
19
7. Displays the top matching results with category, rating, and similarity scores
@@ -109,7 +109,7 @@ This runs the TypeScript code directly using `tsx` with Node.js 20+ native env-f
Hotel data with pre-computed embeddings is loaded from `data/HotelsData_Vector.json`. This avoids calling Azure OpenAI for each hotel during the main run, making the demo faster and simpler:
191
+
Hotel data with precomputed embeddings is loaded from `data/HotelsData_Vector.json`. This avoids calling Azure OpenAI for each hotel during the main run, making the demo faster and simpler:
@@ -295,7 +295,7 @@ az sql server firewall-rule create \
295
295
296
296
### Vector dimension errors
297
297
298
-
**"Invalid or missing vector dimensions"** — The pre-computed 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.
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.
0 commit comments