SuperAPI AI Directory

ie-retrieve-memory

General & other

View repository

Updated 10-16 09:52

About this skill

Memory Layer: Historical Knowledge Retrieval

This skill is responsible for retrieving historical knowledge relevant to the current context from the user's WPS note repository. This is the bottom layer of the Inspiration Engine's three-layer architecture, providing raw material for upper-layer reasoning and insights.

Applicable Scenarios

Use when the user needs to retrieve past note content. Typical scenarios include:

  • The user wants to know whether they have written about a similar topic in the past while writing a new note
  • The user wants to review the history of a project or topic
  • Invoked by the ie-engine orchestrator as the first step of the inspiration generation pipeline
  • The user explicitly asks to "find previous notes" or "recall previous ideas"

Inapplicable Scenarios

The following scenarios should not use this skill (to avoid false triggers):

  • Searching code files or project files (use file search tools)
  • Looking up web content (use browser tools)
  • Creating or editing note content (use the wpsnote tool directly)
  • General knowledge Q&A (just answer directly)

Retrieval Strategies

Based on the clues provided by the user, choose an appropriate combination of retrieval methods. The goal of retrieval is "more rather than less", because the subsequent reasoning layer will be responsible for filtering and clustering.

1. Keyword Retrieval

Use this first when the user provides a clear topic or keywords.

Steps:

  1. Extract core keywords (2-5) from the user's description
  2. Use the wpsnote search_notes tool to search by keywords
  3. For matched notes, use get_note_outline to obtain a structural overview

2. Tag Retrieval

Use when the topic mentioned by the user may correspond to existing tags.

Steps:

  1. Use find_tags to find related tags
  2. Use search_notes to filter notes by tags
  3. When there are multiple tags, take the union to expand the recall range

3. Time-Dimension Retrieval

Use when the user mentions time clues, such as "written last year" or "notes from last month".

Steps:

  1. Infer the time range from the user's description
  2. Use list_notes to sort and filter by time
  3. Further filter in combination with keywords

4. In-Depth Note Content Retrieval

When the preliminary retrieval results are not precise enough, perform content-level search on candidate notes.

Steps:

  1. Use search_note_content on candidate notes to search for specific content
  2. Use read_blocks to read the context of matched paragraphs
  3. If necessary, use read_section to read the complete section

Output Format

After retrieval is complete, organize the results according to the following structure. This format is designed to be passed directly to the reasoning layer (ie-connect-dots) for use.

检索结果摘要
---
检索条件:[使用的关键词/标签/时间范围]
命中笔记数:[数量]
---

笔记 1
  标题:[笔记标题]
  笔记ID:[note_id]
  创建时间:[时间]
  标签:[标签列表]
  核心内容摘要:[与检索主题相关的关键段落摘要,100-200字]

笔记 2
  标题:[笔记标题]
  ...

---
检索置信度:高/中/低
补充说明:[如果检索范围可能不完整,说明原因和建议]

Retrieval Quantity Control

  • By default, return the 5-10 most relevant notes
  • If the user explicitly requests "find as many as possible", it can be expanded to 20
  • If invoked by the ie-engine orchestrator, control the quantity according to the orchestrator's instructions
  • Keep the summary of each note within 200 characters to avoid information overload

Relationship with other Inspiration Engine skills

This skill is the memory layerof the Inspiration Engine, and is at the lowest level in the three-layer architecture:

ie-generate-insight(洞见层)<-- 消费推理结果
ie-connect-dots(推理层)   <-- 消费检索结果
ie-retrieve-memory(记忆层)<-- 本技能,提供原始素材
  • Upstream: None (this skill is the starting point of the pipeline)
  • Downstream: ie-connect-dots (reasoning layer) receives the retrieval results of this skill
  • Orchestration: ie-engine is responsible for chaining the calls

This skill can be used independently (when the user only wants to retrieve old notes), or as part of the Inspiration Engine pipeline.