Skip to content

Commit 2f33be8

Browse files
Revise LLM cache guide with new title and content
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.
1 parent 00adcba commit 2f33be8

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

content/develop/ai/redisvl/0.8.2/user_guide/llmcache.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
---
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.
2+
linkTitle: LLM caching
3+
title: LLM Caching
4+
aliases:
5+
- /integrate/redisvl/user_guide/03_llmcache
46
weight: 03
5-
url: '/develop/ai/redisvl/0.8.2/user_guide/llmcache/'
67
---
78

89

10+
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.
25+
926

1027
```python
1128
import os

0 commit comments

Comments
 (0)