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/azure-cache-for-redis/cache-overview-vector-similarity.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
title: About Vector Embeddings and Vector Search in Azure Cache for Redis
3
-
description: Learn about Azure Cache for Redis to store vector embeddings and provide similarity search.
3
+
description: Learn about Azure Cache for Redis to store vector embeddings and provide similarity search.| description: Learn about Azure Cache for Redis to store vector embeddings and provide similarity search. |
4
4
5
5
6
6
ms.collection: ce-skilling-ai-copilot
7
7
ms.topic: overview
8
8
ms.custom:
9
9
- ignite-2024
10
-
ms.date: 04/24/2024
10
+
ms.date: 02/27/2025
11
11
---
12
12
13
13
# What are Vector Embeddings and Vector Search in Azure Cache for Redis?
@@ -19,24 +19,22 @@ For tutorials and sample applications on how to use Azure Cache for Redis and Az
19
19
-[Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis with LangChain](./cache-tutorial-vector-similarity.md)
20
20
-[Sample: Using Redis as vector database in a Chatbot application with .NET Semantic Kernel](https://github.com/CawaMS/chatappredis)
21
21
-[Sample: Using Redis as semantic cache in a Dall-E powered image gallery with Redis OM for .NET](https://github.com/CawaMS/OutputCacheOpenAI)
22
+
<!-- check with Catherine - are all these in the samples repo -->
22
23
23
24
## Scope of Availability
24
25
25
26
Vector search capabilities in Redis require [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/), specifically the [RediSearch](https://redis.io/docs/interact/search-and-query/) module. This capability is only available in the [Enterprise tiers of Azure Cache for Redis](./cache-redis-modules.md).
27
+
<!-- and AMR right? -->
26
28
27
29
This table contains the information for vector search availability in different tiers.
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.
38
-
39
-
<!-- TODO - Add image example -->
37
+
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.
40
38
41
39
Each machine learning model classifies data and produces the vector in a different manner. Furthermore, it's typically not possible to determine exactly what semantic meaning each vector dimension represents. But because the model is consistent between each block of input data, similar words, documents, or images have vectors that are also similar. For example, the words `basketball` and `baseball` have embeddings vectors much closer to each other than a word like `rainforest`.
42
40
@@ -82,6 +80,7 @@ Vector similarity search can be used in multiple applications. Some common use-c
82
80
-**LLM Conversation Memory**. Persist conversation history with an LLM as embeddings in a vector database. Your application can use vector search to pull relevant history or "memories" into the response from the LLM. [LLM Conversation Memory example](https://github.com/continuum-llms/chatgpt-memory)
83
81
84
82
## Why choose Azure Cache for Redis for storing and searching vectors?
83
+
<!-- Shouldn't we just call out either Enterprise specifically and/or AMR? -->
85
84
86
85
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:
87
86
@@ -117,7 +116,4 @@ There are multiple other solutions on Azure for vector storage and search. Other
117
116
118
117
## Related content
119
118
120
-
The best way to get started with embeddings and vector search is to try it yourself!
121
-
122
-
> [!div class="nextstepaction"]
123
-
> [Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis](./cache-tutorial-vector-similarity.md)
119
+
-[Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis](./cache-tutorial-vector-similarity.md)
#CustomerIntent: As a developer, I want to develop some code using a sample so that I see an example of a vector similarity with an AI-based large language model.
13
13
---
14
14
15
-
# Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis
15
+
# Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Redis
16
16
17
17
<!-- cawa - need to mention AMR in this tutorial -->
18
-
In this tutorial, you'll walk through a basic vector similarity search use-case. You'll use embeddings generated by Azure OpenAI Service and the built-in vector search capabilities of the Enterprise tier of Azure Cache for Redis to query a dataset of movies to find the most relevant match.
18
+
In this tutorial, you walk through a basic vector similarity search use-case. You use embeddings generated by Azure OpenAI Service and the built-in vector search capabilities of the Enterprise tier of Azure Cache for Redis to query a dataset of movies to find the most relevant match.
19
19
20
-
The tutorial uses the [Wikipedia Movie Plots dataset](https://www.kaggle.com/datasets/jrobischon/wikipedia-movie-plots) that features plot descriptions of over 35,000 movies from Wikipedia covering the years 1901 to 2017.
21
-
The dataset includes a plot summary for each movie, plus metadata such as the year the film was released, the director(s), main cast, and genre. You'll follow the steps of the tutorial to generate embeddings based on the plot summary and use the other metadata to run hybrid queries.
20
+
The tutorial uses the [Wikipedia Movie Plots dataset](https://www.kaggle.com/datasets/jrobischon/wikipedia-movie-plots) that features plot descriptions of over 35,000 movies from Wikipedia covering the years 1901 to 2017. The dataset includes a plot summary for each movie, plus metadata such as the year the film was released, the director(s), main cast, and genre. You follow the steps of the tutorial to generate embeddings based on the plot summary and use the other metadata to run hybrid queries.
22
21
23
22
In this tutorial, you learn how to:
24
23
@@ -32,12 +31,13 @@ In this tutorial, you learn how to:
32
31
> * Use hybrid query functionality through [RediSearch](https://redis.io/docs/interact/search-and-query/) to prefilter the data and make the vector search even more powerful.
33
32
34
33
>[!IMPORTANT]
35
-
>This tutorial will walk you through building a Jupyter Notebook. You can follow this tutorial with a Python code file (.py) and get *similar* results, but you will need to add all of the code blocks in this tutorial into the `.py` file and execute once to see results. In other words, Jupyter Notebooks provides intermediate results as you execute cells, but this is not behavior you should expect when working in a Python code file.
34
+
>This tutorial walks you through building a Jupyter Notebook. You can follow this tutorial with a Python code file (.py) and get *similar* results, but you need to add all of the code blocks in this tutorial into the `.py` file and execute once to see results. In other words, Jupyter Notebooks provides intermediate results as you execute cells, but this is not behavior you should expect when working in a Python code file.
36
35
37
36
>[!IMPORTANT]
38
37
>If you would like to follow along in a completed Jupyter notebook instead, [download the Jupyter notebook file named *tutorial.ipynb*](https://github.com/Azure-Samples/azure-cache-redis-samples/tree/main/tutorial/vector-similarity-search-open-ai) and save it into the new *redis-vector* folder.
39
38
40
39
## Prerequisites
40
+
<!-- Continue here. -->
41
41
42
42
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true)
43
43
* Access granted to Azure OpenAI in the desired Azure subscription. Currently, you must apply for access to Azure OpenAI. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>.
0 commit comments