Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 2.39 KB

File metadata and controls

56 lines (36 loc) · 2.39 KB

Vector Search Samples for Azure SQL Database

Native vector search samples demonstrating the VECTOR() data type and VECTOR_DISTANCE() function in Azure SQL Database.

Prerequisites

Quick start with Azure Developer CLI

Deploy all required Azure resources (Azure SQL Database + Azure OpenAI) with one command:

azd up --cwd samples/features/vector-search

This provisions:

  • Azure SQL Database with native vector support
  • Azure OpenAI with text-embedding-3-small deployment
  • 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/.env

This 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 samples

Language Folder Description
TypeScript vector-search-query-typescript/ Vector search with Node.js, tedious driver, and Azure OpenAI

Infrastructure only

The infra/ folder contains Bicep templates that can be deployed independently:

azd up --cwd infra  # deploy infrastructure only

Or used as a module in your own Bicep templates.

Contributing

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.

Related content