DeepSHPlugins
knowlp-rag 專案預覽
GITHUB / COMMUNITY PROJECT

knowlp-rag

記憶與知識PythonMIT

Markdown 筆記的雙知識圖譜 RAG:前置依賴 + 相似關聯雙圖(P/S-Agent 遍歷)、段落級匹配、ngram/embedding 混合檢索、顯式權重反饋閉環,以 MCP 接入。

3 Starswly8691-jpg 更新時間 2026-09-07
訪問 GitHub 倉庫
knowlp-rag 專案預覽

專案介紹

中文

Markdown 筆記的雙知識圖譜 RAG:前置依賴 + 相似關聯雙圖(P/S-Agent 遍歷)、段落級匹配、ngram/embedding 混合檢索、顯式權重反饋閉環,以 MCP 接入。

English

Dual knowledge-graph RAG for Markdown notes: prerequisite + similarity graphs (P/S-Agent traversal), paragraph chunking, n-gram/embedding hybrid search, and an explicit weight feedback loop — via MCP.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
wly8691-jpg
倉庫
wly8691-jpg/knowlp-rag
GitHub Stars
3
Forks
0
開發語言
Python
許可證
MIT
最近推送
2026-09-07
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

60/ 100
維護活躍
98
文件與實用資訊
85
生態關注度
17
安裝便捷訊號
100
專案宣告訊號
100

近 4 天仍在更新;README 含完整安裝與使用說明;關注度尚低(3)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add @eqman00003/knowlp-rag

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。


type: KnowLP文档 文档状态: 引擎 日期: "2026-08-29" 说明: 引擎 README(v3.0.8 仓库版,dsh 优先)


KnowLP-RAG

Agent-first knowledge retrieval — turn your Markdown notes into a self-maintaining knowledge graph that is "use it or lose it". Agents (DSH / Claude Code) install, build the graph, and self-check it; only the vault path must be provided by the human. Retrieval returns reading paths: which notes to read, in what order, and which are similar substitutes.

Python License: MIT Listed on DSH Directory


Quick start (3 steps)

All three steps are agent-runnable; only KNOWLP_VAULT (your notes directory) must be provided by the human.

# 1. Install (official npm registry)
dsh plugin add "@eqman00003/knowlp-rag"

# 2. Set the two required env vars (without them the dual-graph engine idles and only full-text search works)
export KNOWLP_VAULT="$HOME/Notes"              # your Markdown notes directory
export KNOWLP_GRAPH_DIR="$HOME/.knowlp-dsh"    # writable index directory

# 3. Restart dsh web — the first search triggers Python env bootstrap (~30s, don't interrupt)

Six tools

ToolPurpose
knowlp_searchFour-engine fan-out retrieval (dual-graph P/S-Agent + vector + full-text)
knowlp_get_noteRead note content (read-only, path-traversal safe)
knowlp_statsEngine/graph health self-check (first stop for troubleshooting)
knowlp_record_feedbackExplicit feedback (the only entry point of the weight loop)
knowlp_record_correctionExplicit preference pairs (chosen ≻ rejected) — the input to preference learning
skill_searchSkill index retrieval

PixelRAG (optional cross-machine visual retrieval)

PixelRAG is an optional visual-retrieval engine — it embeds visual content for retrieval instead of relying on text tokens alone. It runs on a separate GPU machine on your network: the agent offloads the visual-embedding work to that box over Tailscale rather than computing it on the laptop. Retrieval falls back through three tiers:

  1. desktop GPU — the primary dedicated box (an RTX-class machine reachable over Tailscale)
  2. local — a same-machine fallback
  3. cloud API — a hosted PixelRAG endpoint

Configure it via KNOWLP_PIXELRAG_DESKTOP / pixelrag_local. Unconfigured, it stays off — retrieval still works in n-gram / embedding mode.

Reproducing this: it is deployment-specific — you need your own GPU machine running a PixelRAG service, a network path to it (e.g. Tailscale), and its endpoint address. No bundled service ships with KnowLP.

Documentation

Why KnowLP?

Grep for "RAG architecture" gives you 105 files. KnowLP gives you 3 ranked hits with dependency context.

grepNaive vector storeKnowLP
Result ranking❌✅✅
Dependency chain (P-Agent)❌❌✅
Similar substitutes (S-Agent)❌❌✅
Works without GPU✅❌✅ (n-gram mode)
Improves with use (feedback)❌❌✅ (weight loop)
Paragraph-level matching❌❌✅
Decay & forgetting (use it or lose it)❌❌✅ (three half-life tiers)

The difference: vector search finds documents that "contain keywords"; KnowLP finds documents you *should read given your query*, with reading paths. Edge weights between notes evolve with usage — consumed edges strengthen, unused edges decay by half-life (ephemeral 1 day / default 30 days / declarative never).

Works with Chinese note vaults out of the box (Chinese time-anchor queries and Chinese full-text search are supported).

Demo

$ knowlp_search "RAG architecture"
  1. [HIT]  RAG Architecture.md (score 0.77)
  2. [LINK] Vector Database Selection.md (score 0.61)     ← prerequisite chain
  3. [LINK] Retrieval Eval Pitfalls.md (score 0.42)
  4. [LINK] _Index-Reading Order (depth 1)                ← tells you where to start reading
  5. [LINK] _Index-Related Concepts.md (depth 2)

Local development

git clone https://github.com/wly8691-jpg/knowlp-rag.git
cd knowlp-rag
pip install -e .            # provides knowlp-mcp / knowlp-build / knowlp-search

# configure vault in config.yaml → build graph → search
python build_graph.py
python knowlp_search.py "RAG architecture"

View Architecture Diagram

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案