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: src/vss/personalized_recommendations.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@ This tutorial demonstrates how to build an AI assistant's memory system with Red
2
2
3
3
**Note**: Requires [Redis 8](https://hub.docker.com/_/redis/tags) for `HSETEX`, which adds per-field TTL for hashes - ideal for rate limiting to ensure fair resource usage.
4
4
5
-
### Architecture Overview
5
+
### Architecture overview
6
6
| Layer | Description | Data type |
7
7
| ---------- | ---------- | ---------- |
8
8
|`Session History`|`Recent conversation context`| List |
|`User Memory`|`Long-term facts and preferences`| Hash |
11
11
12
-
### Session History
12
+
### Session history
13
13
AI assistants need context from previous messages to provide coherent responses. Without conversation history, each interaction would be isolated. Redis lists are simple, ordered, and efficient for storing chat transcripts.
14
14
15
15
```redis:[run_confirmation=true] Store conversation history
AI assistants become more helpful when they remember user preferences, schedules, or relevant facts. This persistent memory enables personalization over time.
97
97
98
98
```redis:[run_confirmation=true] Store User Preferences
@@ -116,7 +116,7 @@ HSET user:alice:personal:002 user_id "alice" content "has a golden retriever nam
116
116
HSET user:alice:personal:003 user_id "alice" content "married to Bob, two kids Sarah (8) and Tom (5)" importance 9 timestamp 1717935000 embedding "\x40\x60\x00\x00\x40\x00\x00\x00\x3f\x40\x00\x00\x40\x80\x00\x00\x40\x20\x00\x00\x3f\x80\x00\x00\x40\x40\x00\x00\x3f\x00\x00\x00"
117
117
```
118
118
119
-
### Vector Search: Semantic Memory Recall
119
+
### Vector search: semantic memory recall
120
120
Semantic search allows AI to retrieve relevant memory even when exact keywords don't match. For example, a query about "meetings" might return facts about "morning appointments."
121
121
122
122
Indexing persistent memory (User Memory) for semantically meaningful search.
@@ -165,7 +165,7 @@ FT.SEARCH idx:preferences
165
165
DIALECT 2
166
166
```
167
167
168
-
### Memory State Monitoring
168
+
### Memory state monitoring
169
169
Understanding what's stored in memory helps debug issues, optimize performance, and ensure data quality. It's also essential for user privacy compliance.
170
170
```redis:[run_confirmation=false] Monitor user sessions
0 commit comments