Native vector search samples demonstrating the VECTOR() data type and VECTOR_DISTANCE() function in Azure SQL Database.
- Azure subscription — Create one free
- Azure Developer CLI (azd)
- Azure CLI
Deploy all required Azure resources (Azure SQL Database + Azure OpenAI) with one command:
azd up --cwd samples/features/vector-searchThis provisions:
- Azure SQL Database with native vector support
- Azure OpenAI with
text-embedding-3-smalldeployment - Managed Identity with appropriate role assignments
After deployment, create the .env file for the language samples:
azd env get-values --cwd samples/features/vector-search > samples/features/vector-search/vector-search-query-typescript/.envThis writes the deployment outputs (AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_EMBEDDING_DEPLOYMENT, AZURE_SQL_SERVER, AZURE_SQL_DATABASE, etc.) directly into the .env file that the samples read at runtime.
| Language | Folder | Description |
|---|---|---|
| TypeScript | vector-search-query-typescript/ | Vector search with Node.js, tedious driver, and Azure OpenAI |
The infra/ folder contains Bicep templates that can be deployed independently:
azd up --cwd infra # deploy infrastructure onlyOr used as a module in your own Bicep templates.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.