Search Memory

nowledge-co/community/nowledge-mem-step-code/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-step-code/skills/search-memory提交1f4d7eb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架