原文(2026-08-03 版)からの翻訳
LLM Knowledge Bases
Andrej Karpathy X Post · 共読学習ノート
左欄は原文と日本語による理解、右欄は今回の共読対話から得た学習ノートです。
Post(本文)
LLM Knowledge Bases Something I'm finding very useful recently: using LLMs to build personal knowledge bases for various topics of research interest.
LLM Knowledge Bases。最近とても役に立つと感じていることがあります。LLM を使って、さまざまな研究関心のテーマごとに個人の知識ベースを構築することです。
In this way, a large fraction of my recent token throughput is going less into manipulating code, and more into manipulating knowledge (stored as markdown and images).
こうすることで、最近の私の token 消費の大部分は、コードの操作ではなく、知識の操作に向かうようになりました。これらの知識は Markdown と画像の形で保存されています。
The latest LLMs are quite good at it. So:
最新の LLM はこれがかなり得意です。そこで:
Data ingest(資料の取り込み)
Data ingest: I index source documents (articles, papers, repos, datasets, images, etc.) into a raw/ directory, then I use an LLM to incrementally "compile" a wiki, which is just a collection of .md files in a directory structure.
資料の取り込み:記事、論文、コードリポジトリ、データセット、画像などのソース文書を raw/ ディレクトリに索引付けします。次に LLM を使って wiki を段階的に「コンパイル」します。この wiki は本質的に、ディレクトリ構造の中にある .md ファイルの集まりにすぎません。
The wiki includes summaries of all the data in raw/, backlinks, and then it categorizes data into concepts, writes articles for them, and links them all.
この wiki には raw/ にあるすべての資料の要約とバックリンクが含まれます。さらに資料を概念ごとに分類し、それらの概念について記事を書き、すべてをリンクします。
To convert web articles into.md files I like to use the Obsidian Web Clipper extension, and then I also use a hotkey to download all the related images to local so that my LLM can easily reference them.
ウェブ記事を Markdown ファイルに変換するには、Obsidian Web Clipper 拡張機能を使うのが好みです。同時にホットキーで関連画像をすべてローカルにダウンロードし、私の LLM が簡単に参照できるようにしています。
IDE(フロントエンドとしての Obsidian)
I use Obsidian as the IDE "frontend" where I can view the raw data, the the compiled wiki, and the derived visualizations.
私は Obsidian を IDE の「フロントエンド」として使い、そこで生データ、コンパイル後の wiki、そして派生した可視化結果を閲覧します。
Important to note that the LLM writes and maintains all of the data of the wiki, I rarely touch it directly.
注意すべき点として、wiki のデータはすべて LLM が書き込み保守しています。私が直接手で編集することはめったにありません。
I've played with a few Obsidian plugins to render and view data in other ways (e.g. Marp for slides).
いくつかの Obsidian プラグインも試して、別の方法でデータをレンダリングし閲覧しています。たとえば Marp でスライドを作るなどです。
Q&A(wiki に基づく質問)
Where things get interesting is that once your wiki is big enough (e.g. mine on some recent research is ~100 articles and ~400K words), you can ask your LLM agent all kinds of complex questions against the wiki, and it will go off, research the answers, etc.
本当に面白くなるのは、wiki が十分に大きくなったときです。たとえば私の最近のある研究テーマの wiki は約 100 記事、約 40 万語あります。そうなると、この wiki に基づいて LLM agent にさまざまな複雑な質問ができます。agent は自分で答えを調べに行きます。
I thought I had to reach for fancy RAG, but the LLM has been pretty good about auto-maintaining index files and brief summaries of all the documents and it reads all the important related data fairly easily at this ~small scale.
凝った RAG に頼らなければならないと思っていましたが、この小規模では、LLM はすでに索引ファイルと全文書の短い要約を自動的に保守するのがかなり得意で、重要な関連データもかなり容易に読み込めます。
Output(出力の再アーカイブ)
Instead of getting answers in text/terminal, I like to have it render markdown files for me, or slide shows (Marp format), or matplotlib images, all of which I then view again in Obsidian.
テキストやターミナルで答えを受け取るだけなのは好みません。Markdown ファイル、スライド(Marp 形式)、matplotlib の画像をレンダリングしてもらい、それらを Obsidian で改めて閲覧するほうが好きです。
You can imagine many other visual output formats depending on the query.
問いに応じて、ほかにも多くの可視化出力形式が考えられます。
Often, I end up "filing" the outputs back into the wiki to enhance it for further queries.
多くの場合、最終的にこれらの出力を wiki に「アーカイブ」し直して wiki を強化し、その後の質問に役立てています。
So my own explorations and queries always "add up" in the knowledge base.
つまり、私自身の探索と質問は、常に知識ベースの中に積み上がっていきます。
Linting(ヘルスチェックとクリーンアップ)
I've run some LLM "health checks" over the wiki to e.g. find inconsistent data, impute missing data (with web searchers), find interesting connections for new article candidates, etc., to incrementally clean up the wiki and enhance its overall data integrity.
wiki に対して LLM の「ヘルスチェック」を走らせています。たとえば、矛盾するデータを見つける、ウェブ検索ツールで欠けているデータを補う、新しい記事の候補になる面白いつながりを見つける、などです。こうして wiki を段階的にクリーンアップし、全体のデータ整合性を高めます。
The LLMs are quite good at suggesting further questions to ask and look into.
LLM は、次に問うべき、掘り下げるべき質問を提案するのもかなり得意です。
Extra tools(追加のツール)
I find myself developing additional tools to process the data, e.g. I vibe coded a small and naive search engine over the wiki, which I both use directly (in a web ui), but more often I want to hand it off to an LLM via CLI as a tool for larger queries.
気がつくと、データを処理するための追加ツールを開発しています。たとえば、wiki 上で動く小さく素朴な検索エンジンをさっと書きました。Web UI から直接使うこともありますが、より多くの場合は、CLI 経由で LLM に渡し、大きなクエリを処理する際のツールとして使わせたいのです。
Further explorations(さらなる探索)
As the repo grows, the natural desire is to also think about synthetic data generation + finetuning to have your LLM "know" the data in its weights instead of just context windows.
このリポジトリが大きくなるにつれ、自然に浮かぶのは、合成データの生成とファインチューニングも検討し、LLM がこれらのデータをコンテキストウィンドウだけに頼るのではなく、モデルの重みの中で「知っている」状態にすることです。
TLDR(まとめ)
raw data from a given number of sources is collected, then compiled by an LLM into a.md wiki, then operated on by various CLIs by the LLM to do Q&A and to incrementally enhance the wiki, and all of it viewable in Obsidian.
いくつかのソースから生データを集め、LLM が Markdown の wiki にコンパイルします。次に LLM がさまざまな CLI ツールでこの wiki を操作し、問答と wiki の継続的な強化を行います。これらすべては Obsidian で閲覧できます。
You rarely ever write or edit the wiki manually, it's the domain of the LLM.
この wiki を手で書いたり編集したりすることはめったにありません。それは LLM の領分です。
I think there is room here for an incredible new product instead of a hacky collection of scripts.
ここには、粗雑なスクリプトの寄せ集めではなく、非常に優れた新しいプロダクトが生まれる余地があると思います。
発展:自分の仕事用 wiki にどう転用するか
A work wiki is not only a place to store knowledge. It is a system that lets your agent understand what you are doing, why it matters, what has already been decided, and what should not be re-discussed from scratch.
仕事用 wiki は知識を保存する場所にとどまりません。あなたが何をしているのか、なぜそれをするのか、どの結論がすでに確定していて、どの問題をゼロから議論し直さないのかを agent に理解させるシステムです。
| Karpathy の知識ベース | あなたの仕事用 wiki での対応 |
|---|---|
raw/ source documents |
会議の逐語記録、チャットログ、GSC のエクスポート、repo review、モデルの資料、スクリーンショット、リンク |
| compiled wiki | プロジェクトページ、モデルページ、概念ページ、ワークフローページ、意思決定の記録、振り返りページ |
| Q&A over wiki | 過去の事実に基づいて「なぜそう判断したのか」「次に何をすべきか」を agent に答えさせる |
| filing outputs back | 毎回の分析、レポート、戦略判断、振り返りを wiki に保存し直す |
Minimum viable structure: current context, active projects, agent sync rules, raw evidence, sources, concepts, objects, workflows, outputs, and decisions.
最小限の実行可能な構造はこうです。現在のコンテキスト、進行中のプロジェクト、Agent 同期ルール、生の証拠、ソースの要約、概念、オブジェクト、ワークフロー、出力、意思決定の記録。