Loading...
Loading...
Compare original and translation side by side
| Feature | Command | When to Use |
|---|---|---|
| Hybrid search | | DEFAULT: combines BM25 + vector + rerank. Best for most queries |
| Structured query | | When you need precise keyword AND semantic results |
| BM25 keyword | | Exact term/filename/config key lookup |
| Vector similarity | | Conceptual/fuzzy similarity (e.g., "how to deploy") |
| Get document | | Read specific lines after search identifies a file |
| Multi-get | | Batch fetch multiple files (e.g., all reports) |
| Collection filter | | Restrict search to one collection for precision |
| Full output | | Get complete document content instead of snippets |
| JSON output | | Machine-readable output for scripts |
| List files | | Browse what's indexed in a collection |
| Status | | Health check: pending embeds, collection sizes |
| Update index | | Re-index after file changes |
| Embed vectors | | Generate embeddings for new/changed files |
| Context notes | | View collection descriptions/usage hints |
| MCP server | | Expose as MCP tool for IDE/agent integration |
| 功能 | 命令 | 适用场景 |
|---|---|---|
| 混合搜索 | | 默认选项:结合BM25 + 向量 + 重排序。适用于大多数查询 |
| 结构化查询 | | 当你需要同时获取精确关键词和语义匹配结果时使用 |
| BM25关键词搜索 | | 精确术语/文件名/配置键查找 |
| 向量相似度搜索 | | 概念性/模糊相似度匹配(例如:"how to deploy") |
| 获取文档内容 | | 搜索定位到文件后,读取指定行内容 |
| 批量获取文档 | | 批量获取多个文件(例如:所有报告) |
| 集合过滤 | | 将搜索范围限制在单个集合以提高精度 |
| 完整输出 | | 获取完整文档内容而非片段 |
| JSON格式输出 | | 生成脚本可读取的机器友好型输出 |
| 列出文件 | | 浏览指定集合中已索引的文件 |
| 状态检查 | | 健康检查:待处理嵌入任务、集合大小 |
| 更新索引 | | 文件变更后重新索引 |
| 生成向量嵌入 | | 为新增/变更文件生成向量嵌入 |
| 上下文说明 | | 查看集合描述/使用提示 |
| MCP服务器 | | 作为MCP工具暴露,用于IDE/Agent集成 |
| Collection | Content | Use For |
|---|---|---|
| | Memory, docs, reports, runbooks |
| | Daily work logs |
| | Agent configs, models, auth |
| | OpenClaw system config |
| | Project PRDs, deliverables |
| | All skill documentation |
| | Research & review reports |
| 集合 | 内容 | 用途 |
|---|---|---|
| | 记忆内容、文档、报告、运行手册 |
| | 每日工作日志 |
| | Agent配置、模型、认证信息 |
| | OpenClaw系统配置 |
| | 项目PRD、交付件 |
| | 所有Skill文档 |
| | 研究与评审报告 |
Input: user question Q
Step 1 — CLASSIFY
A = "prior decisions / todos / people / dates / what happened"
B = "system config / how-to / skill usage / architecture"
C = "project status / deliverables / PRD"
D = "external facts / live data" (falls through to web)
Step 2 — RETRIEVE (execute ALL applicable, not just one)
if A:
→ qmd query -c daily-memory "<Q>" -n 5
→ qmd query -c clawd-memory "<Q>" -n 5
→ Also check ~/clawd/MEMORY.md directly for TODOs/decisions
if B:
→ qmd query -c openclaw-config "<Q>" -n 5
→ qmd query -c skills "<Q>" -n 5
→ qmd query -c clawd-memory "<Q>" -n 3 (for runbooks/docs)
if C:
→ qmd query -c projects "<Q>" -n 5
→ qmd query -c reports "<Q>" -n 3
if D:
→ qmd query "<Q>" -n 5 (all collections, no filter)
→ If low recall → web_fetch / browser
Step 3 — CITE
Every answer MUST include 1-3 source citations:
- File path: `~/clawd/docs/memory-router.md:15`
- QMD URI: `qmd://skills/geo-agent/SKILL.md`
- Or: "Source: qmd query -c projects 'content factory status'"Input: user question Q
Step 1 — CLASSIFY
A = "prior decisions / todos / people / dates / what happened"
B = "system config / how-to / skill usage / architecture"
C = "project status / deliverables / PRD"
D = "external facts / live data" (falls through to web)
Step 2 — RETRIEVE (execute ALL applicable, not just one)
if A:
→ qmd query -c daily-memory "<Q>" -n 5
→ qmd query -c clawd-memory "<Q>" -n 5
→ Also check ~/clawd/MEMORY.md directly for TODOs/decisions
if B:
→ qmd query -c openclaw-config "<Q>" -n 5
→ qmd query -c skills "<Q>" -n 5
→ qmd query -c clawd-memory "<Q>" -n 3 (for runbooks/docs)
if C:
→ qmd query -c projects "<Q>" -n 5
→ qmd query -c reports "<Q>" -n 3
if D:
→ qmd query "<Q>" -n 5 (all collections, no filter)
→ If low recall → web_fetch / browser
Step 3 — CITE
Every answer MUST include 1-3 source citations:
- File path: `~/clawd/docs/memory-router.md:15`
- QMD URI: `qmd://skills/geo-agent/SKILL.md`
- Or: "Source: qmd query -c projects 'content factory status'"undefinedundefinedqmd query "<问题>"--collection openclaw-config|projects|skills|reports|clawd-memory~/clawd/memory/YYYY-MM-DD.md~/clawd/MEMORY.mdqmd://...undefinedqmd query "<问题>"--collection openclaw-config|projects|skills|reports|clawd-memory~/clawd/memory/YYYY-MM-DD.md~/clawd/MEMORY.mdqmd://...undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined| Problem | Solution |
|---|---|
| Check if node-llama-cpp is compiling (first run). Wait ~10min. |
| CUDA errors | Normal on CPU-only servers. QMD auto-falls back to CPU. |
| Ollama not found | QMD uses node-llama-cpp, NOT Ollama. Ignore Ollama references. |
| Low recall | Try |
| Missing files | Run |
| 问题 | 解决方案 |
|---|---|
| 检查node-llama-cpp是否正在编译(首次运行)。等待约10分钟。 |
| CUDA错误 | 在仅支持CPU的服务器上属于正常情况。QMD会自动回退至CPU运行。 |
| Ollama未找到 | QMD使用node-llama-cpp,而非Ollama。忽略Ollama相关提示。 |
| 召回率低 | 尝试使用 |
| 文件缺失 | 运行 |
#!/bin/bash#!/bin/bash
---
Last updated: 2026-03-03
Maintainer: 小a (CEO)
---
最后更新: 2026-03-03
维护者: 小a (CEO)