mcpField
K
karpathy-llm-wiki

karpathy-llm-wiki

github.com/learnprompt生产力118133 次安装16 周前更新
代码仓库

关于 karpathy-llm-wiki

karpathy-llm-wiki 是一项用于整理个人知识库的 Skill 和工作流,可处理研究、文章、笔记和聊天记录。它借助 LLM 编译并关联 Markdown 页面,检查重复与矛盾,并生成摘要。

主要功能

  1. 01摄取多种来源的材料
  2. 02编译并更新实体页面
  3. 03查找重复内容与矛盾
  4. 04结合相关上下文查询知识库
  5. 05生成每周摘要

适用场景

  1. 01将每周阅读清单整理进知识库
  2. 02检查相关页面中的相互矛盾主张
  3. 03维护研究来源的关联笔记
  4. 04汇总每周新增材料

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/learnprompt/andrej-karpathy-skills --skill karpathy-llm-wiki

安装后在 Claude Code 中输入/karpathy-llm-wiki确认已加载。

详细介绍

技能 2:LLM Wiki / 个人知识库(LLM知识库)

来源:https://x.com/karpathy/status/2039805659525644595 | https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f “5.9 万个赞——LLM 知识库”——获赞数排名前 2 的帖子

核心原则

你负责探索。LLM 负责维护。

你阅读世界,捕捉原始信号。LLM 负责汇编、交叉链接、去重、检查规范,并呈现矛盾之处。你的 Obsidian 库是输出,而不是输入。

架构

RAW INPUTS                 LLM LAYER                  OUTPUT
──────────                 ─────────                  ──────
Papers (PDF/arXiv)  ──→   ingest.py              ──→  entities/*.md
Articles (URL)      ──→   compile_wiki.py        ──→  index.md
Chat logs           ──→   lint_wiki.py           ──→  contradiction_log.md
Notes (voice/text)  ──→   query_wiki.py          ──→  slides/
                          update_entity.py       ──→  weekly_digest.md

5 个核心提示词

1. 摄取提示词
You are a knowledge compiler. Given this raw source:

[PASTE RAW CONTENT]

Source URL/title: [SOURCE]
Date: [DATE]

Extract and output:
1. Key entities (people, concepts, tools, papers) — one per line with a 2-sentence description
2. Key claims with confidence level (high/medium/speculative)
3. Connections to existing topics: [LIST YOUR KNOWN TOPICS]
4. Contradictions with anything you know: [WHAT YOU ALREADY BELIEVE]
5. Suggested entity page updates (format: ENTITY_NAME | UPDATE_TEXT)
2. 编译 Wiki 条目提示词
You are maintaining a personal knowledge wiki. Update the entity page for [ENTITY_NAME].

Existing page content:
[CURRENT_PAGE_CONTENT]

New information to integrate:
[NEW_INFO]

Rules:
- Preserve all existing information; only add or correct
- Flag contradictions with: ⚠️ CONFLICT: [old claim] vs [new claim]
- Keep the page under 500 words
- End with: "Last updated: [DATE] | Sources: [LINKS]"
3. 每周摄取提示词(每周运行)
Process this week's reading list:
[PASTE 5-10 ITEMS: title + URL + 1-sentence summary]

For each item:
1. Extract top 3 entities to update
2. List 2-3 key claims worth adding to wiki
3. Note any contradictions with existing knowledge
4. Suggest connections to other entities in my wiki

Output as structured markdown, one section per item.
4. 规范检查 / 矛盾检查提示词
Review these wiki entries for consistency:

[PASTE 3-5 RELATED ENTITY PAGES]

Find and report:
1. Factual contradictions between pages
2. Duplicate information that should be merged
3. Outdated claims that should be flagged
4. Missing cross-links between related entities

Format: ISSUE | PAGE | LINE | SUGGESTED FIX
5. 查询提示词
Search my personal knowledge wiki to answer this question:

Question: [QUESTION]

Wiki context:
[PASTE RELEVANT PAGES]

Answer with:
1. Direct answer (2-3 sentences)
2. Supporting evidence from wiki (with page citations)
3. Gaps: what I don't know yet
4. Suggested reading to fill gaps

记忆 / 上下文卫生(防污染规则)

Karpathy 指出,LLM 的记忆会“过度努力”——两个月前的一个问题会污染之后的每次对话。请做好预防:

  • 不要依赖 LLM 内置记忆来存储知识——请改用你的 Wiki
  • 开启新的会话来讨论新主题,避免旧上下文渗入
  • 明确重置上下文:如果要继续一个很长的会话,请以“忽略之前所有关于 X 的上下文”开场
  • 为 Wiki 做版本管理:使用 git 提交 Wiki 更改,以便比较差异

文件夹结构(兼容 Obsidian)

wiki/
├── entities/
│   ├── people/
│   │   └── andrej-karpathy.md
│   ├── concepts/
│   │   ├── agentic-engineering.md
│   │   └── llm-simulator.md
│   └── tools/
│       └── claude.md
├── index.md              ← master entity list, auto-updated
├── contradiction_log.md  ← conflicts to resolve
├── weekly_digest/
│   └── 2026-W21.md
└── raw/                  ← source dumps before compilation

每周节奏

Monday:    Dump week's reads into raw/
Tuesday:   Run ingest prompt on each item
Wednesday: Run lint/contradiction check
Thursday:  Update entity pages
Friday:    Generate weekly_digest.md with LLM

工作流

所属工作流:从研究到发布(内容创作者/研究者)

位置上游下游
第 2 步karpathy-autoresearch(研究产出原始素材)karpathy-output-evolution(将知识转化为可发布形式)

完整链路:autoresearch → llm-wiki → output-evolution → education-first

也用于月度体检工作流,以持久化反思结论。

提示词约定

Maintain this as an LLM wiki. From the new sources provided, update existing Markdown pages, create only necessary new pages, preserve all citations and source links, flag any contradictions with existing knowledge, and output a structured change log showing: pages updated, new pages created, contradictions found, and open questions.

验证清单

  • 原始来源(raw sources)保持不变
  • 每个 Wiki 页面都有来源链接
  • 明确标记矛盾之处(而非静默覆盖)
  • changelog 记录本次更新的所有变更
  • 没有创建不必要的新页面(优先更新已有页面)
  • 可以从 index 页面导航到任何实体

评论

支持 Markdown