Search Memory

nowledge-co/community/nowledge-mem-omp-plugin/skills/search-memory

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0无许可证收录于 2026年10月9日更新于 2026年10月9日

Search your knowledge base when past decisions, preferences, or procedures would improve the response. Covers memories from every AI tool you use.

仅含说明AI & Agents
AI 生成的概览

指导智能体在回答前使用 nmem 命令行工具检索个人记忆与历史对话记录。

功能
该技能告诉智能体何时以及如何查询记忆系统。它说明了应当检索的强信号与情境信号,区分检索提炼后的记忆与历史对话线程,介绍关键命令参数,并说明如何解读相关度分数。同时列出了不应检索的情形。
适用场景
当请求提及以往工作、延续某个已命名的项目、询问此前决策的理由、与过去的修复相似,或涉及反复出现的主题时使用。也适用于复杂调试、架构讨论以及可能存在既定约定的领域性问题。
运行要求
需要安装并可调用 nmem 命令行工具,并能访问用户的记忆与对话线程存储。根据该存储的托管方式,可能需要网络访问。该技能不附带脚本,仅为说明文档。

Search Memory

When to Search

Strong signals:

  • References prior work: "the approach we used", "like last time"
  • Resumes a named feature, project, or migration
  • Review, regression, release, docs-alignment, or connector-behavior task
  • Debugging resembles a past fix or known root cause
  • Asks for rationale: "why did we choose X?"
  • Recurring theme discussed in earlier sessions

Contextual signals:

  • Complex debugging (may match past root causes)
  • Architecture discussion (choices may be documented)
  • Domain-specific question (conventions likely stored)
  • User mentions a timeframe: "last week", "back in January"

Skip when:

  • Fundamentally new topic with no prior context
  • Generic syntax or language questions
  • User explicitly requests a fresh perspective

Retrieval Routing

1. Search memories (distilled knowledge)

bash
nmem --json m search "3-7 word semantic query"

If the runtime already knows the active project or agent lane, add --space "<space name>".

2. Search threads (past conversations)

When the user asks about a prior session, discussion, or exact exchange:

bash
nmem --json t search "query" --limit 5

3. Progressive thread inspection

If a thread looks relevant, load it incrementally:

bash
nmem --json t show <thread_id> --limit 8 --offset 0 --content-limit 1200

Increase --offset only when more messages are actually needed.

For continuation-heavy engineering work, search near the start of the task rather than waiting for an explicit recall request.

Key Flags

FlagPurpose
--mode deepConceptual or weak first-pass results
-l labelFilter by label (multiple uses AND logic)
-n limitLimit number of results (default: 10)
--importance MINMinimum importance score (0.0-1.0)
--time RANGETime filter: today, week, month, year

Examples

bash
# Semantic search with importance filternmem --json m search "database optimization" --importance 0.7
# Filter by labelsnmem --json m search "React patterns" -l frontend -l react
# Recent memories onlynmem --json m search "deployment fix" --time week -n 5
# Deep mode for conceptual queriesnmem --json m search "auth architecture rationale" --mode deep

Interpreting Results

Scores: 0.6-1.0 direct match. 0.3-0.6 related. Below 0.3, skip.

Found: Synthesize and cite when helpful. None: State clearly. Suggest distilling if the current discussion is valuable.

When NOT to Search

Do not search for every message. Search when there is a reasonable expectation that prior knowledge exists and would improve the response. One well-targeted search is better than three speculative ones.

Links

来源与署名

来源:nowledge-co/community位于nowledge-mem-omp-plugin/skills/search-memory提交1f4d7eb

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架