调用本地检索脚本 /opt/memory/bm25_rerank_search.py,返回精确的上下文片段。
rank_bm25pip install rank-bm25 --break-system-packagesbash
python3 /opt/memory/bm25_rerank_search.py search <查询词>
bash
python3 /opt/memory/bm25_rerank_search.py reindex
每条结果包含: [score] path:chunk_id + 内容片段 (最多显示前200字符)