MediumKarpathy’s “LLM wiki” with a single brain | by Tony Demol | Medium
Sitemap
Tony Demol

Tony Demol

Karpathy’s “LLM wiki” with a single brain

5 min readMay 23, 2026

--

I don’t want a second brain, I want a single brain knowledge catalyst.

In April 2026, Andrej Karpathy proposed an interesting approach to build a personal knowledge base powered by a LLM. The (brilliant) concept is detailed in this clear and concise Markdown file hosted on his GitHub account.

Within a few days, the whole tech world was hyped and tons of articles & Youtube videos were released, a lot of them summarizing the concept as a “second brain”, despite it never being mentioned in the Andrej Karpathy document.

I don’t want a second brain

The term “second brain” is troubling to me: it can be understood as the outsourcing of knowledge and thinking to a second, ‘technical’ brain. This made me think of the “cognitive surrender” concept (Search paper here, and great article by Addy Osmani here).

Press enter or click to view image in full size
“Second brain” feels like knowledge is outsourced

I don’t want to “outsource” my knowledge, I want a personal knowledge catalyst. So I explored the concept, and found an approach that matches what I wanted: a knowledge loop between my (single) brain & the wiki.

The single brain catalyst

My approach is based on 4 steps:

  • Step 1 — Explore: I gather articles, videos and books I want to read or watch
  • Step 2 — Learn: While reading and watching the content, I manually take precise notes with my own words (rephrasing, summarizing, connecting ideas, …). Ideally, no LLM is used here. All notes also contain the links to the raw source(s)
  • Step 3 — Index: The “LLM-powered” wiki ingests the notes to feed the knowledge graph
  • Step 4 —Refresh & Reuse: A vibe coded quiz/flash card generator selecting 10 random pieces of content from the wiki to refresh my knowledge + the more regular search through an agent that will leverage the wiki structure to generate an answer
Press enter or click to view image in full size
Single brain learning loop leveraging the LLM wiki

The “explore” & “learn” phases are not different from the “pre-LLM” world. I don’t want to extract raw resources and directly inject them in the wiki with the sentiment that because I read them briefly and indexed them, that’s now knowledge.

I want to write things down first. The knowledge is then stored in the single brain of the system, and the wiki is a helper, a sidecar. If the wiki is dropped, the knowledge is still there.

The LLM is used after the first learning phase as a catalyst that helps keep knowledge fresh. Because I actually own the knowledge, I can maintain critical thinking regarding the content indexed by the LLM (because yes, LLM summarization can introduce small bias).

How to

LLM wiki with my existing knowledge base

I already had a knowledge base managed with Obsidian (the notes manually written when reading/watching resources). These obsidian manually written notes are then the “raw” folder from the Karpathy’s guidelines.

Get Tony Demol’s stories in your inbox

Join Medium for free to get updates from this writer.

Alongside my existing Obsidian note root folder, I created an “indexed-wiki” folder, added llm-wiki.md to it, and created a symlink “raw” pointing to my Obsidian notes.

knowledge-base
|
├── indexed-wiki
| ├── llm-wiki.md
| └── raw (-> ../manual-notes)
|
└── manual-notes
└── .. all my historical knowledge base raw notes ...

This approach fully isolates the wiki. Then within a coding harness, in the ‘indexed-wiki’ folder, I ran the following prompt:

First read the @llm-wiki.md file.

I want to implement the LLM wiki pattern in the current folder:
- The raw folder already exists
- Create the wiki folder to store intermediate indexes
- Create index.md in the root folder, serving as master index with relationships
- Create the log.md to track every ingest operation
- Create an AGENTS.md explaining how this project works and how to search and update it

Within less than a minute, I had the wiki ingestion plumbing ready, and all my existing notes ingested. The current article won’t focus on how this multi-layered knowledge base works.

The final structure is the following (the llm-wiki.md was deleted since it was only used to bootstrap the system):

knowledge-base
|
├── indexed-wiki
| ├── AGENTS.md # The wiki agent instruction
| ├── index.md
| ├── log.md
| ├── wiki/...
| └── raw (-> ../manual-notes)
|
└── manual-notes
└── .. all my historical knowledge base raw notes ...

Then my knowledge base enrichment follows the loop:

  • I manually write notes from an article/video in the ‘manual-notes’ folder tree (no LLM involved)
  • I run the LLM wiki agent to index the new content
  • The content is now both in my single brain (the human one) and in my helper, used for refresh (quizz/flash card) and for ad hoc exploration (through the agent too)

The quiz/flashcard app

I vibe coded a local “AI” web application, to generate the flashcards/quiz to close the knowledge loop. The principle is:

  • The web application has access to the whole wiki markdown + Gemini API (personal API key)
  • It sends the index.md alongside a prompt requesting to select 5 subjects from the index
  • The LLM returns the list of 5 subjects with the list of indexed file to retrieve. The application then calls the LLM again with the subject content & request to generate 10 quiz questions (4 choices with 1 correct answer per question) or flashcards about the subjects (with a JSON specification to guarantee the response structure)
  • The application generate the quiz or flashcard from the JSON response
Press enter or click to view image in full size
Overview of the workflow

And then, we close the loop to refresh the main and single brain knowledge:

Press enter or click to view image in full size
Real snapshot from a quizz from the knowledge base (networking topic here)
Press enter or click to view image in full size
When selecting the response, an explanation was also generated by the LLM from the knowledge base, used as hint after selecting an answer

Own the knowledge

Adapted quote from cognitive surrender article:

There’s a difference between delegating to an AI system and cooperating with it. Delegation produces surrender. Cooperation produces mutual amplification.

--

--