Skip to content
chilltongxPublic

About

Local-first, LLM-maintained Markdown knowledge base with traceable sources, graph navigation, retrieval evaluation, and memory feedback loops.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ChillWiki

Local-first、LLM-maintained 的 Markdown 知识库:证据可追溯,知识可演进,检索质量可回归。

check Python Dependencies License

ChillWiki 参考 Andrej Karpathy 的 LLM Wiki, 把“让 LLM 长期维护本地知识”落成一套可运行的工程契约:

  • raw/ 保存不可变证据,wiki/ 保存可重写的解释;
  • AGENTS.md 固定页面 schema、维护流程与安全边界;
  • Wiki links 与 typed relations 自动生成知识图谱;
  • 字段加权 TF-IDF 支持中英文检索;
  • Golden queries 用 MRR / Recall@5 / P@1 阻止检索质量退化;
  • 使用结果经过半衰期与有界 trust 调制反馈到下一次召回;
  • pi 与 Claude Code 集成把 recall / capture / feedback 接入终端工作流。

为什么做 ChillWiki

普通 Markdown 笔记库很容易变成“只写不找”的文件堆。ChillWiki 关注四个更难的问题:

问题 ChillWiki 的工程回答
结论从哪里来? 证据层与知识层分离,sources 始终可追溯
页面如何持续演进? Frontmatter schema、typed relations、维护日志
搜索到底准不准? Golden set + MRR 门禁,不靠主观感觉
旧知识失效怎么办? feedback 信号、时间衰减、失效与冲突看板

当前可验证指标

以下数字由公开仓库自身生成,不沿用私人知识库结果:

指标 当前值
Wiki 页面 20
图谱 19 nodes / 82 edges / 0 conflicts
检索评估集 22 queries
MRR 0.939
Recall@5 0.955
P@1 0.909
回归测试 11
运行时第三方依赖 0

架构

flowchart LR
    source["外部材料 / Agent"] -->|"capture"| raw[("raw/ 证据层")]
    raw -->|"summarize + distill"| wiki[("wiki/ 知识层")]
    contract["AGENTS.md<br/>schema + workflow"] -.-> wiki
    wiki --> graph["graph.md<br/>中枢 / 孤儿 / 冲突"]
    wiki --> search["search.py + eval<br/>TF-IDF / MRR gate"]
    feedback["feedback.py + trust.py<br/>decay / bounded ranking"] -.-> search
    search --> hosts["pi / Claude Code"]
    hosts -.-> feedback
Loading

更完整的交互式图:架构图 HTML · Archify 源文件

60 秒运行

只需要 Python 3:

git clone https://github.com/chilltongx/chillwiki.git
cd chillwiki

make check
make search Q="source of truth"
python3 scripts/search.py "证据层 解释层" --json

make check 依次执行:

build graph -> lint schema and links -> run trust tests -> evaluate retrieval

核心能力

能力 入口 说明
本地检索 scripts/search.py 标题、标签、别名、小标题、正文分层加权
知识图谱 scripts/build_graph.py 中枢、反向链接、孤儿页、冲突与失效看板
Schema 校验 scripts/lint_wiki.py Frontmatter、Wiki links、relations、反馈外键
检索评估 scripts/eval/ Golden queries、MRR、Recall@5、P@1
反馈回路 scripts/feedback.py 记录 success / fail / neutral 使用结果
信任调制 scripts/trust.py 30 天半衰期;排序倍率有界在 [0.5, 1.5]
即时捕获 scripts/capture.py 只追加到本地证据层
终端集成 integrations/ pi TypeScript 扩展 + Claude Code Markdown skills

仓库导览

raw/                    可追溯证据;公开版只含脱敏示例
wiki/                   概念、实体、问题、来源摘要和综合页
scripts/                图谱、检索、评估、反馈、信任与校验
integrations/pi/        pi 的 recall / capture / feedback 扩展
integrations/claude/    Claude Code skills 与兼容命令
templates/              Wiki 页面模板
docs/                   产品 Deck 与架构图
AGENTS.md               LLM 维护本库必须遵守的契约

人类阅读入口:Wiki Index · Knowledge Graph · Knowledge Base Architecture

Agent 集成

产品 Deck

隐私模型

真实会话、即时捕获、反馈信号和个人协作画像属于本地证据,不进入公开仓库。 本仓库只包含经过脱敏的示例,用来展示数据流与工程机制。.gitignore 默认阻止 raw/codex/、raw/sessions/、raw/captures/ 和 raw/feedback/ 被意外提交。

详见 Security and Privacy。

下一步

  • 扩大 Golden query 集,覆盖更多自然语言改写;
  • 为检索质量增加更细的 failure analysis;
  • 用更长周期的匿名反馈验证 trust 调制;
  • 保持 Markdown 与标准库优先,不急于引入数据库。

License

MIT

About

Local-first, LLM-maintained Markdown knowledge base with traceable sources, graph navigation, retrieval evaluation, and memory feedback loops.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages