translation/translated/documents/course/03-agent-memory/17-testing-semantic-recall.md

25 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

# 测试语义回忆
让我们测试智能体的语义回忆能力:
1. 使用上述配置更新您的智能体代码
2. 使用 `npm run dev` 重启开发服务器
3. 在 http://localhost:4111/ 打开 playground
4. 选择您的 "MemoryAgent"
5. 进行包含多个话题的对话:
- "Let's talk about my work project first"
- "I'm working on a new website for a client"
- "The deadline is in two weeks"
- "Now let's switch topics. I'm also planning a vacation"
- "I'll be visiting Japan next month"
- "I'll be staying in Tokyo and Kyoto"
- "Let's talk about something else. I'm learning to play guitar"
- "I practice for 30 minutes every day"
- "Can you remind me about my work project deadline?"
您的智能体应该能够回忆项目截止日期信息,即使它是在几条消息前提到的,对话已经转向其他话题。
此测试展示了语义回忆如何允许您的智能体从对话早期找到并检索相关信息,即使该信息不再包含在最近的对话历史记录中。
尝试询问您之前讨论的其他话题,看看您的智能体检索不同信息的能力。您还可以尝试不同的 `topK``messageRange` 参数值,看看它们如何影响您的智能体回忆信息的能力。