Azure / azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
https://azure.microsoft.com/products/search
MIT License
739 stars 314 forks source link
azure azurecognitivesearch embeddings vector vector-search

Vector samples - Azure AI Search

This repository provides Python, C#, REST, and JavaScript code samples for vector support in Azure AI Search.

There are breaking changes from REST API version 2023-07-01-Preview to newer API versions. These breaking changes also apply to the Azure SDK beta packages targeting that REST API version. See Upgrade REST APIs for migration guidance.

Feature status

Vector support consists of generally available features and preview features.

Feature Status
vector indexing generally available (2023-11-01 and stable SDK packages)
vector queries generally available (2023-11-01 and stable SDK packages)
integrated data chunking public preview (2023-10-01-preview and later, plus beta SDK packages)
integrated embedding public preview (2023-10-01-preview and later, plus beta SDK packages)
index projections public preview (2023-10-01-preview and later, plus beta SDK packages)
vectorizers public preview (2023-10-01-preview and later, plus beta SDK packages)
scalar quantization public preview (2024-03-01-preview and later, plus beta SDK packages)
OneLake indexer public preview (2024-05-01-preview, plus beta SDK packages)
Binary vectors support public preview (2024-05-01-preview, plus beta SDK packages)

Preview features are available under Supplemental Terms of Use.

demo-python samples

Sample Description Status
demo-python readme A growing collection of notebooks that demonstrate aspects of vector search support, including data chunking and embedding of both text and image content and queries, using a variety of frameworks and techniques. GA and preview

demo-dotnet samples

Sample Description Status
DotNetVectorDemo A .NET console app that calls Azure OpenAI to vectorize data. It then calls Azure AI Search to create, load, and query vector data. Generally available (GA)
DotNetIntegratedVectorizationDemo A .NET console app that calls Azure AI Search to create an index, indexer, data source, and skillset. An Azure Storage account provides the data. Azure OpenAI is called by the skillset during indexing, and again during query execution to vectorize text queries. Public preview
QuantizationAndStorageOptions A .NET console app that demonstrates narrow data types and built-in scalar quantization, reducing vector index size in memory and on disk. It also disables storage of vectors returned in query response, which you don't need if you're not returning vectors in a query. Public preview

demo-java samples

Sample Description Status
demo-vectors A Java console app that calls Azure OpenAI to vectorize data. It then calls Azure AI Search to create, load, and query vector data. GA
demo-integrated-vectorization A Java console app that calls Azure AI Search to create an index, indexer, data source, and skillset. An Azure Storage account provides the data. Azure OpenAI is called by the skillset during indexing, and again during query execution to vectorize text queries. GA and preview

demo-javascript samples

Sample Description Status
JavaScriptVectorDemo A single folder contains three code samples. The azure-search-vector-sample.js script calls just Azure OpenAI and is used to generate embeddings for fields in an index. The docs-text-openai-embeddings.js program is an end-to-end code sample that calls Azure OpenAI for embeddings and Azure AI Seach to create, load, and query an index that contains vectors. The query-text-openai-embeddings.js script generates an embedding for a vector query. GA and preview

Other vector samples and tools

Documentation