Skip to content

Commit 0855c00

Browse files
Merge pull request #273642 from flang-msft/fxl---fix-with-PM-input
Fxl---incorporate pm input
2 parents 12f3680 + d704081 commit 0855c00

File tree

3 files changed

+52
-14
lines changed

3 files changed

+52
-14
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@ ms.date: 04/24/2024
1212
---
1313
# ASP.NET Output Cache Provider for Azure Cache for Redis
1414

15-
The Redis Output Cache Provider is an out-of-process storage mechanism for output cache data. This data is specifically for full HTTP responses (page output caching). The provider plugs into the new output cache provider extensibility point that was introduced in ASP.NET 4. For ASP.NET Core applications, read [Response caching in ASP.NET Core](/aspnet/core/performance/caching/response).
15+
The Redis Output Cache Provider is an out-of-process storage mechanism for output cache data. This data is specifically for full HTTP responses (page output caching). The provider plugs into the new output cache provider extensibility point that was introduced in ASP.NET 4.
16+
17+
For ASP.NET Core applications, see [Output Caching in ASP.NET core using Redis in .NET 8](/aspnet/core/performance/caching/output?view=aspnetcore-8.0#redis-cache&preserve-view=true).
1618

1719
To use the Redis Output Cache Provider, first configure your cache, and then configure your ASP.NET application using the Redis Output Cache Provider NuGet package. This article provides guidance on configuring your application to use the Redis Output Cache Provider. For more information about creating and configuring an Azure Cache for Redis instance, see [Create a cache](cache-dotnet-how-to-use-azure-redis-cache.md#create-a-cache).
1820

19-
## Store ASP.NET page output in the cache
21+
## Store ASP.NET core page output in Redis
22+
23+
For a full feature specification, see [AS.NET core output caching](/aspnet/core/performance/caching/output?view=aspnetcore-8.0&preserve-view=true).
24+
25+
For sample application demonstrating the usage, see [.NET 8 Web Application with Redis Output Caching and Azure Open AI](https://github.com/CawaMS/OutputCacheOpenAI).
26+
27+
## Store ASP.NET page output in Redis
2028

2129
To configure a client application in Visual Studio using the Azure Cache for Redis Session State NuGet package, select **NuGet Package Manager**, **Package Manager Console** from the **Tools** menu.
2230

23-
Run the following command from the `Package Manager Console` window.
31+
Run the following command from the `Package Manager Console` window:
2432

2533
```powershell
2634
Install-Package Microsoft.Web.RedisOutputCacheProvider
@@ -43,7 +51,7 @@ The NuGet package downloads and adds the required assembly references and adds t
4351
</caching>
4452
```
4553

46-
Configure the attributes in the first c with the values from your cache in the Microsoft Azure portal. Also, configure the other values you want. For instructions on accessing your cache properties, see [Configure Azure Cache for Redis settings](cache-configure.md#configure-azure-cache-for-redis-settings).
54+
Configure the attributes in the first column with the values from your cache in the Microsoft Azure portal. Also, configure the other values you want. For instructions on accessing your cache properties, see [Configure Azure Cache for Redis settings](cache-configure.md#configure-azure-cache-for-redis-settings).
4755

4856
| Attribute | Type | Default | Description |
4957
| --------- | ---- | ------- | ----------- |
@@ -196,6 +204,6 @@ After you do these steps, your application is configured to use the Redis Output
196204
* [NCache](https://www.alachisoft.com/blogs/how-to-use-a-distributed-cache-for-asp-net-output-cache/)
197205
* [Apache Ignite](https://apacheignite-net.readme.io/docs/aspnet-output-caching)
198206

199-
## Next steps
207+
## Related content
200208

201209
Check out the [ASP.NET Session State Provider for Azure Cache for Redis](cache-aspnet-session-state-provider.md).

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

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ ms.topic: overview
88
ms.date: 04/24/2024
99
---
1010

11-
# About Vector Embeddings and Vector Search in Azure Cache for Redis
11+
# What are Vector Embeddings and Vector Search in Azure Cache for Redis
1212

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.
13+
Vector similarity search (VSS) has become a popular technology for AI-powered intelligent applications. Azure Cache for Redis can be used as a vector database by combining it models like [Azure OpenAI](../ai-services/openai/overview.md) for Retrieval-Augmented Generative AI and analysis scenarios. This article is a high-level introduction to the concept of vector embeddings, vector similarity search, and how Redis can be used as a vector database powering intelligent applications.
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 tutorials and sample applications on how to use Azure Cache for Redis and Azure OpenAI to perform vector similarity search, see the following:
16+
17+
- [Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis with LangChain](./cache-tutorial-vector-similarity.md)
18+
- [Sample: Using Redis as vector database in a Chatbot application with .NET Semantic Kernel](https://github.com/CawaMS/chatappredis)
19+
- [Sample: Using Redis as semantic cache in a Dall-E powered image gallery with Redis OM for .NET](https://github.com/CawaMS/OutputCacheOpenAI)
1620

1721
## Scope of Availability
1822

@@ -24,8 +28,6 @@ This table contains the information for vector search availability in different
2428
|--------- |:------------------:|:----------:|:---------:|:---------:|
2529
|Available | No | No | Yes | Yes (preview) |
2630

27-
28-
2931
## What are vector embeddings?
3032

3133
### Concept
@@ -48,9 +50,16 @@ Many machine learning models support embeddings APIs. For an example of how to c
4850

4951
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.
5052

51-
### Index method
53+
### Index and search method
54+
55+
Vector databases need to index data for fast search and retrieval. In addition, a vector database should support built-in search queries for simplified programming experiences.
5256

53-
Vector databases need to index data for fast search and retrieval. There are several common indexing methods, including:
57+
There are several indexing methods, such as:
58+
59+
- **FLAT** - Brute-force index
60+
- **HNSW** - Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs
61+
62+
There are several common search methods, including:
5463

5564
- **K-Nearest Neighbors (KNN)** - an exhaustive method that provides the most precision but with higher computational cost.
5665
- **Approximate Nearest Neighbors (ANN)** - a more efficient by trading precision for greater speed and lower processing overhead.
@@ -72,9 +81,15 @@ Vector similarity search can be used in multiple applications. Some common use-c
7281

7382
## Why choose Azure Cache for Redis for storing and searching vectors?
7483

75-
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.
84+
Azure Cache for Redis can be used effectively as a vector database to store embeddings vectors and to perform vector similarity searches. Support for vector storage and search has been available in many key machine learning frameworks like:
85+
86+
- [Semantic Kernel](https://github.com/microsoft/semantic-kernel)
87+
- [LangChain](https://python.langchain.com/docs/integrations/vectorstores/redis)
88+
- [LlamaIndex](https://gpt-index.readthedocs.io/en/latest/examples/vector_stores/RedisIndexDemo.html)
89+
90+
These frameworks 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.
7691

77-
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:
92+
Redis has a wide range of 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:
7893

7994
- Multiple distance metrics, including `Euclidean`, `Cosine`, and `Internal Product`.
8095
- Support for both KNN (using `FLAT`) and ANN (using `HNSW`) indexing methods.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,25 @@ ms.date: 04/24/2024
1515

1616
In this quickstart, you incorporate Azure Cache for Redis into an ASP.NET Core web application that connects to Azure Cache for Redis to store and retrieve data from the cache.
1717

18+
There are also caching providers in .NET core. To quickly start using Redis with minimal changes to your existing code, see:
19+
20+
- [ASP.NET core Output Cache provider](/aspnet/core/performance/caching/output#redis-cache)
21+
- [ASP.NET core Distributed Caching provider](/aspnet/core/performance/caching/distributed#distributed-redis-cache)
22+
- [ASP.NET core Redis session provider](/aspnet/core/fundamentals/app-state#configure-session-state)
23+
1824
## Skip to the code on GitHub
1925

2026
Clone the repo [https://github.com/Azure-Samples/azure-cache-redis-samples/tree/main/quickstart/aspnet-core](https://github.com/Azure-Samples/azure-cache-redis-samples/tree/main/quickstart/aspnet-core) on GitHub.
2127

28+
As a next step, you can see a real-world scenario eShop application demonstrating the ASP.NET core caching providers: [ASP.NET core eShop using Redis caching providers](https://github.com/Azure-Samples/azure-cache-redis-demos).
29+
30+
Features included:
31+
32+
- Redis Distributed Caching
33+
- Redis session state provider
34+
35+
Deployment instructions are in the README.md.
36+
2237
## Prerequisites
2338

2439
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)

0 commit comments

Comments
 (0)