Skip to content

Commit 1ade43d

Browse files
committed
Update semantic search to agentic search
1 parent d3b4175 commit 1ade43d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

examples/concepts/memory/05-memory-search-semantic.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Semantic Memory Search
2+
title: Agentic Memory Search
33
---
44

55
## Code
66

7-
```python cookbook/agent_concepts/memory/05_memory_search_semantic.py
7+
```python cookbook/agent_concepts/memory/05_memory_search_agentic.py
88
from agno.memory.v2.memory import Memory, UserMemory
99
from agno.models.google.gemini import Gemini
1010

@@ -27,7 +27,7 @@ memory.add_user_memory(
2727
memories = memory.search_user_memories(
2828
user_id=john_doe_id,
2929
query="What does the user like to do on weekends?",
30-
retrieval_method="semantic",
30+
retrieval_method="agentic",
3131
)
3232
print("John Doe's found memories:")
3333
for i, m in enumerate(memories):
@@ -54,11 +54,11 @@ for i, m in enumerate(memories):
5454
<Step title="Run Example">
5555
<CodeGroup>
5656
```bash Mac
57-
python cookbook/agent_concepts/memory/05_memory_search_semantic.py
57+
python cookbook/agent_concepts/memory/05_memory_search_agentic.py
5858
```
5959

6060
```bash Windows
61-
python cookbook/agent_concepts/memory/05_memory_search_semantic.py
61+
python cookbook/agent_concepts/memory/05_memory_search_agentic.py
6262
```
6363
</CodeGroup>
6464
</Step>

memory/introduction.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ for i, m in enumerate(memories):
198198
print(f"{i}: {m.memory}")
199199
```
200200

201-
### Semantic Search
201+
### Agentic Search
202202

203-
Semantic search allows you to find memories based on meaning rather than exact keyword matches. This is particularly useful for retrieving contextually relevant information:
203+
Agentic search allows you to find memories based on meaning rather than exact keyword matches. This is particularly useful for retrieving contextually relevant information:
204204

205205
```python
206206
from agno.memory.v2.memory import Memory, UserMemory
207207
from agno.models.google.gemini import Gemini
208208

209-
# Initialize memory with a model for semantic search
209+
# Initialize memory with a model for agentic search
210210
memory = Memory(model=Gemini(id="gemini-2.0-flash-exp"))
211211

212212
john_doe_id = "[email protected]"
@@ -222,18 +222,18 @@ memory.add_user_memory(
222222
user_id=john_doe_id,
223223
)
224224

225-
# Search for memories semantically related to the query
225+
# Search for memories related to the query
226226
memories = memory.search_user_memories(
227227
user_id=john_doe_id,
228228
query="What does the user like to do on weekends?",
229-
retrieval_method="semantic",
229+
retrieval_method="agentic",
230230
)
231231
print("John Doe's found memories:")
232232
for i, m in enumerate(memories):
233233
print(f"{i}: {m.memory}")
234234
```
235235

236-
With semantic search, the model understands the intent behind your query and returns the most relevant memories, even if they don't contain the exact keywords from your search.
236+
With agentic search, the model understands the intent behind your query and returns the most relevant memories, even if they don't contain the exact keywords from your search.
237237

238238

239239
## Developer Resources

0 commit comments

Comments
 (0)