openclaw - 💡(How to fix) Fix [Feature]: expose QMD no-rerank for memory.qmd query mode [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#61834Fetched 2026-04-08 02:53:50
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Participants
Timeline (top)
subscribed ×1

Expose QMD 2.1.0's no-rerank capability from OpenClaw's QMD memory backend so users can run searchMode: "query" without the reranking step.

Root Cause

Expose QMD 2.1.0's no-rerank capability from OpenClaw's QMD memory backend so users can run searchMode: "query" without the reranking step.

Fix Action

Fix / Workaround

  • Use memory.qmd.searchMode = "search": faster, but loses hybrid query behavior
  • Keep using searchMode = "query": better recall, but slower than necessary when reranking is not needed
  • Call qmd query --no-rerank manually outside OpenClaw: workable as a local workaround, but bypasses the normal memory_search path

Code Example

{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "searchMode": "query",
      "noRerank": true
    }
  }
}

---

{
  "query": "QMD 2.1.0 rerank false",
  "maxResults": 5,
  "rerank": false
}
RAW_BUFFERClick to expand / collapse

Summary

Expose QMD 2.1.0's no-rerank capability from OpenClaw's QMD memory backend so users can run searchMode: "query" without the reranking step.

Problem to solve

OpenClaw already supports:

  • memory.backend = "qmd"
  • memory.qmd.searchMode = "query" | "search" | "vsearch"

But when searchMode: "query" is used, there is currently no config or tool-level way to disable reranking.

Upstream QMD 2.1.0 added:

  • CLI: qmd query --no-rerank
  • MCP query tool: rerank: false

So OpenClaw currently cannot expose a useful middle ground between:

  • search = fast but BM25-only
  • query = best recall but slower
  • desired = query without rerank, for faster hybrid results

Proposed solution

Expose the rerank toggle in one or both of these forms.

Option A: config-level

{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "searchMode": "query",
      "noRerank": true
    }
  }
}

Expected behavior:

  • ignore when searchMode !== "query"
  • in direct CLI mode, append --no-rerank
  • in MCP-backed query mode, pass rerank: false if supported

Option B: request-level

Expose a request-level toggle on memory_search, for example:

{
  "query": "QMD 2.1.0 rerank false",
  "maxResults": 5,
  "rerank": false
}

This would be more flexible than config-only support.

Alternatives considered

  • Use memory.qmd.searchMode = "search": faster, but loses hybrid query behavior
  • Keep using searchMode = "query": better recall, but slower than necessary when reranking is not needed
  • Call qmd query --no-rerank manually outside OpenClaw: workable as a local workaround, but bypasses the normal memory_search path

Impact

Affected: users running memory.backend = "qmd", especially on CPU-only or latency-sensitive systems
Severity: Medium
Frequency: any interactive use of searchMode: "query"
Consequence: users must choose between BM25-only search and full reranked query mode, with no supported middle ground even though upstream QMD now provides one

Evidence/examples

QMD 2.1.0 release notes: https://github.com/tobi/qmd/releases/tag/v2.1.0

Relevant excerpt:

--no-rerank flag skips the reranking step in qmd query
useful when you want fast results or don't have a GPU
also exposed as rerank: false on the MCP query tool

In local verification, qmd query --no-rerank worked as expected and provided a useful speed/quality tradeoff compared with full reranked query mode.

Additional information

This is separate from warm-process / MCP-caching work. Even if QMD is kept warm through MCP, a rerank toggle is still useful as an explicit latency vs quality control.

extent analysis

TL;DR

To expose QMD 2.1.0's no-rerank capability, add a noRerank toggle to OpenClaw's QMD memory backend configuration.

Guidance

  • Add a noRerank option to the memory.qmd configuration, allowing users to disable reranking when searchMode is set to "query".
  • Implement the noRerank toggle by appending --no-rerank to the qmd query command in direct CLI mode, and passing rerank: false in MCP-backed query mode.
  • Consider adding a request-level toggle for noRerank to provide more flexibility, as an alternative to a config-level toggle.
  • Verify the implementation by testing the noRerank toggle with different searchMode values and measuring the performance impact.

Example

{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "searchMode": "query",
      "noRerank": true
    }
  }
}

Notes

The noRerank toggle should be ignored when searchMode is not set to "query", to maintain backwards compatibility.

Recommendation

Apply the workaround by adding the noRerank toggle to the OpenClaw configuration, as it provides a useful middle ground between fast but BM25-only search and slower but more accurate query mode.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING