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
Updated the title and linkTitle for the LLM caching guide. Added a description of the notebook's purpose and key features, along with prerequisites for using RedisVL.
Copy file name to clipboardExpand all lines: content/develop/ai/redisvl/0.8.2/user_guide/llmcache.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,28 @@
1
1
---
2
-
linkTitle: First, we will import [openai](https://platform.openai.com) to use their API for responding to user prompts. we will also create a simple `ask_openai` helper method to assist.
3
-
title: First, we will import [OpenAI](https://platform.openai.com) to use their API for responding to user prompts. We will also create a simple `ask_openai` helper method to assist.
This notebook demonstrates how to use RedisVL's `SemanticCache` to cache LLM responses based on semantic similarity. Semantic caching can significantly reduce API costs and latency by retrieving cached responses for semantically similar prompts instead of making redundant API calls.
11
+
12
+
Key features covered:
13
+
- Basic cache operations (store, check, clear)
14
+
- Customizing semantic similarity thresholds
15
+
- TTL policies for cache expiration
16
+
- Performance benchmarking
17
+
- Access controls with tags and filters for multi-user scenarios
18
+
19
+
Prerequisites:
20
+
- Ensure `redisvl` is installed in your Python environment
21
+
- Have a running instance of [Redis Stack](https://redis.io/docs/install/install-stack/) or [Redis Cloud](https://redis.io/cloud)
22
+
- OpenAI API key for the examples
23
+
24
+
First, we will import [OpenAI](https://platform.openai.com) to use their API for responding to user prompts. We will also create a simple `ask_openai` helper method to assist.
0 commit comments