
Skill
documentdb-vector-search
implement vector search in Azure DocumentDB
Description
Vector search best practices for Azure DocumentDB using `cosmosSearch` — choosing between DiskANN / HNSW / IVF, creating indexes, tuning `lBuild` / `lSearch` / `maxDegree`, Product Quantization (up to 16,000 dims), half-precision (fp16) indexing, and normalizing embeddings for cosine similarity. Use when building RAG / semantic-search applications, creating a vector index, tuning recall/latency, or reducing vector-index memory footprint.
SKILL.md
Vector Search — Azure DocumentDB (cosmosSearch)
Azure DocumentDB's native vector index type is cosmosSearch. Pick the sub-type by scale:
| Index sub-type | Scale sweet spot | Tier |
|---|---|---|
vector-diskann (recommended) | Up to 500k+ vectors | M30+ |
vector-hnsw | Up to ~50k vectors | M30+ |
vector-ivf | Under ~10k vectors | M10+ |
Similarity options: COS (cosine), L2 (Euclidean), IP (inner product).
Rules
- vector-choose-index-type — Prefer DiskANN for production; use HNSW up to 50k, IVF under 10k.
- vector-create-diskann-index — Create a
vector-diskannindex with correctdimensions,similarity,maxDegree, andlBuild. - vector-knn-query — Query with
$search+cosmosSearch; tunelSearchandk; combine with pre-filters. - vector-product-quantization — Shrink high-dimensional vectors (up to 16,000 dims) while preserving recall.
- vector-half-precision — Halve vector memory with fp16 indexing and minimal recall loss.
- vector-normalize-embeddings — Normalize embeddings when using cosine similarity; store model + dimensions alongside vectors.
More skills from the documentdb-agent-kit repository
View all 17 skillsdocumentdb-azure-deployment
deploy Azure DocumentDB clusters
Jul 12AzureBicepCLIDatabase +2documentdb-connection
configure MongoDB connections for DocumentDB
Jul 12AzureDatabasePerformancedocumentdb-data-modeling
design Azure DocumentDB data models
Jul 12AzureData ModelingDatabaseMongoDBdocumentdb-driver
implement Azure DocumentDB driver best practices
Jul 12AzureDatabaseMongoDBSDKdocumentdb-full-text-search
implement full-text search in Azure DocumentDB
Jul 15AzureDatabaseSearchdocumentdb-high-availability
configure high availability for DocumentDB
Jul 12AzureDatabaseOperationsPerformance
More from Azure (Microsoft)
View publisherazure-arg-external-evaluation-policy-author
author and test Azure Resource Graph policies
azure-policy
Jul 12AzureComplianceGovernancePolicyazure-blueprints-migration
migrate Azure Blueprints to Template Specs
azure-blueprints
Jul 12AzureDeploymentInfrastructure as CodeMigrationapiview-feedback-resolution
resolve APIView feedback on Azure SDKs
azure-sdk-tools
Jul 12API DevelopmentAzureCode ReviewDocumentationazsdk-common-live-and-recorded-tests
deploy resources and run Azure SDK tests
azure-sdk-tools
Jul 12AzureDeploymentSDKTestingazsdk-common-prepare-release-plan
manage Azure SDK release plan work items
azure-sdk-tools
Jul 12AzureGitHubProject ManagementSDKazsdk-common-sdk-release
release Azure SDK packages
azure-sdk-tools
Jul 12AzureCI/CDDeploymentSDK