This repository contains code samples for working with Azure DocumentDB, including AI-powered vector search implementations across multiple programming languages.
- Azure Developer CLI (azd)
- Azure CLI
- An Azure subscription
Deploy the Azure DocumentDB cluster, Azure OpenAI, and other required resources:
azd auth login
azd upThis command will:
- Prompt you to create a new Azure environment
- Provision all infrastructure resources in your Azure subscription
- Generate a
.envfile in the root directory with all necessary connection strings and credentials
Choose your preferred programming language and navigate to the sample directory:
# For .NET
cd ai/vector-search-dotnet
# For Python
cd ai/vector-search-python
# For Go
cd ai/vector-search-go
# For TypeScript
cd ai/vector-search-typescriptCopy the .env file from the root directory to your language sample folder:
cp ../../.env .envAlternatively, you can keep the .env in the root and run the samples from there.
Follow the language-specific instructions:
- .NET - Vector search sample using .NET 8.0
- Python - Vector search implementation in Python
- Go - Vector search examples using Go
- TypeScript - Vector search with TypeScript/Node.js
Each sample demonstrates how to generate embeddings, create vector indexes, and perform semantic similarity searches with hotel data.
To delete all provisioned Azure resources:
azd down