You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Console.WriteLine("\n=== Cosmos DB Vector Samples Menu ===\nPlease enter your choice (0-5):\n1. Create embeddings for data\n2. Show all database indexes\n3. Run IVF vector search\n4. Run HNSW vector search\n5. Run DiskANN vector search\n0. Exit\n");
41
+
Console.WriteLine("\n=== DocumentDB Vector Samples Menu ===\nPlease enter your choice (0-5):\n1. Create embeddings for data\n2. Show all database indexes\n3. Run IVF vector search\n4. Run HNSW vector search\n5. Run DiskANN vector search\n0. Exit\n");
Copy file name to clipboardExpand all lines: ai/vector-search-dotnet/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
# Azure Cosmos DB MongoDB vCore - Vector Search Sample
1
+
# DocumentDB Vector Search Sample
2
2
3
-
This .NET 8.0 sample application demonstrates vector similarity searches using Azure Cosmos DB for MongoDB vCore with different vector search algorithms (IVF, HNSW, and DiskANN). The application uses hotel data and text embeddings generated by Azure OpenAI.
3
+
This .NET 8.0 sample application demonstrates vector similarity searches using Azure DocumentDB with different vector search algorithms (IVF, HNSW, and DiskANN). The application uses hotel data and text embeddings generated by Azure OpenAI.
4
4
5
5
## Features
6
6
7
7
- Generate vector embeddings for hotel descriptions using Azure OpenAI
8
8
- Compare performance across IVF, HNSW, and DiskANN vector search algorithms
9
-
- Seamless integration with Azure Cosmos DB and Azure OpenAI services
9
+
- Seamless integration with DocumentDB and Azure OpenAI services
10
10
- Interactive menu-driven application
11
11
12
12
## Prerequisites
13
13
14
14
### Azure Services
15
15
16
-
- Azure Cosmos DB for MongoDB vCore account
16
+
- Azure DocumentDB account
17
17
- Azure OpenAI Service with text-embedding-ada-002 model deployed
18
18
19
19
### Development Environment
@@ -105,17 +105,17 @@ Update the following in `appsettings.json`:
105
105
106
106
-`AzureOpenAI.Endpoint`: Your Azure OpenAI service endpoint
107
107
-`MongoDB.TenantId`: Your Azure tenant ID
108
-
-`MongoDB.ClusterName`: Your Cosmos DB cluster name
108
+
-`MongoDB.ClusterName`: Your DocumentDB cluster name
109
109
110
110
## Troubleshooting
111
111
112
112
-**Authentication errors**: Run `az login` to authenticate with Azure
113
-
-**Connection issues**: Verify Cosmos DB cluster is running and accessible
113
+
-**Connection issues**: Verify DocumentDB cluster is running and accessible
114
114
-**Embedding errors**: Ensure Azure OpenAI service is deployed with text-embedding-ada-002 model
115
115
-**Index failures**: Check vector dimensions match (1536) and sufficient storage is available
116
116
117
117
## Additional Resources
118
118
119
-
-[Azure Cosmos DB for MongoDB vCore Documentation](https://docs.microsoft.com/azure/cosmos-db/mongodb/vcore/)
2. Enable **Native DocumentDB and Microsoft Entra ID authentication** methods for your Azure DocumentDB resource.
272
-
3. Grant your identity appropriate RBAC permissions on your Azure DocumentDB instance. You need **Cosmos DB Account Reader Role** and **DocumentDB Account Contributor** roles assigned to your user.
272
+
3. Grant your identity appropriate RBAC permissions on your Azure DocumentDB instance. You need **DocumentDB Account Reader Role** and **DocumentDB Account Contributor** roles assigned to your user.
273
273
4. Set `MONGO_CLUSTER_NAME` instead of `MONGO_CONNECTION_STRING` in `.env`
274
274
275
275
### Method 2: Connection String Authentication
@@ -333,7 +333,7 @@ mongo-vcore-vector-search-go/
333
333
1.**Authentication Errors**
334
334
- Verify Azure OpenAI endpoint and key
335
335
- Check Azure DocumentDB connection string
336
-
- Ensure proper RBAC permissions for passwordless authentication. You need **Cosmos DB Account Reader Role** and **DocumentDB Account Contributor** roles assigned to your user. Roles may take some time to propagate.
336
+
- Ensure proper RBAC permissions for passwordless authentication. You need **DocumentDB Account Reader Role** and **DocumentDB Account Contributor** roles assigned to your user. Roles may take some time to propagate.
Copy file name to clipboardExpand all lines: ai/vector-search-python/README.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
# Cosmos DB Vector Samples (Python)
1
+
# DocumentDB Vector Samples (Python)
2
2
3
-
This project demonstrates vector search capabilities using Azure Cosmos DB for MongoDB (vCore) with Python. It includes implementations of three different vector index types: DiskANN, HNSW, and IVF, along with utilities for embedding generation and data management.
3
+
This project demonstrates vector search capabilities using Azure DocumentDB with Python. It includes implementations of three different vector index types: DiskANN, HNSW, and IVF, along with utilities for embedding generation and data management.
4
4
5
5
## Overview
6
6
7
7
Vector search enables semantic similarity searching by converting text into high-dimensional vector representations (embeddings) and finding the most similar vectors in the database. This project shows how to:
8
8
9
9
- Generate embeddings using Azure OpenAI
10
-
- Store vectors in Cosmos DB for MongoDB (vCore)
10
+
- Store vectors in DocumentDB
11
11
- Create and use different types of vector indexes
12
12
- Perform similarity searches with various algorithms
13
13
@@ -18,7 +18,7 @@ Before running this project, you need:
18
18
### Azure Resources
19
19
1.**Azure subscription** with appropriate permissions
20
20
2.**Azure OpenAI resource** with embedding model deployment
21
-
3.**Azure Cosmos DB for MongoDB (vCore) resource**
21
+
3.**Azure DocumentDB resource**
22
22
4.**Azure CLI** installed and configured
23
23
24
24
### Development Environment
@@ -75,9 +75,9 @@ az cognitiveservices account create \
75
75
4. Choose **text-embedding-ada-002** model
76
76
5. Note the deployment name for configuration
77
77
78
-
#### Create Cosmos DB for MongoDB (vCore)
78
+
#### Create DocumentDB
79
79
80
-
Learn how to create a Cosmos DB for MongoDB (vCore) account in the [official documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/quickstart-portal).
80
+
Learn how to create an Azure DocumentDB account in the [official documentation](https://learn.microsoft.com/azure/documentdb/).
0 commit comments