LLM Wiki: A Wiki Pattern That Organizes Knowledge Up Front, Beyond RAG
Overview
LLM Wiki is a repository where you collect source materials such as planning documents, specs, and meeting notes, and Claude reads them, organizes their contents, and builds a single Korean-language wiki out of them. People take on the role of collecting materials and asking questions, while the actual work of writing and maintaining the wiki is done by Claude. It is a structure that adapts the "LLM Wiki" pattern proposed by Andrej Karpathy to Korean planning and knowledge management.
The conventional RAG approach searches the raw pile for an answer all over again every time a question comes in. Because organized results never accumulate, you keep digging through the same materials repeatedly. LLM Wiki organizes materials once at the moment they are added, turns them into a wiki, and answers questions from that wiki with sources attached. The key difference lies in "when knowledge gets organized."
By way of analogy, Obsidian is the workspace, the LLM is the author working inside it, the wiki is the finished deliverable, and the source materials are the requirements.
Background: Why Build It This Way
Knowledge that piles up in work and study is usually scattered across several tools like Confluence, Slack, and Notion. To find what you need you have to hop between tools, and how the documents connect to one another rarely surfaces clearly.
To pile up this scattered knowledge in one place and link it together, we chose the LLM Wiki approach instead of RAG, which re-digs through the sources for every question. How the two approaches differ, and the Karpathy idea underlying them, is laid out below in "Karpathy's LLM Wiki Concept."
Karpathy's LLM Wiki Concept
The Core Idea
The Problem with the Conventional RAG Approach
RAG repeats the following every time a user asks a question. First it converts the source documents into vector embeddings, finds document chunks similar to the question, and passes those chunks to the LLM to produce an answer. Because this approach re-reads the sources every time, search accuracy drops as the documents grow, and even when it does find each document chunk, the context of how the documents connect to one another has to be re-established for every answer, so it is easily lost.
How the LLM Wiki Approach Solves It
LLM Wiki moves the moment of organizing forward to when materials are added. When a material is added, the LLM reads and organizes it once and "compiles" it into the wiki, and from then on, when a question is asked, it answers directly from the already-organized and cross-referenced wiki. In library terms, RAG is like going to the shelves yourself to find and read the original book every time you have a question, whereas LLM Wiki is like a dedicated librarian who reads each new book as it arrives, organizes it into the wiki, and pre-links related documents to one another.
Comparing the two approaches by the timing of organization looks like this. The key difference lies in "when knowledge gets organized."
| Category | RAG | LLM Wiki |
|---|---|---|
| Timing of organization | Organized on every question | Organized once when material is added |
| Repetition | Re-searches the sources every time | Reuses the organized wiki |
| Context between documents | Re-established per answer, easily lost | Accumulated and retained via cross-references |
| Analogy | Finding and reading the original book on the shelves for each question | A librarian who organizes each new book into the wiki ahead of time |
Karpathy's Core Analogy: "The Programmer and the Codebase"
Karpathy likened this relationship to a programmer and a codebase. Just as a programmer takes requirements and writes and maintains code, the LLM takes source materials and writes and maintains the wiki.
| Element | Role |
|---|---|
| LLM | The programmer. Reads materials, writes the wiki, and revises it. |
| Wiki | The codebase. A continuously maintained deliverable. |
| Source materials (Raw) | Requirements and specs. Input that is only added, never revised. |
| Operating rules (Schema) | Coding conventions. Defines the rules by which the wiki is managed. |
The Three-Layer Architecture
LLM Wiki consists of three layers. Each layer, likened to a library, is as follows.
| Layer | Description | Analogy |
|---|---|---|
| Source materials (Raw) | Original documents the user adds. Never modified | Original books in the library |
| Wiki (Wiki) | Markdown pages the LLM writes and manages | Namuwiki articles |
| Operating rules (Schema) | Configuration documents that define the wiki structure and workflow | Wiki editing guidelines |
For the actual folder layout, see "Repository Structure" below.
Three Core Operations
The wiki runs on three operations: adding materials (Ingest), asking questions (Query), and inspecting (Lint). In each operation, the roles of the person and Claude are divided.
| Operation | Description | Division of roles |
|---|---|---|
| Ingest (adding materials) | Reads new materials and organizes them into wiki pages | The user adds the material and Claude organizes it |
| Query (asking questions) | Finds the answer in the wiki and responds with sources | The user asks and Claude answers grounded in the wiki |
| Lint (health check) | Inspects the wiki's consistency and completeness | Claude inspects and cleans up after user approval |
Repository Structure
It is divided into three layers.
| Location | Role |
|---|---|
raw/ | Where source materials are kept as-is. Planning documents, specs, meeting notes, images, URLs, and so on. It is an immutable area that is never changed once it comes in, and the user manages it. Claude only reads it. |
wiki/ | Where organized wiki pages collect. Claude writes and maintains it. People use it primarily in a read-oriented way. It is kept in a flat structure with no subfolders. |
wiki/index.md | The full table of contents for the wiki. Organizes pages by category. |
wiki/log.md | The work history. A line accumulates each time the wiki changes. |
CLAUDE.md | The operating-rules document. Defines the flow for adding materials (Ingest), asking questions (Query), and inspecting (Lint), as well as the page-writing rules. |
How It Works
Turning materials into a wiki goes through three working modes.
Adding Materials (Ingest)
This is the process of reflecting new materials into the wiki. Claude reads the source, first shows the user two or three key summaries, then checks for duplication and either creates a new page or augments an existing one. At this point it does not arbitrarily rewrite the original sentences; it keeps only the summary set apart at the very top of the page. Related pages are connected to one another with wikilinks, and the work is recorded together in the table of contents and the history.
Asking Questions (Query)
This is the process of getting an answer grounded in what is organized in the wiki. Claude finds and reads the relevant pages from the table of contents and answers with sources, grounded solely in what is written in the wiki. If there is no basis in the wiki, it does not make things up and clearly tells you "There is no such content in the wiki."
Inspecting (Lint)
This is the process of periodically cleaning up problems that arise as the wiki accumulates. It finds and reports orphan pages that are not linked from anywhere, broken links, duplicated content, contradictions between pages, and so on, and cleans them up upon approval.
Operational Flow
The full flow of materials becoming a wiki and the wiki becoming answers is as follows.
[사용자]
│ ① 자료 넣기 /ingest
▼
[raw/ 원본 자료 (불변)]
│ ② Claude가 원본을 읽어 정리
▼
[wiki/ 정리된 지식] ◄─────────┐
│ ③ 사용자가 질문 /query │
▼ │ ⑤ 점검 /lint 로
[Claude] │ 위키를 정리·보강
│ ④ 위키를 근거로 출처와 함께 답변 │
▼ │
[사용자] ───────────────────┘For example, if you ask "How is payment applied?", Claude finds the relevant wiki page, follows the wikilinks to verify, and then answers with sources, such as "According to [[Payment-Feature-Spec]], the coupon currency and the payment currency must match at the time of payment." If there is no basis in the wiki, it does not make things up and answers "There is no such content in the wiki."
Detailed Flow of Adding Materials (Ingest)
These are the steps from the user adding a material to Claude reading the source and organizing it into a wiki page.
[사용자]
│ 자료를 raw/에 넣거나 URL을 /ingest에 전달
▼
[Claude]
① 원본을 읽는다 (raw/는 수정하지 않음)
② wiki/index.md로 중복 여부를 판단
③ 새 위키 페이지를 생성하거나 기존 페이지를 보강
④ [[위키링크]]로 관련 페이지를 교차참조
⑤ index.md에 등록하고 log.md에 기록
│
▼
[wiki/ 정리된 지식 갱신]Detailed Flow of Asking Questions (Query)
These are the steps of Claude finding the wiki and answering with sources when the user asks a question.
[사용자] "결제는 어떻게 되나요?"
│
▼
[Claude]
① wiki/에서 관련 페이지를 검색
② [[위키링크]]를 따라가며 관련 페이지를 추가 확인
③ 위키 내용만 근거로 답변하고 출처 페이지를 링크로 표시
│
▼
[사용자] "[[결제-기능정의서]]에 따르면 결제 시
결제 통화가 일치해야 합니다"
※ 위키에 근거가 없으면 "위키에 해당 내용이 없습니다"라고 답합니다.Core Operating Rules
To preserve the wiki's trustworthiness, the following rules are followed.
- The
raw/folder is only read by Claude and is never modified. - Every wiki page starts with a key summary (Takeaway).
- Every time the wiki is modified, a record is left in
log.md. - Newly added pages must be registered in the
index.mdtable of contents. This is to prevent orphan pages that are not linked from anywhere. - Answers are grounded solely in what is written in the wiki. If there is no basis, it answers that there is none.
What the User Needs to Do
The user's role in this repository is clear. It is not to write the wiki by hand, but to collect good materials and pose accurate questions. Leave the writing and organizing of the wiki to Claude, and the user can work in the following flow.
- Put the source materials you want organized into the
raw/folder. You can place files directly, or pass a web address as-is. Put images or attachments underraw/assets/. - Once you have added the materials, ask for them to be reflected into the wiki. For example, "Organize
raw/meeting-notes.mdinto the wiki," or you can pass along a URL. When Claude first shows you the key summary, do a light check that the direction is right. - Ask about anything you are curious about as a question. An answer comes back with sources, within the scope of what is organized in the wiki. If the answer says there is no basis, you can add more relevant sources to
raw/. - Once the wiki has accumulated to some degree, request an inspection now and then. You can clean up broken links, duplicates, and contradictions to keep the wiki healthy.
There are two things worth keeping in mind while working. First, the materials in raw/ are the source of truth, so the user manages them and Claude does not change them arbitrarily. If the wiki content and the source diverge, the source takes precedence. Second, it is better to leave edits to wiki pages to Claude rather than fixing them by hand, because it is designed so that every change is left in the history and can be traced.
Use Cases
Onboarding guide — If you gather scattered onboarding materials into raw/ and organize them into a wiki, new hires can quickly find what they need by asking the wiki. When the source changes, the wiki is updated along with it.
Standards-document management — Managing team standards, processes, planning documents, and technical specs as a wiki lets you maintain cross-references and consistency between documents. Regular inspections (Lint) catch broken links, duplicated content, and missing cross-references.
Scale and Growth
Up to around 100 materials and several hundred pages, the table of contents and search alone are enough to handle it. Beyond that, you can optionally attach an auxiliary layer that visualizes and navigates the relationships between pages as a graph.
Extending to a Knowledge Graph (graphify)
When the wiki has grown large enough that you want to see the relationships between pages at a glance, you attach graphify. graphify is a tool that analyzes the documents in a folder, extracts concepts and relationships, and builds a queryable knowledge graph (JSON, HTML visualization, report).
The Extension Flow
When graphify converts a wiki built by Ingest into a graph, graph traversal is added on top of the existing text search and wikilink navigation.
[raw/ 원본 자료]
│ Ingest — Claude가 위키로 정리
▼
[wiki/ 정리된 지식]
│ /graphify
▼
[graphify-out/] graph.json · graph.html · REPORT.md
│ 그래프 제공
▼
[사용자 질문] 에 답하는 세 가지 경로
├─ 텍스트 키워드 검색 (기존 방식)
├─ 위키링크 따라가기 (기존 방식)
└─ 그래프 탐색 BFS/DFS (graphify)
│
▼
숨겨진 연결 발견 · 커뮤니티 탐지 · 최단경로 분석The difference between using only a text wiki and adding graphify is as follows.
| Item | Wiki only | Wiki + graphify |
|---|---|---|
| Search method | Keyword matching and following wikilinks | Graph traversal (BFS/DFS) and shortest-path queries |
| Relationship discovery | The person has to create cross-references by hand | Automatically extracts relationships and even proposes inferred ones |
| Grasping the whole structure | Only category level via the index.md table of contents | Visualizes the entire structure with an interactive HTML graph |
| Hidden connections | The person has to find them by hand | Automatic grouping via community detection |
| "The relationship between A and B" | Search each and connect if there is a cross-reference | Check the shortest path directly with the path command |
graphify attaches a confidence level to each relationship it extracts. It distinguishes relationships clearly stated in the source as EXTRACTED (1.0), reasonably inferred relationships as INFERRED (0.65–0.95), and uncertain relationships as AMBIGUOUS (0.1–0.3), so you can tell where the stated facts end and inference begins.
The main commands used within a session are as follows.
| Command | Role |
|---|---|
/graphify ./wiki | Generate a graph from the wiki/ folder (output: graphify-out/) |
/graphify ./wiki --update | Incrementally update only the changed files |
/graphify query "question" | Graph-based query |
/graphify path "A" "B" | Shortest path between two concepts |
/graphify explain "concept" | Explain a specific concept |
Graph generation and querying are handled directly by the Claude in the Claude Code session, so no separate API key is needed. For installation instructions, see the knowledge-graph extension item under "Installation and Getting Started" below.
Installation and Getting Started
The repository address is as follows.
https://github.com/seungahhong/llm-wiki
This project runs on top of Claude Code. All the work of writing and organizing the wiki happens inside the Claude Code session, so you can pull the repository and use it right away without a separate server or build process.
Prerequisites
- Git
- Claude Code (Anthropic's official CLI). It is an installable tool, and you just need to log in once.
- (Optional) Python 3.10 or higher and uv. Only needed when using the knowledge-graph extension feature.
Installation Steps
- Download the repository.
git clone https://github.com/seungahhong/llm-wiki.git
cd llm-wiki- Run Claude Code from the downloaded folder.
claude- Claude Code automatically reads the
CLAUDE.mdand.claude/configuration inside the folder. From this point on, the wiki-writing rules and the dedicated commands (adding materials, asking questions, inspecting) are activated. There is no separate dependency installation.
Once you are ready, just start by putting the materials you want organized into the raw/ folder.
Basic Usage Flow
Once you have opened the repository, you use it by entering the following commands into the Claude Code prompt. These are not ordinary terminal commands but slash commands you enter within the session.
| Command | Role |
|---|---|
/ingest raw/filename or /ingest URL | Reads the source material and organizes it into a wiki page. |
/query question text | Answers with sources, grounded in the organized wiki. |
/lint | Inspects for orphan pages, broken links, duplicates, and contradictions. |
Knowledge-Graph Extension (Optional)
Install this only when the wiki has grown large enough that you want to see the relationships between pages as a graph. It is not needed for everyday use.
uv tool install graphifyy
graphify install --project --platform claudeAfter installation, you can create and query graphs with the /graphify command inside the Claude Code session. Graph generation and querying are handled directly by the Claude in the session, so no separate API key is needed. For details, see the docs/graphify.md document in the repository.
Notes
- The source materials in the
raw/folder are the source of truth. The user manages them, and if they diverge from the wiki content, the source takes precedence. - Local-only configuration files (
.claude/settings.json, etc.) and graph outputs (graphify-out/) are not included in the repository. To use the graph extension in a freshly pulled folder, just run the installation commands above again.
To Build This Wiki Yourself
This repository was created by giving Claude Code the request below. If you want to build a similar wiki from scratch, make the same request with the parts in braces changed to fit your own situation.
회사 기획 지식/노하우 위키를 만들어줘.
아래 Karpathy의 LLM Wiki 아이디어를 참고해서 구현해:
https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
이 프로젝트는 내 업무와 학습에서 쌓이는 지식을 축적하는 나만의 나무위키야.
자료를 넣으면 네가 읽고 정리해서 위키로 만들어주고, 나는 필요할 때 질문하면 돼.
나는 {{나의 직업/역할}}을(를) 하고 있어.
내가 주로 넣을 자료:
- {{자료 유형 1: 예) 개발팀별 표준, 프로세스, 업무 자료}}
- {{자료 유형 2: 예) 제품 개발 기획/디자인 업무 자료}}When Claude receives this request, it automatically creates the operating-rules document (CLAUDE.md), the raw/ and wiki/ folders, and the table of contents (index.md) and history (log.md). After that, you grow the wiki through the everyday flow of adding materials and asking questions.
References
- Karpathy's original LLM Wiki: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- graphify: https://github.com/safishamsi/graphify