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
Copy file name to clipboardExpand all lines: articles/cosmos-db/gen-ai/rag.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,26 @@ ms.author: thvankra
14
14
15
15
Retrieval Augmented Generation (RAG) combines the power of large language models (LLMs) with robust information retrieval systems to create more accurate and contextually relevant responses. Unlike traditional generative models that rely solely on pre-trained data, RAG architectures enhance an LLM's capabilities by integrating real-time information retrieval. This augmentation ensures responses are not only generative but also grounded in the most relevant, up-to-date data available.
16
16
17
-
Azure Cosmos DB, an operational database that supports vector search, stands out as an excellent platform for implementing RAG. Its ability to handle both operational and analytical workloads in a single database, along with advanced features such as multi-tenancy and hierarchical partition keys, provides a solid foundation for building sophisticated generative AI applications.
17
+
Azure Cosmos DB, an operational database that supports vector search, stands out as an excellent platform for implementing RAG. Its ability to handle both operational and analytical workloads in a single database, along with advanced features such as multitenancy and hierarchical partition keys, provides a solid foundation for building sophisticated generative AI applications.
18
18
19
19
## Key Advantages of Using Azure Cosmos DB
20
20
21
-
### 1. Unified Data Storage and Retrieval
21
+
### Unified data storage and retrieval
22
22
Azure Cosmos DB enables seamless integration of [vector search](../nosql/vector-search.md) capabilities within a unified database system. This means that your operational data and vectorized data coexist, eliminating the need for separate indexing systems.
23
23
24
-
### 2. Real-Time Data Ingestion and Querying
25
-
Azure Cosmos DB supports real-time ingestion and querying, making it ideal for applications that require up-to-the-minute information. This is crucial for RAG architectures, where the freshness of data can significantly impact the relevance of generated responses.
24
+
### Real-Time data ingestion and querying
25
+
Azure Cosmos DB supports real-time ingestion and querying, making it ideal for AI applications. This is crucial for RAG architectures, where the freshness of data can significantly impact the relevance of generated responses.
26
26
27
-
### 3. Scalability and Global Distribution
28
-
Designed for large-scale applications, Azure Cosmos DB offers global distribution and automatic scaling. This ensures that your RAG-enabled application can handle high query volumes and deliver consistent performance irrespective of user location.
27
+
### Scalability and global distribution
28
+
Designed for large-scale applications, Azure Cosmos DB offers global distribution and [instant autoscale](../../cosmos-db/provision-throughput-autoscale.md). This ensures that your RAG-enabled application can handle high query volumes and deliver consistent performance irrespective of user location.
29
29
30
-
### 4. High Availability and Reliability
30
+
### High availability and reliability
31
31
Azure Cosmos DB offers comprehensive SLAs for throughput, latency, and [availability](../../reliability/reliability-cosmos-db-nosql.md). This reliability ensures that your RAG system is always available to generate responses with minimal downtime.
32
32
33
-
### 5. Multi-Tenancy with Hierarchical Partition Keys
34
-
Azure Cosmos DB supports [multi-tenancy](../nosql/multi-tenancy-vector-search.md) through various performance and security isolation models, making it easier to manage data for different clients or user groups within the same database. This feature is particularly useful for SaaS applications where separation of tenant data is crucial for security and compliance.
33
+
### Multitenancy with hierarchical partition keys
34
+
Azure Cosmos DB supports [multitenancy](../nosql/multi-tenancy-vector-search.md) through various performance and security isolation models, making it easier to manage data for different clients or user groups within the same database. This feature is particularly useful for SaaS applications where separation of tenant data is crucial for security and compliance.
35
35
36
-
### 6. Comprehensive Security Features
36
+
### Comprehensive security features
37
37
With built-in features such as end-to-end encryption, role-based access control (RBAC), and virtual network (VNet) integration, Azure Cosmos DB ensures that your data remains secure. These security measures are essential for enterprise-grade RAG applications that handle sensitive information.
38
38
39
39
@@ -62,4 +62,4 @@ Here's a streamlined process for building a RAG application with Azure Cosmos DB
62
62
- Vector [embeddings](vector-embeddings.md)
63
63
-[Distance functions](distance-functions.md)
64
64
-[kNN vs ANN vector search algorithms](knn-vs-ann.md)
65
-
-[Multi-tenancy for Vector Search](../nosql/multi-tenancy-vector-search.md)
65
+
-[Multitenancy for Vector Search](../nosql/multi-tenancy-vector-search.md)
Copy file name to clipboardExpand all lines: articles/cosmos-db/nosql/multi-tenancy-vector-search.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
3
-
title: Multi-tenancy in Azure Cosmos DB
3
+
title: Multitenancy in Azure Cosmos DB
4
4
description: Learn concepts for building multitenant gen-ai apps in Azure Cosmos DB
5
5
author: TheovanKraay
6
6
ms.service: cosmos-db
@@ -11,7 +11,7 @@ ms.author: thvankra
11
11
12
12
---
13
13
14
-
# Multi-tenancy for vector search in Azure Cosmos DB
14
+
# Multitenancy for vector search in Azure Cosmos DB
15
15
16
16
> "OpenAI relies on Cosmos DB to dynamically scale their ChatGPT service – one of the fastest-growing consumer apps ever – enabling high reliability and low maintenance."
17
17
> — Satya Nadella
@@ -81,9 +81,9 @@ For maximum isolation, the account-per-tenant model is preferable. Each tenant g
81
81
Azure Cosmos DB enables [customer-managed keys](../how-to-setup-customer-managed-keys.md) for data encryption, adding an extra layer of security for multitenant environments.
82
82
83
83
**Steps to Implement:**
84
-
1.**Set Up Azure Key Vault:** Securely store your encryption keys.
85
-
2.**Link to Cosmos DB:** Associate your Key Vault with your Cosmos DB account.
86
-
3.**Rotate Keys Regularly:** Enhance security by routinely updating your keys.
84
+
-**Set Up Azure Key Vault:** Securely store your encryption keys.
85
+
-**Link to Cosmos DB:** Associate your Key Vault with your Cosmos DB account.
86
+
-**Rotate Keys Regularly:** Enhance security by routinely updating your keys.
87
87
88
88
Using customer-managed keys ensures each tenant's data is encrypted uniquely, providing robust security and compliance.
89
89
@@ -137,51 +137,51 @@ When designing a multitenant system with Cosmos DB, consider these factors:
137
137
### Practical implementation in Azure Cosmos DB
138
138
139
139
**Partition Key-Per-Tenant:**
140
-
1.**Assign Partition Keys:** Unique keys for each tenant ensure logical separation.
141
-
2.**Store Data:** Tenant data is confined to respective partition keys.
142
-
3.**Optimize Queries:** Use partition keys for efficient, targeted queries.
140
+
-**Assign Partition Keys:** Unique keys for each tenant ensure logical separation.
141
+
-**Store Data:** Tenant data is confined to respective partition keys.
142
+
-**Optimize Queries:** Use partition keys for efficient, targeted queries.
143
143
144
144
**Hierarchical Partitioning:**
145
-
1.**Create Multi-Level Keys:** Further organize data within tenant partitions.
146
-
2.**Targeted Queries:** Enhance performance with precise sub-partition targeting.
147
-
3.**Manage Resources:** Distribute workloads evenly to prevent bottlenecks.
145
+
-**Create Multi-Level Keys:** Further organize data within tenant partitions.
146
+
-**Targeted Queries:** Enhance performance with precise sub-partition targeting.
147
+
-**Manage Resources:** Distribute workloads evenly to prevent bottlenecks.
148
148
149
149
**Account-Per-Tenant:**
150
-
1.**Provide Separate Accounts:** Each tenant gets a dedicated Cosmos DB account.
151
-
2.**Customize Resources:** Tailor performance and SLAs to tenant requirements.
152
-
3.**Ensure Security:** Physical data isolation offers robust security and compliance.
150
+
-**Provide Separate Accounts:** Each tenant gets a dedicated Cosmos DB account.
151
+
-**Customize Resources:** Tailor performance and SLAs to tenant requirements.
152
+
-**Ensure Security:** Physical data isolation offers robust security and compliance.
153
153
154
154
## Best practices for using Azure Cosmos DB with vector search
155
155
156
156
Azure Cosmos DB's support for DiskANN vector index capability makes it an excellent choice for applications that require fast, high-dimensional searches, such as AI-assisted research platforms like ResearchHub. Here’s how you can leverage these capabilities:
157
157
158
-
**1. Efficient Storage and Retrieval:**
158
+
**Efficient Storage and Retrieval:**
159
159
-**Vector Indexing:** Use the DiskANN vector index to efficiently store and retrieve high-dimensional vectors. This is useful for applications that involve similarity searches in large datasets, such as image recognition or document similarity.
160
160
-**Performance Optimization:** DiskANN’s vector search capabilities enable quick, accurate searches, ensuring low latency and high performance, which is critical for maintaining a good user experience.
161
161
162
-
**2. Scaling Across Tenants:**
162
+
**Scaling Across Tenants:**
163
163
-**Partition Key-Per-Tenant:** Utilize partition keys to logically isolate tenant data while benefiting from Cosmos DB’s scalable infrastructure.
164
164
-**Hierarchical Partitioning:** Implement hierarchical partitioning to further segment data within each tenant’s partition, improving query performance and resource distribution.
165
165
166
-
**3. Security and Compliance:**
166
+
**Security and Compliance:**
167
167
-**Customer-Managed Keys:** Implement customer-managed keys for data encryption at rest, ensuring each tenant’s data is securely isolated.
168
168
-**Regular Key Rotation:** Enhance security by regularly rotating encryption keys stored in Azure Key Vault.
169
169
170
170
### Real-world example: implementing ResearchHub
171
171
172
172
**Partition Key-Per-Tenant:**
173
-
1.**Assign Partition Keys:** Each organization (tenant) is assigned a unique partition key.
174
-
2.**Data Storage:** All researchers’ data for a tenant is stored within its partition, ensuring logical separation.
175
-
3.**Query Optimization:** Queries are executed using the tenant's partition key, enhancing performance by isolating data access.
173
+
-**Assign Partition Keys:** Each organization (tenant) is assigned a unique partition key.
174
+
-**Data Storage:** All researchers’ data for a tenant is stored within its partition, ensuring logical separation.
175
+
-**Query Optimization:** Queries are executed using the tenant's partition key, enhancing performance by isolating data access.
176
176
177
177
**Hierarchical Partitioning:**
178
-
1.**Multi-Level Partition Keys:** Data within a tenant’s partition is further segmented by "DepartmentId" and "ResearcherId" or other relevant attributes.
179
-
2.**Granular Data Management:** This hierarchical approach allows ResearchHub to manage and query data more efficiently, reducing latency, and improving response times.
178
+
-**Multi-Level Partition Keys:** Data within a tenant’s partition is further segmented by "DepartmentId" and "ResearcherId" or other relevant attributes.
179
+
-**Granular Data Management:** This hierarchical approach allows ResearchHub to manage and query data more efficiently, reducing latency, and improving response times.
180
180
181
181
**Account-Per-Tenant:**
182
-
1.**Separate Cosmos DB Accounts:** High-profile clients or those with sensitive data are provided individual Cosmos DB accounts.
183
-
2.**Custom Configurations:** Resources and SLAs are tailored to meet the specific needs of each tenant, ensuring optimal performance and security.
184
-
3.**Enhanced Data Security:** Physical separation of data with customer-managed encryption keys ensures robust security compliance.
182
+
-**Separate Cosmos DB Accounts:** High-profile clients or those with sensitive data are provided individual Cosmos DB accounts.
183
+
-**Custom Configurations:** Resources and SLAs are tailored to meet the specific needs of each tenant, ensuring optimal performance and security.
184
+
-**Enhanced Data Security:** Physical separation of data with customer-managed encryption keys ensures robust security compliance.
0 commit comments