← 返回
效率工具 Key 中文

LanceDB Hybrid Search Memory Plugin

LanceDB long-term memory plugin with BM25 + vector hybrid search (RRF or linear reranking).
LanceDB 长期记忆插件,采用 BM25 与向量混合搜索(RRF 或线性重排序)
joeykrug
效率工具 clawhub v1.2.1 2 版本 99688.4 Key: 需要
★ 2
Stars
📥 3,159
下载
💾 85
安装
2
版本
#latest

概述

LanceDB Hybrid Search (Memory Plugin)

This skill packages a drop-in OpenClaw memory plugin that adds hybrid search to LanceDB memory:

  • Vector search (semantic)
  • BM25 full-text search (exact terms)
  • Configurable reranking:
  • rrf (Reciprocal Rank Fusion, recommended)
  • linear (weighted combination)

It is based on (and credits) OpenClaw PR openclaw/openclaw#7636.

What you get

A local plugin (extension) located at:

  • plugin/overrides the built-in plugin id memory-lancedb (adds hybrid search)

Once enabled, it provides the same tools as the bundled LanceDB memory plugin:

  • memory_store
  • memory_recall
  • memory_forget

…but memory_recall/auto-recall/forget now use hybrid search when enabled.

Install / Enable

1) Ensure the skill folder exists (ClawHub install puts it under your workspace):

  • ~/.openclaw/workspace/skills/memory-lancedb-hybrid/plugin

2) Install the plugin dependencies (once):

cd ~/.openclaw/workspace/skills/memory-lancedb-hybrid/plugin
npm install --omit=dev

3) Add the plugin to OpenClaw’s plugin load paths.

This plugin keeps the id memory-lancedb, so it will override the bundled memory-lancedb extension when discovered via plugins.load.paths (higher precedence than bundled).

Edit ~/.openclaw/openclaw.json:

{
  plugins: {
    load: {
      // Point at the plugin directory inside this skill
      paths: ["~/.openclaw/workspace/skills/memory-lancedb-hybrid/plugin"]
    },

    // Ensure the memory slot points at LanceDB memory
    slots: {
      memory: "memory-lancedb"
    },

    // Configure LanceDB memory (this override adds the `hybrid` config block)
    entries: {
      "memory-lancedb": {
        enabled: true,
        config: {
          embedding: {
            apiKey: "${OPENAI_API_KEY}",
            model: "text-embedding-3-small"
          },

          // Optional
          dbPath: "~/.openclaw/memory/lancedb",

          // Optional
          autoCapture: true,
          autoRecall: true,

          // Hybrid search options
          hybrid: {
            enabled: true,
            reranker: "rrf"

            // If using reranker: "linear", you can also set:
            // vectorWeight: 0.7,
            // textWeight: 0.3,
          }
        }
      }
    }
  }
}

4) Restart the Gateway.

Hybrid search needs an FTS index on the text column; the plugin will attempt to create it automatically. If FTS setup fails for any reason, the plugin logs a debug message and falls back to vector-only search.

Config reference

All config lives under plugins.entries.memory-lancedb.config.

  • hybrid.enabled (boolean, default true)
  • hybrid.reranker (rrf | linear, default rrf)
  • hybrid.vectorWeight (number 0–1, default 0.7, only used for linear)
  • hybrid.textWeight (number 0–1, default 0.3, only used for linear)

Notes / troubleshooting

  • This plugin does not modify OpenClaw’s install on disk; it overrides the bundled memory-lancedb at runtime (remove plugins.load.paths to revert).
  • If you already have LanceDB memory data on disk, you can keep using the same dbPath.
  • If you see no hybrid effect, make sure hybrid.enabled is true and that the FTS index was created (check Gateway logs).

Files

  • plugin/index.ts – plugin implementation (hybrid search)
  • plugin/config.ts – config parsing + UI hints
  • plugin/openclaw.plugin.json – manifest + JSON Schema (used for strict config validation)

版本历史

共 2 个版本

  • v1.2.1 当前
    2026-03-28 19:21 安全 安全
  • v1.2.0
    2026-03-11 09:37

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,134
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,750
productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 430 📥 103,710