Files
mnote/skills/mnote-knowledge-rag/SKILL.md
T
lix-2026 4a7efd4a30 feat: Page AI Reasonix desktop session alignment, settings IA cleanup, knowledge RAG hardening
- ACP client/session manager: Reasonix desktop live session context
- Hermes tools: knowledge_rag tool manifest and skill updates
- Browser runtime: sidebar page AI permission/profile/render/session/tree modules
- Routes: hermes_client, hermes_tools, knowledge_rag, web_shell
- Scripts: reasonix ACP wrapper, LightRAG MCP, smoke tasks 159/558/559/561/562
- Skills: mnote-knowledge-rag and mnote-lightrag-bridge SKILL.md updates
2026-06-13 22:20:01 +08:00

22 lines
2.5 KiB
Markdown

# MNote knowledge RAG
使用场景:用户要求“资料库问答”、跨多本书/论文/PDF/Office 附件问答,或明确需要 LightRAG 知识库结果。
工具使用:
- 先用 `mnote.knowledge_rag.status` 检查 LightRAG provider 是否可用、当前 root 是否有 source registry。
-`mnote.knowledge_rag.query` 提问。默认 `mode=mix`,需要跨资料总结时可用 `global`。指定资料细节时可传 `sourcePaths`,但当前语义是 LightRAG provider 检索后,MNote 只过滤返回的 `references`;不要把 `raw` 当作已被 scope 限制的来源。
- 如果返回 `documentStructureIndex`,它只是一张章节地图。需要阅读某个章节范围时,调用 `mnote.knowledge_rag.section_context`,传 `sourcePath` 以及 `startBlockOrdinal/endBlockOrdinal``startParagraphOrdinal/endParagraphOrdinal`,并限制 `maxBlocks/maxChars`
- 回答必须引用 `references` 中的来源;优先使用返回的 `citationMarkdown`
- 若需要打开来源,调用 `mnote.knowledge_rag.open_reference`,不要手拼 LightRAG dashboard、`file://` 或 provider 内部路径。
- 如果当前 Agent runtime 只有 MCP 入口,优先调用 `mnote_lightrag_bridge.mnote_knowledge_rag_query`;它会转到 MNote `/api/knowledge-rag/query`,保留 source registry、citation contract 和定位信息。`lightrag_native.query_text/query_data` 只用于原生 graph/documents/pipeline 管理或显式调试,不作为普通问答首选。
- 引入或变更 LightRAG MCP、`mnote.knowledge_rag.*` 工具、citation 渲染或 open-reference 映射后,必须跑 Reasonix/Page AI 浏览器验收:AI 可见回答包含 citation 链接,点击该链接后 MNote 能打开对应资源并落到 locator。
边界:
- LightRAG 是派生知识库 provider,不是 MNote Markdown 正文真相。
- `filePath` 是 LightRAG provider-local 名称;只有 registry 命中的 reference 才能映射回 MNote source。
- 如果返回 `locatorDegraded: true`,可以使用返回的 `citationMarkdown`,但必须明说“来源定位降级”,不要伪造页码、bbox 或 provider 内部路径。
- LightRAG 不可用时,不要声称资料库已查到;提示用户启动或检查 LightRAG provider。旧 LiteParse / evidence 检索已退役,不作为 fallback。
- MNote 的职责不是重排、补召回或再做一套全文搜索;MNote 只做 allowed roots、source registry、结果过滤、有限 section context 和 citation/open-reference 映射。