Skip to content

Commit 9153230

Browse files
Merge pull request #273340 from flang-msft/cawams
fxl---Cawams--main-branch
2 parents 9e99979 + 44d0aea commit 9153230

File tree

7 files changed

+60
-76
lines changed

7 files changed

+60
-76
lines changed

articles/azure-cache-for-redis/cache-aspnet-output-cache-provider.md

Lines changed: 32 additions & 32 deletions
Large diffs are not rendered by default.

articles/azure-cache-for-redis/cache-overview-vector-similarity.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ author: flang-msft
55
ms.author: franlanglois
66
ms.service: cache
77
ms.topic: overview
8-
ms.date: 04/19/2024
8+
ms.date: 04/24/2024
99
---
1010

1111
# About Vector Embeddings and Vector Search in Azure Cache for Redis
1212

13-
Vector similarity search (VSS) has become a popular use-case for AI-driven applications. Azure Cache for Redis can be used to store vector embeddings and compare them through vector similarity search. This article is a high-level introduction to the concept of vector embeddings, vector comparison, and how Redis can be used as a seamless part of a vector similarity workflow.
13+
Vector similarity search (VSS) is a popular use-case for AI-driven applications. Azure Cache for Redis can be used to store vector embeddings and compare them through vector similarity search. This article is a high-level introduction to the concept of vector embeddings, vector comparison, and how Redis can be used as a seamless part of a vector similarity workflow.
1414

15-
For a tutorial on how to use Azure Cache for Redis and Azure OpenAI to perform vector similarity search, see [Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis](./cache-tutorial-vector-similarity.md)
15+
For a tutorial on how to use Azure Cache for Redis and Azure OpenAI to perform vector similarity search, see [Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis](cache-tutorial-vector-similarity.md).
1616

1717
## Scope of Availability
1818

19+
This table contains the information for TLS availability in different tiers.
20+
1921
|Tier | Basic / Standard | Premium |Enterprise | Enterprise Flash |
2022
|--------- |:------------------:|:----------:|:---------:|:---------:|
2123
|Available | No | No | Yes | Yes (preview) |
@@ -26,7 +28,7 @@ Vector search capabilities in Redis require [Redis Stack](https://redis.io/docs/
2628

2729
### Concept
2830

29-
Vector embeddings are a fundamental concept in machine learning and natural language processing that enable the representation of data, such as words, documents, or images as numerical vectors in a high-dimension vector space. The primary idea behind vector embeddings is to capture the underlying relationships and semantics of the data by mapping them to points in this vector space. In simpler terms, that means converting your text or images into a sequence of numbers that represents the data, and then comparing the different number sequences. This allows complex data to be manipulated and analyzed mathematically, making it easier to perform tasks like similarity comparison, recommendation, and classification.
31+
Vector embeddings are a fundamental concept in machine learning and natural language processing that enable the representation of data, such as words, documents, or images as numerical vectors in a high-dimension vector space. The primary idea behind vector embeddings is to capture the underlying relationships and semantics of the data by mapping them to points in this vector space. That means converting your text or images into a sequence of numbers that represents the data, and then comparing the different number sequences. This allows complex data to be manipulated and analyzed mathematically, making it easier to perform tasks like similarity comparison, recommendation, and classification.
3032

3133
<!-- TODO - Add image example -->
3234

@@ -42,7 +44,7 @@ Many machine learning models support embeddings APIs. For an example of how to c
4244

4345
## What is a vector database?
4446

45-
A vector database is a database that can store, manage, retrieve, and compare vectors. Vector databases must be able to efficiently store a high-dimensional vector and retrieve it with minimal latency and high throughput. Non-relational datastores are most commonly used as vector databases, although it's possible to use relational databases like PostgreSQL, for example, with the [pgvector](https://github.com/pgvector/pgvector) extension.
47+
A vector database is a database that can store, manage, retrieve, and compare vectors. Vector databases must be able to efficiently store a high-dimensional vector and retrieve it with minimal latency and high throughput. Nonrelational datastores are most commonly used as vector databases, although it's possible to use relational databases like PostgreSQL, for example, with the [pgvector](https://github.com/pgvector/pgvector) extension.
4648

4749
### Index method
4850

@@ -70,7 +72,7 @@ Vector similarity search can be used in multiple applications. Some common use-c
7072

7173
Azure Cache for Redis can be used effectively as a vector database to store embeddings vectors and to perform vector similarity searches. In many ways, Redis is naturally a great choice in this area. It's extremely fast because it runs in-memory, unlike other vector databases that run on-disk. This can be useful when processing large datasets! Redis is also battle-hardened. Support for vector storage and search has been available for years, and many key machine learning frameworks like [LangChain](https://python.langchain.com/docs/integrations/vectorstores/redis) and [LlamaIndex](https://gpt-index.readthedocs.io/en/latest/examples/vector_stores/RedisIndexDemo.html) feature rich integrations with Redis. For example, the Redis LangChain integration [automatically generates an index schema for metadata](https://python.langchain.com/docs/integrations/vectorstores/redis#inspecting-the-created-index) passed in when using Redis as a vector store. This makes it much easier to filter results based on metadata.
7274

73-
Redis has a wide range of vector search capabilities through the [RediSearch module](cache-redis-modules.md#redisearch), which is available in the Enterprise tier of Azure Cache for Redis. These include:
75+
Redis has a wide range of vector search capabilities through the [RediSearch module](cache-redis-modules.md#redisearch), which is available in the Enterprise tier of Azure Cache for Redis. These vector search capabilities include:
7476

7577
- Multiple distance metrics, including `Euclidean`, `Cosine`, and `Internal Product`.
7678
- Support for both KNN (using `FLAT`) and ANN (using `HNSW`) indexing methods.
@@ -88,13 +90,13 @@ Additionally, Redis is often an economical choice because it's already so common
8890

8991
## What are my other options for storing and searching for vectors?
9092

91-
There are multiple other solutions on Azure for vector storage and search. These include:
93+
There are multiple other solutions on Azure for vector storage and search. Other solutions include:
9294

9395
- [Azure AI Search](../search/vector-search-overview.md)
9496
- [Azure Cosmos DB](../cosmos-db/mongodb/vcore/vector-search.md) using the MongoDB vCore API
9597
- [Azure Database for PostgreSQL - Flexible Server](../postgresql/flexible-server/how-to-use-pgvector.md) using `pgvector`
9698

97-
## Next Steps
99+
## Related content
98100

99101
The best way to get started with embeddings and vector search is to try it yourself!
100102

articles/azure-cache-for-redis/cache-web-app-aspnet-core-howto.md

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Create an ASP.NET Core web app with Azure Cache for Redis
3-
description: In this quickstart, you learn how to create an ASP.NET Core web app with Azure Cache for Redis
3+
description: In this quickstart, you learn how to create an ASP.NET Core web app with Azure Cache for Redis.
44
author: flang-msft
55
ms.author: franlanglois
66
ms.service: cache
77
ms.devlang: csharp
88
ms.custom: devx-track-csharp, mvc, mode-other
99
ms.topic: quickstart
10-
ms.date: 03/25/2022
10+
ms.date: 04/24/2024
1111

1212
---
1313

@@ -42,42 +42,41 @@ dotnet user-secrets set CacheConnection "<cache name>.redis.cache.windows.net,ab
4242

4343
## Connect to the cache with RedisConnection
4444

45-
The connection to your cache is managed by the `RedisConnection` class. The connection is made in this statement in `HomeController.cs` in the *Controllers* folder:
45+
The `RedisConnection` class manages the connection to your cache. The connection is made in this statement in `HomeController.cs` in the *Controllers* folder:
4646

4747
```csharp
4848
_redisConnection = await _redisConnectionFactory;
4949
```
5050

51-
In `RedisConnection.cs`, you see the `StackExchange.Redis` namespace has been added to the code. This is needed for the `RedisConnection` class.
51+
In `RedisConnection.cs`, you see the `StackExchange.Redis` namespace is added to the code. This is needed for the `RedisConnection` class.
5252

5353
```csharp
5454
using StackExchange.Redis;
5555
```
5656

57-
The `RedisConnection` code ensures that there is always a healthy connection to the cache by managing the `ConnectionMultiplexer` instance from `StackExchange.Redis`. The `RedisConnection` class recreates the connection when a connection is lost and unable to reconnect automatically.
57+
The `RedisConnection` code ensures that there's always a healthy connection to the cache by managing the `ConnectionMultiplexer` instance from `StackExchange.Redis`. The `RedisConnection` class recreates the connection when a connection is lost and unable to reconnect automatically.
5858

5959
For more information, see [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/) and the code in a [GitHub repo](https://github.com/StackExchange/StackExchange.Redis).
6060

61-
<!-- :::code language="csharp" source="~/samples-cache/quickstart/aspnet-core/ContosoTeamStats/RedisConnection.cs"::: -->
62-
6361
## Layout views in the sample
6462

6563
The home page layout for this sample is stored in the *_Layout.cshtml* file. From this page, you start the actual cache testing by clicking the **Azure Cache for Redis Test** from this page.
6664

67-
1. Open *Views\Shared\\_Layout.cshtml*.
65+
1. Open *Views\Shared\\_Layout.cshtml*.
6866

6967
1. You should see in `<div class="navbar-header">`:
7068

7169
```html
7270
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="RedisCache">Azure Cache for Redis Test</a>
7371
```
72+
7473
:::image type="content" source="media/cache-web-app-aspnet-core-howto/cache-welcome-page.png" alt-text="screenshot of welcome page":::
7574

7675
### Showing data from the cache
7776

7877
From the home page, you select **Azure Cache for Redis Test** to see the sample output.
7978

80-
1. In **Solution Explorer**, expand the **Views** folder, and then right-click the **Home** folder.
79+
1. In **Solution Explorer**, expand the **Views** folder, and then right-click the **Home** folder.
8180

8281
1. You should see this code in the *RedisCache.cshtml* file.
8382

@@ -124,40 +123,23 @@ From the home page, you select **Azure Cache for Redis Test** to see the sample
124123
```dos
125124
dotnet build
126125
```
127-
126+
128127
1. Then run the app with the following command:
129128

130129
```dos
131130
dotnet run
132131
```
133-
132+
134133
1. Browse to `https://localhost:5001` in your web browser.
135134

136135
1. Select **Azure Cache for Redis Test** in the navigation bar of the web page to test cache access.
137136

138137
:::image type="content" source="./media/cache-web-app-aspnet-core-howto/cache-simple-test-complete-local.png" alt-text="Screenshot of simple test completed local":::
139138

140-
## Clean up resources
141-
142-
If you continue to use this quickstart, you can keep the resources you created and reuse them.
143-
144-
Otherwise, if you're finished with the quickstart sample application, you can delete the Azure resources that you created in this quickstart to avoid charges.
145-
146-
> [!IMPORTANT]
147-
> Deleting a resource group is irreversible. When you delete a resource group, all the resources in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the resources for hosting this sample inside an existing resource group that contains resources you want to keep, you can delete each resource individually on the left instead of deleting the resource group.
148-
149-
### To delete a resource group
150-
151-
1. Sign in to the [Azure portal](https://portal.azure.com), and then select **Resource groups**.
152-
153-
1. In the **Filter by name...** box, type the name of your resource group. The instructions for this article used a resource group named *TestResources*. On your resource group, in the results list, select **...**, and then select **Delete resource group**.
154-
155-
:::image type="content" source="media/cache-web-app-howto/cache-delete-resource-group.png" alt-text="Delete":::
156-
157-
1. You're asked to confirm the deletion of the resource group. Type the name of your resource group to confirm, and then select **Delete**.
139+
<!-- Clean up include -->
140+
[!INCLUDE [cache-delete-resource-group](includes/cache-delete-resource-group.md)]
158141

159-
After a few moments, the resource group and all of its resources are deleted.
142+
## Related content
160143

161-
## Next steps
162144
- [Connection resilience](cache-best-practices-connection.md)
163145
- [Best Practices Development](cache-best-practices-development.md)
47.6 KB
Loading
17.1 KB
Loading
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: "include file"
33
description: "include file"
4-
services: redis-cache
4+
services: cache
55
author: flang-msft
66
ms.service: cache
77
ms.topic: "include"
8-
ms.date: 11/05/2019
8+
ms.date: 04/25/2024
99
ms.author: franlanglois
1010
ms.custom: "include file"
1111
---
@@ -14,10 +14,10 @@ ms.custom: "include file"
1414

1515
To connect your Azure Cache for Redis server, the cache client needs the host name, ports, and a key for the cache. Some clients might refer to these items by slightly different names. You can get the host name, ports, and keys from the [Azure portal](https://portal.azure.com).
1616

17-
- To get the access keys, from your cache left navigation, select **Access keys**.
17+
- To get the access keys, select **Authentication** from the Resource menu. Then, select the **Access keys** tab.
1818

1919
![Azure Cache for Redis keys](media/redis-cache-access-keys/redis-cache-keys.png)
2020

21-
- To get the host name and ports, from your cache left navigation, select **Properties**. The host name is of the form *\<DNS name>.redis.cache.windows.net*.
21+
- To get the host name and ports for your cache, select **Overview** from the Resource menu. The host name is of the form *\<DNS name>.redis.cache.windows.net*.
2222

2323
![Azure Cache for Redis properties](media/redis-cache-access-keys/redis-cache-hostname-ports.png)

articles/azure-cache-for-redis/includes/redis-cache-service-limits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
author: flang-msft
3-
ms.service: redis-cache
3+
ms.service: cache
44
ms.topic: include
55
ms.date: 11/09/2018
66
ms.author: franlanglois

0 commit comments

Comments
 (0)