Skip to content

Commit d45ae63

Browse files
authored
Update cache-overview-vector-similarity.md
1 parent 808e14d commit d45ae63

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

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

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ For a tutorial on how to use Azure Cache for Redis and Azure OpenAI to perform v
2222

2323
Vector search capabilities in Redis require [Redis Stack](https://redis.io/docs/about/about-stack/), 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).
2424

25-
```markdown
26-
Azure Cache for Redis can be used to store the embeddings vectors and to perform the vector similarity search. Redis is extremely fast because it runs in-memory. This can be very useful when processing large datasets!
27-
Because Redis is so popular, it is often already used in applications for caching or session store applications. Redis can often be an economical choice because it can pull double-duty by handling typical caching roles while simultaneously handling vector search applications.
28-
29-
Redis has access to a wide range of search capabilities through the [RediSearch module](cache-redis-modules#redisearch), which is available in the Enterprise tier of Azure Cache for Redis. Vector search capabilities include:
30-
- Support for `Euclidean`, `Cosine`, and `Internal Product` search distance metrics
31-
- `FLAT` and `Hierarchical Navigable Small World (HNSW)` indexing methods
32-
- Hybrid filtering with [powerful query features](https://redis.io/docs/interact/search-and-query/)
33-
```
3425
## What are vector embeddings?
3526

3627
### Concept
@@ -61,23 +52,21 @@ Finally, vector databases execute vector searches by using the chosen vector com
6152

6253
Vector similiarity search can be used in multiple applications. Some common use-cases include:
6354

64-
- **Semantic Q&A**. Create a chatbot that can respond to questions about your own data. For instance, a chatbot that can respond to employee questions on their healthcare coverage. Hundreds of pages of dense healthcare coverage documentation can be split into chunks, converted into embeddings vectors, and searched based on vector similarity. The resulting documents can then be summarized for employees using another large language model (LLM). [Example](https://techcommunity.microsoft.com/t5/azure-developer-community-blog/vector-similarity-search-with-azure-cache-for-redis-enterprise/ba-p/3822059)
65-
- **Document Retrieval**. Use the deeper semantic understanding of text provided by LLMs to provide a richer document search experience where traditional keyword-based search falls short. [Example](https://github.com/RedisVentures/redis-arXiv-search)
66-
- **Product Recommendation**. Find similar products or services to recommend based on past user activities. [Example](https://github.com/RedisVentures/LLM-Recommender)
67-
- **Visual Search**
55+
- **Semantic Q&A**. Create a chatbot that can respond to questions about your own data. For instance, a chatbot that can respond to employee questions on their healthcare coverage. Hundreds of pages of dense healthcare coverage documentation can be split into chunks, converted into embeddings vectors, and searched based on vector similarity. The resulting documents can then be summarized for employees using another large language model (LLM). [Semantic Q&A Example](https://techcommunity.microsoft.com/t5/azure-developer-community-blog/vector-similarity-search-with-azure-cache-for-redis-enterprise/ba-p/3822059)
56+
- **Document Retrieval**. Use the deeper semantic understanding of text provided by LLMs to provide a richer document search experience where traditional keyword-based search falls short. [Document Retrieval Example](https://github.com/RedisVentures/redis-arXiv-search)
57+
- **Product Recommendation**. Find similar products or services to recommend based on past user activities, like search history or previous purchases. [Product Recommendation Example](https://github.com/RedisVentures/LLM-Recommender)
58+
- **Visual Search**. Search for products that look similar to a picture taken by a user or a picture of another product. [Visual Search Example](https://github.com/RedisVentures/redis-product-search)
6859

69-
You could rename this to "key scenarios". When does it make sense to use Redis
70-
in this capacity -- as a vector database?
60+
## Why choose Azure Cashe for Redis for storing and searching vectors?
7161

72-
### How does it work?
73-
74-
This is where you could talk about requirements and some light discussion of the
75-
components in Redis that are employed that provide this functionality. Discuss
76-
the "under the hood" architecture to help provide insights and understanding,
77-
including a discussion of limitations and why a given limitation exists.
62+
Azure Cache for Redis can be used very 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 is extremely fast because it runs in-memory, unlike other vector databases that run on-disk. This can be very 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. The Redis LangChain integration, for example, will automatically generate index schema for metadata passed in when using Redis as a vectorstore. This makes it much easier to filter results based on the metadata.
7863

64+
Redis has access to a wide range of search capabilities through the [RediSearch module](cache-redis-modules#redisearch), which is available in the Enterprise tier of Azure Cache for Redis. Vector search capabilities include:
65+
- `Euclidean`, `Cosine`, and `Internal Product` search distance metrics.
66+
- Support for both KNN (using `FLAT`) and ANN (using Hierarchical Navigable Small World or `HNSW`) indexing methods.
67+
- Hybrid filtering with [powerful query features](https://redis.io/docs/interact/search-and-query/).
7968

80-
### Why choose Azure Cashe for Redis for storing and searching for vectors?
69+
Because Redis is so popular, it is often already used in applications for caching or session store applications. Redis can often be an economical choice because it can pull double-duty by handling typical caching roles while simultaneously handling vector search applications.
8170

8271
What are some of the benefits of using Redis for vectors? You named off a few
8372
the other day ...

0 commit comments

Comments
 (0)