← Back to Skills Marketplace
71
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install bm25-rerank-memory
Description
本地 BM25 + Embedding + Rerank 混合记忆检索。检索 /root/workspace/Remember 下的 Markdown 记忆文件,支持关键词+语义+重排。每次记忆搜索用它替代 mem0。
README (SKILL.md)
BM25 Rerank Memory Search
调用本地检索脚本 /opt/memory/bm25_rerank_search.py,返回精确的上下文片段。
依赖
- BM25:
rank_bm25 - 向量+重排: SiliconFlow API (BAAI/bge-m3 + BAAI/bge-reranker-v2-m3)
- 安装:
pip install rank-bm25 --break-system-packages
使用方式
搜索记忆
python3 /opt/memory/bm25_rerank_search.py search \x3C查询词>
重建索引(记忆文件变更后需执行)
python3 /opt/memory/bm25_rerank_search.py reindex
检索逻辑
- BM25 关键词匹配 → 候选集 A
- BGE-M3 向量相似度 → 候选集 B
- A ∪ B 合并
- BGE-Reranker-v2-m3 重排 → 最终结果
输出格式
每条结果包含: [score] path:chunk_id + 内容片段 (最多显示前200字符)
Usage Guidance
This skill expects and will execute a local script (/opt/memory/bm25_rerank_search.py) and read files under /root/workspace/Remember — verify those files/scripts are trustworthy before using. Confirm how the SiliconFlow/BAAI embedding and reranker APIs are authenticated (there are no env vars declared); if API keys are needed, ensure they are supplied securely and not exposed. Do not run the suggested `pip install ... --break-system-packages`; instead install dependencies in a virtualenv or container. If you cannot validate the /opt script or the origin of any network calls, run this in an isolated environment or avoid installing/using it.
Capability Analysis
Type: OpenClaw Skill
Name: bm25-rerank-memory
Version: 1.0.0
The skill bundle is classified as suspicious because its core logic resides in an external script (/opt/memory/bm25_rerank_search.py) that is not included in the package, making the actual execution behavior unverifiable. Furthermore, SKILL.md contains prompt-injection-style instructions directing the agent to bypass standard memory systems (mem0) in favor of this unverified external script, which could be used to redirect or manipulate the agent's context and data retrieval.
Capability Assessment
Purpose & Capability
The skill claims to perform local BM25+embedding+rerank retrieval over /root/workspace/Remember, which matches the provided instructions to call a local script. However, the SKILL.md also relies on SiliconFlow / BAAI models for embeddings/reranking (networked services) but declares no credentials or network endpoints; that is an unexplained capability mismatch.
Instruction Scope
Runtime instructions tell the agent to execute /opt/memory/bm25_rerank_search.py and read/search markdown files under /root/workspace/Remember. Because the skill is instruction-only and provides no code, it assumes those files and scripts exist and will be executed/read — this gives the skill the ability to surface arbitrary local file contents and to run arbitrary code in /opt if present.
Install Mechanism
There is no formal install spec, but the SKILL.md recommends running `pip install rank-bm25 --break-system-packages`. That flag is invasive (can circumvent OS package manager protections) and is risky to run system-wide; even though rank-bm25 is reasonable for BM25, recommending --break-system-packages is disproportionate and potentially harmful.
Credentials
The instructions depend on external embedding/reranker services (SiliconFlow / BAAI models) but the skill declares no required environment variables or credentials. Either credentials are expected to be configured out-of-band (not declared) or the skill will fail/attempt unknown network access — both are problematic. It also references system paths (/opt and /root) without declaring config path requirements.
Persistence & Privilege
The skill does not request always:true or other elevated platform privileges. It is user-invocable and can be invoked autonomously per platform default, which is normal. The main risk is execution of a local script and reading /root files (described above), not elevated registration.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install bm25-rerank-memory - After installation, invoke the skill by name or use
/bm25-rerank-memory - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of bm25-rerank-memory skill.
- Provides local memory retrieval using BM25, Embedding (BGE-M3), and reranking.
- Searches Markdown memory files under /root/workspace/Remember.
- Enables hybrid retrieval: keyword (BM25), semantic (BGE-M3), and rerank (BGE-Reranker-v2-m3).
- Replaces mem0 for each memory search.
- Includes command-line scripts for searching and reindexing memory files.
Metadata
Frequently Asked Questions
What is Bm25 Rerank Memory?
本地 BM25 + Embedding + Rerank 混合记忆检索。检索 /root/workspace/Remember 下的 Markdown 记忆文件,支持关键词+语义+重排。每次记忆搜索用它替代 mem0。 It is an AI Agent Skill for Claude Code / OpenClaw, with 71 downloads so far.
How do I install Bm25 Rerank Memory?
Run "/install bm25-rerank-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Bm25 Rerank Memory free?
Yes, Bm25 Rerank Memory is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Bm25 Rerank Memory support?
Bm25 Rerank Memory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Bm25 Rerank Memory?
It is built and maintained by CkQiao (@ckqiao); the current version is v1.0.0.
More Skills