2026-06-07 01:10:31 +08:00
|
|
|
|
# MNote knowledge RAG
|
|
|
|
|
|
|
2026-07-21 05:13:05 +08:00
|
|
|
|
> 2026-07-19 口径:当前默认知识库主线是 **LightRAG**(runtime 默认 `lightrag_legacy` / `lightrag`)。WeKnora 与 RAGFlow 只作为 env 显式切换的备用 / 调试路径,不是普通资料库问答默认。
|
2026-06-28 18:35:56 +08:00
|
|
|
|
|
2026-07-21 05:13:05 +08:00
|
|
|
|
使用场景:用户要求“资料库问答”、跨多本书/论文/PDF/Office 附件问答,或需要可回跳 citation 的知识库结果。
|
2026-06-07 01:10:31 +08:00
|
|
|
|
|
|
|
|
|
|
工具使用:
|
|
|
|
|
|
|
2026-06-28 18:35:56 +08:00
|
|
|
|
- 先用 `mnote.knowledge_rag.status` 检查当前知识库 provider 是否可用、当前 root 是否有 source registry。
|
|
|
|
|
|
- 用 `mnote.knowledge_rag.query` 提问。指定资料细节时可传 `sourcePaths`,但当前语义是 provider 检索后,MNote 只过滤返回的 `references`;不要把 `raw` 当作已被 scope 限制的来源。
|
2026-07-21 05:13:05 +08:00
|
|
|
|
- 对大书/长文档:query 时传 `includeDocumentStructureIndex=true`(或等价字段)。如果返回 `documentStructureIndex`,它只是一张章节地图;需要阅读某个章节范围时,再调用 `mnote.knowledge_rag.section_context`,传 `sourcePath` 以及 `startBlockOrdinal/endBlockOrdinal` 或 `startParagraphOrdinal/endParagraphOrdinal`,并限制 `maxBlocks/maxChars`。
|
|
|
|
|
|
- 回答必须引用 `references` 中的来源;优先使用返回的 `citationMarkdown`。不要在最终回答中手写 `/documents`、`mnote://`、`file://` 或搜索引擎包装链接。
|
2026-06-28 18:35:56 +08:00
|
|
|
|
- 若需要打开来源,调用 `mnote.knowledge_rag.open_reference`,不要手拼 provider dashboard、`file://` 或 provider 内部路径。
|
2026-07-21 05:13:05 +08:00
|
|
|
|
- 如果当前 Agent runtime 只有 MCP 入口,优先走 provider-neutral 的 `mnote.knowledge_rag.*` / MNote LightRAG bridge;`lightrag_native.*` 只在需要原生 graph/documents/pipeline 管理时使用,不要用它绕过 source registry 和 citation 映射。
|
|
|
|
|
|
- 引入或变更 LightRAG bridge、`mnote.knowledge_rag.*` 工具、citation 渲染或 open-reference 映射后,必须跑 Page AI 浏览器验收:AI 可见回答包含 citation 链接,点击该链接后 MNote 能打开对应资源并落到 locator。
|
2026-06-07 01:10:31 +08:00
|
|
|
|
|
|
|
|
|
|
边界:
|
|
|
|
|
|
|
2026-06-28 18:35:56 +08:00
|
|
|
|
- 知识库 provider 是派生缓存,不是 MNote Markdown 正文真相。
|
|
|
|
|
|
- `filePath` 是 provider-local 名称;只有 registry 命中的 reference 才能映射回 MNote source。
|
2026-06-07 10:35:21 +08:00
|
|
|
|
- 如果返回 `locatorDegraded: true`,可以使用返回的 `citationMarkdown`,但必须明说“来源定位降级”,不要伪造页码、bbox 或 provider 内部路径。
|
2026-07-21 05:13:05 +08:00
|
|
|
|
- 当前 provider 不可用时,不要声称资料库已查到;提示用户启动或检查 LightRAG / 知识库服务。旧 WeKnora / RAGFlow / LiteParse / `mnote.evidence.*` 本地 evidence 检索不作为默认 fallback。
|
2026-06-13 22:20:01 +08:00
|
|
|
|
- MNote 的职责不是重排、补召回或再做一套全文搜索;MNote 只做 allowed roots、source registry、结果过滤、有限 section context 和 citation/open-reference 映射。
|
2026-07-21 05:13:05 +08:00
|
|
|
|
- 兼容 skill 别名:`mnote-document-evidence` / `mnote-local-index` 只解析到本 skill,不恢复旧 evidence/index 工具面。
|