Auto-sync: 2026-04-17 22:17
This commit is contained in:
52
wiki/sources/semantic-memory-search.md
Normal file
52
wiki/sources/semantic-memory-search.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: "Semantic Memory Search"
|
||||
type: source
|
||||
tags: []
|
||||
date: 2026-04-17
|
||||
---
|
||||
|
||||
## Source File
|
||||
- [[raw/Agent/usecases/semantic-memory-search.md]]
|
||||
|
||||
## Summary
|
||||
- 核心主题:为 OpenClaw 的 markdown 内存系统添加向量语义搜索能力
|
||||
- 问题域:OpenClaw 内存文件无法按语义搜索,仅支持关键词匹配和全文加载
|
||||
- 方法/机制:使用 memsearch 库 + Milvus 向量数据库实现语义搜索,结合 BM25 全文搜索和密集向量,通过 RRF 排序reranking
|
||||
- 结论/价值:可以通过自然语义"我们选了什么缓存方案?"找到相关内容,无需关键词匹配
|
||||
|
||||
## Key Claims
|
||||
- OpenClaw 的内存以 markdown 文件存储,便于移植和人类阅读,但无搜索功能
|
||||
- 语义搜索通过向量嵌入实现,"what caching solution did we pick?"能找到相关内容,即使不含"caching"一词
|
||||
- SHA-256 内容哈希确保未更改文件永不重新嵌入,零 API 浪费
|
||||
- 混合搜索结合语义相似度(密集向量)与关键词匹配(BM25),通过倒数排名融合(RRF)reranking
|
||||
|
||||
## Key Quotes
|
||||
> "Index all your OpenClaw markdown memory files into a vector database (Milvus) with a single command" — memsearch 核心功能说明
|
||||
|
||||
> "SHA-256 content hashing means unchanged files are never re-embedded — zero wasted API calls" — 成本优化机制
|
||||
|
||||
> "Hybrid search (dense vectors + BM25 full-text) with RRF reranking for best results" — 搜索质量保障
|
||||
|
||||
## Key Concepts
|
||||
- [[语义搜索]]:通过向量嵌入实现按语义相似度而非关键词匹配搜索
|
||||
- [[向量嵌入]]:将文本转换为数值向量,用于语义相似度计算
|
||||
- [[BM25]]:基于关键词的全文搜索算法
|
||||
- [[RRF(Reranking)]]:倒数排名融合,将多路搜索结果合并排序
|
||||
|
||||
## Key Entities
|
||||
- [[memsearch]]:GitHub 开源项目,Zilliz Tech 开发,提供向量搜索 CLI/库
|
||||
- [[Milvus]]:开源向量数据库,memsearch 的后端存储
|
||||
- [[OpenClaw]]:AI Agent 管理工具,其内存系统触发此需求
|
||||
|
||||
## Connections
|
||||
- [[memsearch]] ← powers ← [[语义搜索]]
|
||||
- [[Milvus]] ← stores ← [[向量嵌入]]
|
||||
- [[OpenClaw]] ← uses ← [[Semantic-Memory-Search]]
|
||||
- [[语义搜索]] ← combines ← [[向量嵌入]]
|
||||
- [[语义搜索]] ← combines ← [[BM25]]
|
||||
|
||||
## Contradictions
|
||||
- 与 [[Second-Brain]] 冲突:
|
||||
- 冲突点:两者都解决"笔记搜索"需求,但方案不同
|
||||
- 当前观点:memsearch 通过向量搜索实现语义检索
|
||||
- 对方观点:Second-Brain 通过 Next.js 搜索界面实现检索,各有优势
|
||||
Reference in New Issue
Block a user