Skip to content

Instantly share code, notes, and snippets.

@unclejobs-ai
Forked from karpathy/llm-wiki.md
Last active August 30, 2026 10:00
Show Gist options
  • Select an option

  • Save unclejobs-ai/7af4a9e3446751b8e2c3bc66d23fa0ac to your computer and use it in GitHub Desktop.

Select an option

Save unclejobs-ai/7af4a9e3446751b8e2c3bc66d23fa0ac to your computer and use it in GitHub Desktop.
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

The idea here is different. Instead of just retrieving from raw documents at query time, the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files that sits between you and the raw sources. When you add a new source, the LLM doesn't just index it for later retrieval. It reads it, extracts the key information, and integrates it into the existing wiki — updating entity pages, revising topic summaries, noting where new data contradicts old claims, strengthening or challenging the evolving synthesis. The knowledge is compiled once and then kept current, not re-derived on every query.

This is the key difference: the wiki is a persistent, compounding artifact. The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you've read. The wiki keeps getting richer with every source you add and every question you ask.

You never (or rarely) write the wiki yourself — the LLM writes and maintains all of it. You're in charge of sourcing, exploration, and asking the right questions. The LLM does all the grunt work — the summarizing, cross-referencing, filing, and bookkeeping that makes a knowledge base actually useful over time. In practice, I have the LLM agent open on one side and Obsidian open on the other. The LLM makes edits based on our conversation, and I browse the results in real time — following links, checking the graph view, reading the updated pages. Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.

This can apply to a lot of different contexts. A few examples:

  • Personal: tracking your own goals, health, psychology, self-improvement — filing journal entries, articles, podcast notes, and building up a structured picture of yourself over time.
  • Research: going deep on a topic over weeks or months — reading papers, articles, reports, and incrementally building a comprehensive wiki with an evolving thesis.
  • Reading a book: filing each chapter as you go, building out pages for characters, themes, plot threads, and how they connect. By the end you have a rich companion wiki. Think of fan wikis like Tolkien Gateway — thousands of interlinked pages covering characters, places, events, languages, built by a community of volunteers over years. You could build something like that personally as you read, with the LLM doing all the cross-referencing and maintenance.
  • Business/team: an internal wiki maintained by LLMs, fed by Slack threads, meeting transcripts, project documents, customer calls. Possibly with humans in the loop reviewing updates. The wiki stays current because the LLM does the maintenance that no one on the team wants to do.
  • Competitive analysis, due diligence, trip planning, course notes, hobby deep-dives — anything where you're accumulating knowledge over time and want it organized rather than scattered.

Architecture

There are three layers:

Raw sources — your curated collection of source documents. Articles, papers, images, data files. These are immutable — the LLM reads from them but never modifies them. This is your source of truth.

The wiki — a directory of LLM-generated markdown files. Summaries, entity pages, concept pages, comparisons, an overview, a synthesis. The LLM owns this layer entirely. It creates pages, updates them when new sources arrive, maintains cross-references, and keeps everything consistent. You read it; the LLM writes it.

The schema — a document (e.g. CLAUDE.md for Claude Code or AGENTS.md for Codex) that tells the LLM how the wiki is structured, what the conventions are, and what workflows to follow when ingesting sources, answering questions, or maintaining the wiki. This is the key configuration file — it's what makes the LLM a disciplined wiki maintainer rather than a generic chatbot. You and the LLM co-evolve this over time as you figure out what works for your domain.

Operations

Ingest. You drop a new source into the raw collection and tell the LLM to process it. An example flow: the LLM reads the source, discusses key takeaways with you, writes a summary page in the wiki, updates the index, updates relevant entity and concept pages across the wiki, and appends an entry to the log. A single source might touch 10-15 wiki pages. Personally I prefer to ingest sources one at a time and stay involved — I read the summaries, check the updates, and guide the LLM on what to emphasize. But you could also batch-ingest many sources at once with less supervision. It's up to you to develop the workflow that fits your style and document it in the schema for future sessions.

Query. You ask questions against the wiki. The LLM searches for relevant pages, reads them, and synthesizes an answer with citations. Answers can take different forms depending on the question — a markdown page, a comparison table, a slide deck (Marp), a chart (matplotlib), a canvas. The important insight: good answers can be filed back into the wiki as new pages. A comparison you asked for, an analysis, a connection you discovered — these are valuable and shouldn't disappear into chat history. This way your explorations compound in the knowledge base just like ingested sources do.

Lint. Periodically, ask the LLM to health-check the wiki. Look for: contradictions between pages, stale claims that newer sources have superseded, orphan pages with no inbound links, important concepts mentioned but lacking their own page, missing cross-references, data gaps that could be filled with a web search. The LLM is good at suggesting new questions to investigate and new sources to look for. This keeps the wiki healthy as it grows.

Indexing and logging

Two special files help the LLM (and you) navigate the wiki as it grows. They serve different purposes:

index.md is content-oriented. It's a catalog of everything in the wiki — each page listed with a link, a one-line summary, and optionally metadata like date or source count. Organized by category (entities, concepts, sources, etc.). The LLM updates it on every ingest. When answering a query, the LLM reads the index first to find relevant pages, then drills into them. This works surprisingly well at moderate scale (~100 sources, ~hundreds of pages) and avoids the need for embedding-based RAG infrastructure.

log.md is chronological. It's an append-only record of what happened and when — ingests, queries, lint passes. A useful tip: if each entry starts with a consistent prefix (e.g. ## [2026-04-02] ingest | Article Title), the log becomes parseable with simple unix tools — grep "^## \[" log.md | tail -5 gives you the last 5 entries. The log gives you a timeline of the wiki's evolution and helps the LLM understand what's been done recently.

Optional: CLI tools

At some point you may want to build small tools that help the LLM operate on the wiki more efficiently. A search engine over the wiki pages is the most obvious one — at small scale the index file is enough, but as the wiki grows you want proper search. qmd is a good option: it's a local search engine for markdown files with hybrid BM25/vector search and LLM re-ranking, all on-device. It has both a CLI (so the LLM can shell out to it) and an MCP server (so the LLM can use it as a native tool). You could also build something simpler yourself — the LLM can help you vibe-code a naive search script as the need arises.

Tips and tricks

  • Obsidian Web Clipper is a browser extension that converts web articles to markdown. Very useful for quickly getting sources into your raw collection.
  • Download images locally. In Obsidian Settings → Files and links, set "Attachment folder path" to a fixed directory (e.g. raw/assets/). Then in Settings → Hotkeys, search for "Download" to find "Download attachments for current file" and bind it to a hotkey (e.g. Ctrl+Shift+D). After clipping an article, hit the hotkey and all images get downloaded to local disk. This is optional but useful — it lets the LLM view and reference images directly instead of relying on URLs that may break. Note that LLMs can't natively read markdown with inline images in one pass — the workaround is to have the LLM read the text first, then view some or all of the referenced images separately to gain additional context. It's a bit clunky but works well enough.
  • Obsidian's graph view is the best way to see the shape of your wiki — what's connected to what, which pages are hubs, which are orphans.
  • Marp is a markdown-based slide deck format. Obsidian has a plugin for it. Useful for generating presentations directly from wiki content.
  • Dataview is an Obsidian plugin that runs queries over page frontmatter. If your LLM adds YAML frontmatter to wiki pages (tags, dates, source counts), Dataview can generate dynamic tables and lists.
  • The wiki is just a git repo of markdown files. You get version history, branching, and collaboration for free.

Why this works

The tedious part of maintaining a knowledge base is not the reading or the thinking — it's the bookkeeping. Updating cross-references, keeping summaries current, noting when new data contradicts old claims, maintaining consistency across dozens of pages. Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don't get bored, don't forget to update a cross-reference, and can touch 15 files in one pass. The wiki stays maintained because the cost of maintenance is near zero.

The human's job is to curate sources, direct the analysis, ask good questions, and think about what it all means. The LLM's job is everything else.

The idea is related in spirit to Vannevar Bush's Memex (1945) — a personal, curated knowledge store with associative trails between documents. Bush's vision was closer to this than to what the web became: private, actively curated, with the connections between documents as valuable as the documents themselves. The part he couldn't solve was who does the maintenance. The LLM handles that.

Note

This document is intentionally abstract. It describes the idea, not a specific implementation. The exact directory structure, the schema conventions, the page formats, the tooling — all of that will depend on your domain, your preferences, and your LLM of choice. Everything mentioned above is optional and modular — pick what's useful, ignore what isn't. For example: your sources might be text-only, so you don't need image handling at all. Your wiki might be small enough that the index file is all you need, no search engine required. You might not care about slide decks and just want markdown pages. You might want a completely different set of output formats. The right way to use this is to share it with your LLM agent and work together to instantiate a version that fits your needs. The document's only job is to communicate the pattern. Your LLM can figure out the rest.

LLM 위키

LLM을 활용해 개인 지식 베이스를 구축하는 패턴입니다.

이 문서는 아이디어 파일로, 여러분이 사용하는 LLM 에이전트(예: OpenAI Codex, Claude Code, OpenCode / Pi 등)에 복사해서 붙여넣기 위해 만들어졌습니다. 핵심 아이디어를 전달하는 것이 목적이며, 구체적인 세부 사항은 에이전트와 협업하면서 함께 만들어 나가면 됩니다.

핵심 아이디어

대부분의 사람들이 LLM과 문서를 함께 사용하는 방식은 RAG와 비슷합니다. 파일 모음을 업로드하면, LLM이 질문 시점에 관련 청크를 검색해서 답변을 생성하는 방식이죠. 이 방법도 작동하긴 하지만, LLM이 매 질문마다 지식을 처음부터 다시 발견해야 한다는 문제가 있습니다. 축적이 없는 겁니다. 5개의 문서를 종합해야 답할 수 있는 미묘한 질문을 던지면, LLM은 매번 관련 조각들을 찾아서 짜맞춰야 합니다. 쌓이는 것이 아무것도 없습니다. NotebookLM, ChatGPT 파일 업로드, 대부분의 RAG 시스템이 이런 방식으로 작동합니다.

여기서 제안하는 아이디어는 다릅니다. 질문 시점에 원시 문서에서 검색만 하는 것이 아니라, LLM이 점진적으로 영속적인 위키를 구축하고 유지관리합니다. 여러분과 원시 소스 사이에 위치하는, 구조화되고 상호 링크된 마크다운 파일 모음이죠. 새로운 소스를 추가하면, LLM은 단순히 나중에 검색하려고 인덱싱만 하는 게 아닙니다. 소스를 읽고, 핵심 정보를 추출한 뒤, 기존 위키에 통합합니다. 엔티티 페이지를 업데이트하고, 주제 요약을 수정하고, 새 데이터가 기존 주장과 모순되는 부분을 기록하고, 진화하는 종합 분석을 강화하거나 도전합니다. 지식은 한 번 컴파일되고 최신 상태로 유지됩니다. 매 질문마다 다시 도출하는 것이 아닙니다.

이것이 핵심 차이점입니다. 위키는 영속적이고 복리로 축적되는 산출물입니다. 상호 참조는 이미 만들어져 있습니다. 모순점은 이미 표시되어 있습니다. 종합 분석은 여러분이 읽은 모든 것을 이미 반영하고 있습니다. 소스를 추가하고 질문을 할 때마다 위키는 점점 더 풍부해집니다.

위키를 직접 작성하는 일은 없거나 거의 없습니다. LLM이 모든 것을 작성하고 유지관리합니다. 여러분의 역할은 소스를 큐레이션하고, 탐색하고, 올바른 질문을 던지는 것입니다. LLM은 모든 허드렛일을 합니다. 요약, 상호 참조, 분류, 그리고 지식 베이스를 시간이 지남에 따라 실제로 유용하게 만드는 기록 관리 작업 말입니다. 실제로 저는 한쪽에 LLM 에이전트를, 다른 쪽에 Obsidian을 열어놓고 사용합니다. LLM이 대화를 기반으로 편집을 하면, 저는 실시간으로 결과를 탐색합니다. 링크를 따라가고, 그래프 뷰를 확인하고, 업데이트된 페이지를 읽습니다. Obsidian은 IDE이고, LLM은 프로그래머이고, 위키는 코드베이스입니다.

이 패턴은 다양한 맥락에 적용할 수 있습니다. 몇 가지 예시를 들어보겠습니다:

  • 개인: 자신의 목표, 건강, 심리, 자기 개선을 추적하는 용도. 일기 항목, 기사, 팟캐스트 메모를 정리하고, 시간이 지남에 따라 자신에 대한 구조화된 그림을 만들어 갑니다.
  • 리서치: 수주 또는 수개월에 걸쳐 하나의 주제를 깊이 파고드는 용도. 논문, 기사, 보고서를 읽으면서 진화하는 논지를 담은 포괄적인 위키를 점진적으로 구축합니다.
  • 책 읽기: 각 챕터를 읽을 때마다 정리하면서, 캐릭터, 테마, 플롯 흐름, 그리고 그것들의 연결 관계에 대한 페이지를 만들어 갑니다. 끝날 때쯤이면 풍부한 동반자 위키가 완성됩니다. Tolkien Gateway 같은 팬 위키를 떠올려 보세요. 캐릭터, 장소, 사건, 언어를 다루는 수천 개의 상호 링크된 페이지가 수년에 걸쳐 자원봉사자 커뮤니티에 의해 만들어졌습니다. 이런 것을 책을 읽으면서 개인적으로 만들 수 있고, LLM이 모든 상호 참조와 유지관리를 담당합니다.
  • 비즈니스/팀: LLM이 유지관리하는 내부 위키. Slack 스레드, 회의 녹취록, 프로젝트 문서, 고객 통화 내용을 입력받습니다. 업데이트를 검토하는 사람이 루프에 참여할 수도 있습니다. 팀에서 아무도 하고 싶어하지 않는 유지관리 작업을 LLM이 대신하기 때문에 위키가 최신 상태로 유지됩니다.
  • 경쟁 분석, 실사(due diligence), 여행 계획, 수업 노트, 취미 심화 탐구 — 시간에 걸쳐 지식을 축적하면서 흩어지지 않고 체계적으로 정리하고 싶은 모든 분야에 적용됩니다.

아키텍처

세 가지 레이어로 구성됩니다:

원시 소스 — 여러분이 큐레이션한 소스 문서 모음입니다. 기사, 논문, 이미지, 데이터 파일 등입니다. 이것들은 불변(immutable)입니다. LLM은 여기서 읽기만 하고 절대 수정하지 않습니다. 이것이 여러분의 단일 진실 공급원(source of truth)입니다.

위키 — LLM이 생성한 마크다운 파일들의 디렉토리입니다. 요약, 엔티티 페이지, 개념 페이지, 비교, 개요, 종합 분석 등이 있습니다. LLM이 이 레이어를 완전히 소유합니다. 페이지를 만들고, 새 소스가 도착하면 업데이트하고, 상호 참조를 유지하며, 모든 것의 일관성을 지킵니다. 여러분은 읽고, LLM은 씁니다.

스키마 — LLM에게 위키의 구조, 규칙, 그리고 소스를 수집하거나 질문에 답하거나 위키를 유지관리할 때 따라야 할 워크플로우를 알려주는 문서입니다(예: Claude Code의 CLAUDE.md나 Codex의 AGENTS.md). 이것이 핵심 설정 파일입니다. LLM을 범용 챗봇이 아닌 규율 있는 위키 관리자로 만들어주는 역할을 합니다. 여러분의 도메인에 무엇이 효과적인지 파악해 나가면서, 여러분과 LLM이 함께 이 문서를 발전시켜 나갑니다.

오퍼레이션

수집(Ingest). 새로운 소스를 원시 컬렉션에 추가하고 LLM에게 처리하라고 지시합니다. 예시 흐름은 다음과 같습니다: LLM이 소스를 읽고, 핵심 시사점을 여러분과 논의하고, 위키에 요약 페이지를 작성하고, 인덱스를 업데이트하고, 위키 전반에 걸쳐 관련 엔티티 및 개념 페이지를 업데이트하고, 로그에 항목을 추가합니다. 하나의 소스가 10~15개의 위키 페이지에 영향을 줄 수 있습니다. 개인적으로는 소스를 하나씩 수집하면서 직접 참여하는 것을 선호합니다. 요약을 읽고, 업데이트를 확인하고, 무엇을 강조할지 LLM을 안내합니다. 하지만 감독을 줄이고 여러 소스를 한꺼번에 일괄 수집할 수도 있습니다. 자신의 스타일에 맞는 워크플로우를 개발하고 이후 세션을 위해 스키마에 문서화하는 것은 여러분의 몫입니다.

질의(Query). 위키를 대상으로 질문을 합니다. LLM이 관련 페이지를 검색하고, 읽은 뒤, 인용과 함께 답변을 종합합니다. 답변은 질문에 따라 다양한 형태를 취할 수 있습니다. 마크다운 페이지, 비교 테이블, 슬라이드 덱(Marp), 차트(matplotlib), 캔버스 등입니다. 중요한 통찰이 있습니다: 좋은 답변은 새로운 페이지로 위키에 다시 저장할 수 있습니다. 여러분이 요청한 비교, 분석, 발견한 연결 관계 — 이런 것들은 가치가 있으며 채팅 기록 속에 사라져서는 안 됩니다. 이렇게 하면 여러분의 탐색 활동도 수집된 소스와 마찬가지로 지식 베이스에 복리로 축적됩니다.

점검(Lint). 주기적으로 LLM에게 위키의 상태를 점검하도록 요청합니다. 확인할 사항은 다음과 같습니다: 페이지 간 모순, 새로운 소스가 대체한 오래된 주장, 인바운드 링크가 없는 고아 페이지, 언급되었지만 자체 페이지가 없는 중요한 개념, 누락된 상호 참조, 웹 검색으로 채울 수 있는 데이터 공백. LLM은 조사할 새로운 질문과 찾아볼 새로운 소스를 제안하는 데 뛰어납니다. 이 과정이 위키가 성장하면서도 건강한 상태를 유지하게 해줍니다.

인덱싱과 로깅

두 개의 특별한 파일이 위키가 커지면서 LLM(과 여러분)이 탐색하는 것을 도와줍니다. 각각 다른 목적을 가지고 있습니다:

index.md는 콘텐츠 중심입니다. 위키의 모든 것을 목록화한 카탈로그로, 각 페이지가 링크, 한 줄 요약, 그리고 선택적으로 날짜나 소스 수 같은 메타데이터와 함께 나열됩니다. 카테고리별(엔티티, 개념, 소스 등)로 정리됩니다. LLM은 수집할 때마다 이 파일을 업데이트합니다. 질의에 답할 때 LLM은 먼저 인덱스를 읽어서 관련 페이지를 찾은 다음, 해당 페이지로 들어갑니다. 중간 규모(~100개 소스, ~수백 개 페이지)에서 이 방식은 놀라울 정도로 잘 작동하며, 임베딩 기반 RAG 인프라를 구축할 필요가 없습니다.

log.md는 시간순입니다. 무엇이 언제 일어났는지를 기록하는 추가 전용(append-only) 기록입니다. 수집, 질의, 점검 등이 기록됩니다. 유용한 팁이 있습니다: 각 항목이 일관된 접두사로 시작하면(예: ## [2026-04-02] ingest | Article Title), 로그를 간단한 유닉스 도구로 파싱할 수 있습니다. grep "^## \[" log.md | tail -5로 최근 5개 항목을 확인할 수 있죠. 로그는 위키 진화의 타임라인을 제공하고, LLM이 최근에 무엇이 수행되었는지 이해하는 데 도움을 줍니다.

선택 사항: CLI 도구

어느 시점에서는 LLM이 위키를 더 효율적으로 다룰 수 있도록 돕는 작은 도구들을 만들고 싶어질 수 있습니다. 위키 페이지에 대한 검색 엔진이 가장 대표적입니다. 소규모에서는 인덱스 파일만으로 충분하지만, 위키가 커지면 제대로 된 검색이 필요합니다. qmd가 좋은 선택지입니다. 마크다운 파일을 위한 로컬 검색 엔진으로, 하이브리드 BM25/벡터 검색과 LLM 리랭킹을 모두 디바이스에서 수행합니다. CLI(LLM이 셸로 호출 가능)와 MCP 서버(LLM이 네이티브 도구로 사용 가능) 두 가지 인터페이스를 제공합니다. 더 간단한 것을 직접 만들 수도 있습니다. 필요가 생기면 LLM의 도움을 받아 간단한 검색 스크립트를 바이브 코딩할 수 있습니다.

팁과 요령

  • Obsidian Web Clipper는 웹 기사를 마크다운으로 변환하는 브라우저 확장 프로그램입니다. 소스를 원시 컬렉션에 빠르게 가져오는 데 매우 유용합니다.
  • 이미지를 로컬에 다운로드하세요. Obsidian 설정 → 파일 및 링크에서 "첨부 파일 폴더 경로"를 고정 디렉토리(예: raw/assets/)로 설정하세요. 그다음 설정 → 단축키에서 "Download"를 검색하면 "Download attachments for current file"을 찾을 수 있고, 단축키(예: Ctrl+Shift+D)를 바인딩하세요. 기사를 클리핑한 후 단축키를 누르면 모든 이미지가 로컬 디스크에 다운로드됩니다. 선택 사항이지만 유용합니다. LLM이 깨질 수 있는 URL에 의존하지 않고 이미지를 직접 보고 참조할 수 있게 해줍니다. 참고로 LLM은 인라인 이미지가 포함된 마크다운을 한 번에 네이티브로 읽을 수 없습니다. 우회 방법은 LLM이 먼저 텍스트를 읽은 다음, 참조된 이미지 중 일부 또는 전부를 별도로 확인해서 추가 맥락을 얻는 것입니다. 다소 번거롭지만 충분히 잘 작동합니다.
  • Obsidian의 그래프 뷰는 위키의 형태를 파악하는 최고의 방법입니다. 무엇이 무엇과 연결되어 있는지, 어떤 페이지가 허브인지, 어떤 페이지가 고아인지 한눈에 볼 수 있습니다.
  • Marp는 마크다운 기반 슬라이드 덱 형식입니다. Obsidian에 플러그인이 있습니다. 위키 콘텐츠에서 직접 프레젠테이션을 생성할 때 유용합니다.
  • Dataview는 페이지 프론트매터에 대해 쿼리를 실행하는 Obsidian 플러그인입니다. LLM이 위키 페이지에 YAML 프론트매터(태그, 날짜, 소스 수 등)를 추가하면, Dataview가 동적 테이블과 목록을 생성할 수 있습니다.
  • 위키는 그냥 마크다운 파일들의 git 저장소입니다. 버전 히스토리, 브랜칭, 협업을 공짜로 얻을 수 있습니다.

이 방식이 효과적인 이유

지식 베이스를 유지관리하는 데 있어 힘든 부분은 읽기나 사고가 아닙니다. 기록 관리입니다. 상호 참조를 업데이트하고, 요약을 최신 상태로 유지하고, 새 데이터가 기존 주장과 모순되는 부분을 기록하고, 수십 개 페이지 간의 일관성을 유지하는 작업입니다. 사람은 유지관리 부담이 가치보다 빠르게 증가하기 때문에 위키를 포기합니다. LLM은 지루해하지 않고, 상호 참조 업데이트를 잊지 않으며, 한 번에 15개 파일을 수정할 수 있습니다. 유지관리 비용이 거의 0에 가깝기 때문에 위키가 유지됩니다.

사람의 역할은 소스를 큐레이션하고, 분석 방향을 잡고, 좋은 질문을 하고, 이 모든 것이 무엇을 의미하는지 생각하는 것입니다. LLM의 역할은 나머지 전부입니다.

이 아이디어는 바네바 부시(Vannevar Bush)의 메멕스(Memex, 1945)와 정신적으로 연결됩니다. 문서 간 연상적 경로를 가진 개인 큐레이션 지식 저장소라는 개념입니다. 부시의 비전은 웹이 실제로 된 모습보다 오히려 이 패턴에 더 가깝습니다. 개인적이고, 능동적으로 큐레이션되며, 문서 간의 연결이 문서 자체만큼 가치 있는 것이었습니다. 그가 해결하지 못한 부분은 누가 유지관리를 하느냐였습니다. LLM이 그 역할을 맡습니다.

참고

이 문서는 의도적으로 추상적입니다. 특정 구현이 아니라 아이디어를 설명합니다. 정확한 디렉토리 구조, 스키마 규칙, 페이지 형식, 도구 — 이 모든 것은 여러분의 도메인, 선호도, 그리고 사용하는 LLM에 따라 달라집니다. 위에서 언급한 모든 것은 선택 사항이고 모듈식입니다. 유용한 것을 고르고, 그렇지 않은 것은 무시하세요. 예를 들어, 소스가 텍스트뿐이라면 이미지 처리는 전혀 필요 없습니다. 위키가 충분히 작다면 인덱스 파일만으로 충분하고 검색 엔진이 필요 없습니다. 슬라이드 덱에 관심이 없고 마크다운 페이지만 원할 수도 있습니다. 완전히 다른 출력 형식을 원할 수도 있습니다. 이 문서를 올바르게 사용하는 방법은 여러분의 LLM 에이전트와 공유하고, 함께 작업하면서 여러분의 필요에 맞는 버전을 구체화하는 것입니다. 이 문서의 유일한 역할은 패턴을 전달하는 것입니다. 나머지는 여러분의 LLM이 알아서 할 수 있습니다.


역자 주석

원문이 의도적으로 추상적이라 실전에서 바로 써먹기엔 빠진 조각들이 있습니다. 아래는 직접 구축해보면서 부딪히게 될 구체적인 사항들입니다.

1. Obsidian ↔ LLM 에이전트 실시간 연동

원문에서 "Obsidian은 IDE이고 LLM은 프로그래머"라고 했는데, 실제로 이걸 실현하려면 Obsidian 볼트를 LLM 에이전트의 작업 디렉토리로 직접 잡아야 합니다. Claude Code라면 볼트 루트에서 세션을 열면 됩니다. Codex도 마찬가지고요. 이렇게 하면 LLM이 파일을 수정할 때마다 Obsidian이 자동으로 감지해서 실시간 반영합니다. 별도 동기화 과정이 필요 없습니다.

다만 주의할 점이 있습니다:

  • Obsidian의 .obsidian/ 설정 디렉토리는 LLM이 건드리지 않도록 스키마에 명시해야 합니다
  • 커뮤니티 플러그인 중 Linter를 켜두면 LLM이 쓴 마크다운의 포맷팅을 자동 정규화해줍니다 (trailing space, heading style 등)
  • Templater 플러그인으로 위키 페이지 템플릿을 미리 만들어두면, LLM에게 "이 템플릿을 따라서 작성해"라고 지시하기 편합니다

2. 스키마(CLAUDE.md)에 들어가야 할 것들

원문에서 스키마가 핵심이라고 했지만 구체적으로 뭘 넣어야 하는지는 안 알려줍니다. 최소한 이것들이 필요합니다:

  • 디렉토리 구조: raw/, wiki/, wiki/entities/, wiki/concepts/, wiki/sources/ 같은 폴더 규칙
  • 페이지 템플릿: 엔티티 페이지, 소스 요약 페이지, 개념 페이지 각각의 프론트매터 스키마와 필수 섹션
  • 네이밍 규칙: 파일명 kebab-case, 내부 링크 [[위키링크]] vs [마크다운 링크]() 중 택일
  • 수집 워크플로우: "새 소스가 들어오면 이 순서로 처리하라"는 체크리스트
  • 금지 사항: "원시 소스는 절대 수정하지 마라", "위키 페이지에 원문을 통째로 복붙하지 마라"

이 스키마 자체를 LLM과 함께 몇 번 반복하면서 다듬어가는 게 핵심입니다. 처음부터 완벽할 필요 없습니다.

참고로 소스 요약 페이지의 프론트매터 예시는 이런 형태입니다:

---
title: "Attention Is All You Need 논문 요약"
type: source
source_url: https://arxiv.org/abs/1706.03762
author: Vaswani et al.
date_ingested: 2026-04-05
date_published: 2017-06-12
tags: [transformer, attention, deep-learning]
related: [[transformer]], [[self-attention]], [[seq2seq]]
---

엔티티/개념 페이지도 비슷하되 type: entity 또는 type: concept으로 구분하고, source_count 필드를 넣어서 해당 개념이 몇 개의 소스에서 언급되었는지 추적하면 Dataview에서 "가장 많이 등장하는 개념 TOP 20" 같은 뷰를 바로 만들 수 있습니다.

3. MCP 서버 — 위키를 LLM의 네이티브 도구로 만들기

원문에서 qmd의 MCP 서버를 한 줄로 언급하고 넘어가는데, 이 부분이 실은 게임 체인저입니다. MCP(Model Context Protocol)는 LLM 에이전트가 외부 도구를 함수처럼 호출할 수 있게 해주는 프로토콜입니다. 위키 검색을 MCP 서버로 노출하면, LLM이 "셸 명령어로 검색 스크립트를 실행"하는 게 아니라 네이티브 도구로 직접 위키를 검색합니다. 응답 속도도 빠르고 에러 처리도 깔끔합니다.

Claude Code라면 프로젝트 루트의 .mcp.json에 등록하면 끝이고, Codex도 비슷한 구조를 지원합니다. 위키 규모가 50페이지를 넘어가면 이 방식을 진지하게 고려할 가치가 있습니다.

4. 한국어 위키 운영 시 고려사항

  • 검색 문제: 한국어는 교착어라 형태소 분석 없이는 검색이 잘 안 됩니다. qmd가 한국어 토크나이징을 제대로 지원하는지 확인이 필요하고, 안 되면 index.md에 영어 키워드를 병기하는 것도 방법입니다
  • 파일명은 영어로: Obsidian에서 한글 파일명은 URL 인코딩 문제, git 호환성 문제가 생깁니다. 파일명은 영어 kebab-case, 제목(H1)은 한국어로 쓰는 것을 권장합니다
  • 프론트매터에 한영 태그 병기: tags: [인공지능, artificial-intelligence] 식으로 넣으면 Dataview 쿼리할 때 양쪽 다 잡힙니다

5. 소스 수집 실전 팁

원문에서 Obsidian Web Clipper만 언급했는데, 실제로는 소스 형태가 다양합니다:

  • YouTube 영상: 자막(transcript)을 추출해서 .md로 저장. yt-dlp --write-auto-sub 또는 브라우저 확장으로 가능
  • PDF 논문/보고서: Obsidian에 끌어다 놓으면 첨부되긴 하지만, LLM이 읽으려면 텍스트 추출이 필요합니다. marker 같은 도구로 마크다운 변환하는 게 낫습니다
  • 트위터/스레드: Thread Reader App으로 언롤한 뒤 Web Clipper로 가져오기
  • 팟캐스트: Whisper로 트랜스크립트 생성 후 저장

소스마다 메타데이터(날짜, 저자, URL, 유형)를 프론트매터로 통일해두면 나중에 Dataview로 "최근 30일 수집 소스", "저자별 목록" 같은 뷰를 만들 수 있습니다.

6. 비용과 규모 감각

원문에서 빠진 현실적인 부분입니다. 소스 하나를 수집할 때 LLM이 10~15개 페이지를 수정한다고 했는데, 이건 꽤 많은 토큰을 소비합니다. 대략적인 감각:

  • 소스 1건 수집: 입력(소스 텍스트 + 기존 위키 페이지 읽기) + 출력(수정된 페이지들) = 에이전트 세션 기준 수만~십수만 토큰
  • 질의 1건: 인덱스 읽기 + 관련 페이지 2~5개 읽기 + 답변 생성 = 상대적으로 가벼움
  • 위키 100페이지 이상: 인덱스만으로 탐색이 어려워지기 시작. 이때 qmd 같은 검색 도구 도입 시점

Claude Code의 Max Plan($200/월)이나 Codex 같은 도구를 쓴다면 토큰 비용은 큰 문제가 안 되지만, API 직접 호출 기반이라면 수집 빈도를 조절할 필요가 있습니다.

7. git 활용 전략

"마크다운 파일의 git 저장소"라는 말이 원문에서 한 줄로 지나가는데, 실전에서는 꽤 중요합니다:

  • 수집 단위로 커밋: 소스 하나 수집이 끝날 때마다 커밋하면 "이 소스가 위키에 어떤 변화를 줬는지" diff로 한눈에 볼 수 있습니다
  • 브랜치 활용: 큰 주제 전환이나 실험적 재구조화를 할 때 브랜치를 따서 작업하면 안전합니다
  • .gitignore.obsidian/workspace.json 등 개인 설정 파일 제외

8. RAG와의 병행

원문이 RAG를 대체재처럼 설명하지만, 실은 보완재로 쓸 수 있습니다. 위키가 1차 지식 레이어이고, 원시 소스에 대한 RAG 검색이 2차 레이어입니다. 위키에서 답을 찾되, 원문 확인이 필요하면 원시 소스를 RAG로 검색하는 구조입니다. 위키가 "컴파일된 지식"이라면, RAG는 "원문 검증 도구"인 셈입니다.

9. 세션 간 컨텍스트 — 위키가 해결하는 진짜 문제

원문에서 명시적으로 말하지 않지만, LLM 위키가 해결하는 가장 큰 실전 문제는 세션 간 컨텍스트 유실입니다. LLM 에이전트는 세션이 끝나면 대화 내용을 잊습니다. 어제 2시간 동안 깊이 파고든 분석도, 새 세션에서는 처음부터 다시 시작해야 합니다.

위키가 있으면 다릅니다. 새 세션을 열었을 때 LLM에게 "위키의 index.md를 먼저 읽어"라고 지시하면, 지금까지 축적된 모든 지식의 지도를 한 번에 파악합니다. 어제의 분석은 위키 페이지로 남아 있고, 오늘은 거기서 이어갈 수 있습니다. 스키마(CLAUDE.md)에 "세션 시작 시 index.mdlog.md를 먼저 읽어라"고 써두면 이 과정이 자동화됩니다.

이것이 원문에서 말하는 "축적이 없다"는 RAG의 문제를 가장 직접적으로 해결하는 메커니즘입니다.

10. 점검(Lint) 실전 프롬프트

원문에서 점검을 설명하면서 "주기적으로 요청하라"고만 했는데, 실제로 어떤 프롬프트를 써야 하는지는 빠져 있습니다. 아래는 바로 쓸 수 있는 점검 프롬프트 예시입니다:

위키 상태를 점검해줘. 아래 항목을 순서대로 확인하고 결과를 보고해:

1. index.md에 등록되었지만 실제 파일이 없는 항목 (깨진 링크)
2. 파일은 있지만 index.md에 누락된 페이지 (미등록 페이지)
3. 다른 페이지에서 한 번도 링크되지 않은 고아 페이지
4. 2개 이상의 페이지에서 서로 모순되는 주장
5. 언급은 되지만 자체 페이지가 없는 주요 개념
6. source_count가 3 이상인데 요약이 1문단 이하인 빈약한 페이지
7. 최근 수집된 소스가 기존 주장을 업데이트했어야 하는데 반영 안 된 곳

각 항목에 대해 발견 사항과 구체적인 수정 제안을 함께 알려줘.

이 프롬프트를 스키마에 넣어두거나, 별도 lint-prompt.md로 저장해두면 매번 새로 쓸 필요 없이 "lint 돌려줘"로 호출할 수 있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment