Most “second brain” guides teach you how to set up a notes app. This guide teaches you something different: how to build a knowledge system that compiles itself.
The LLM Knowledge Base Pattern is the underlying architecture behind second brains that actually work. It has three folders, one schema file, and relies on an LLM to do almost all the organizational work. Here is exactly how it works.
The problem this pattern solves
Before getting into the architecture, it’s worth understanding what we’re optimizing for.
The failure mode of most personal knowledge management systems is maintenance abandonment. You set up a beautiful Notion database. You tag and organize for 3 weeks. Then a busy month hits. By month 3, you’re dropping things in but not organizing them. By month 6, the system has become as chaotic as what you started with.
The LLM Knowledge Base Pattern eliminates the maintenance requirement almost entirely. You still add data. The organization happens automatically.
The architecture: three folders
The system is built on three folders with specific purposes:
raw/
This is your inbox. Everything you want to include in your knowledge base goes here, in whatever state it’s in:
- Markdown files from Obsidian or Roam
- PDF articles (or their text extracts)
- Notion exports
- Google Docs exports
- Plain text files
- Personal notes
- Blog posts you’ve saved
Nothing needs to be organized. The folder is intentionally flat. Tags are irrelevant. The only rule: if you want the AI to know about it, it goes in raw/.
wiki/
This is the compiled output. You never manually create files here , the AI builds it from what’s in raw/. The wiki contains:
Concept articles , A file per major topic. If your raw folder is full of notes about competitive strategy, the AI compiles a competitive-strategy.md article that synthesizes key points from all your relevant sources, with citations.
Source summaries , One summary file per source in your raw folder. Each summary captures: what this source claims, the evidence, the key takeaways, and which concepts it relates to.
Master index , A navigable INDEX.md that maps your knowledge base by topic, concept, and source. The starting point for any navigation session.
outputs/
This is where Q&A reports live. When you ask a question against your knowledge base, the response gets compiled here as a formatted Markdown document. Over time, these outputs become a record of what you’ve asked and what your knowledge base said, and they feed back into future compilations.
The schema file: CLAUDE.md
The fourth component isn’t a folder , it’s a file. CLAUDE.md (or SYSTEM.md if you prefer) is a schema document that sits at the root of your knowledge base.
This file tells the LLM exactly how your vault is structured: what the folders mean, what conventions to use for concept articles, how to format source summaries, what citation format to use. When you run a compilation or a Q&A query, this file is always included in the context.
The CLAUDE.md does something important: it makes your vault self-documenting. Any LLM reading this file can understand your knowledge base well enough to add to it correctly. This is what makes the system maintainable at scale , as your vault grows, new compilations maintain consistency because they’re always working from the same schema.
A minimal CLAUDE.md includes:
# Knowledge Base Schema
## Structure
- raw/ , Source material, unprocessed
- wiki/ , AI-compiled knowledge articles
- outputs/ , Q&A and analysis outputs
## Concept Article Format
Each concept article should include:
- Definition (1-2 sentences)
- Key claims (bulleted)
- Debates and tensions
- Related concepts (with links)
- Source citations
## Source Summary Format
Each source summary should include:
- Core argument
- Methodology (if applicable)
- Key findings
- Relevance to [your domain]
- My notes (from raw/ annotations)
You customize this for your domain and preferences. It evolves over time.
The compilation process
When your raw folder has enough new material to warrant a compilation run (monthly is typical), the process is:
- Load all files from
raw/into context - Load the
CLAUDE.mdschema into context - Load the existing
wiki/into context (for continuity) - Run a compilation prompt that instructs the LLM to update and expand the wiki based on new raw material
- Write the updated wiki/ files back to disk
- Run a health check pass (broken links, orphaned notes, thin articles)
This is what we run for our clients monthly. The LLM reads everything, integrates the new raw material into the existing knowledge structure, adds new concept articles where needed, updates existing articles with new sources, and flags anything that needs human attention.
Running Q&A against your knowledge base
Once the wiki is compiled, you can query it. The query process:
- Load the
wiki/into context - Load the
CLAUDE.md - Submit your question
- Save the response to
outputs/
The quality of Q&A responses is directly proportional to the quality and depth of your wiki. In month 1, you get competent answers. In month 12, after 12 monthly compilations, you get answers that synthesize years of your own reading back to you with precise citations.
This is the compounding effect. The system gets more valuable the longer you run it.
Why this pattern works when others don’t
No mandatory tagging. Tags require consistent human judgment about categorization. The AI handles categorization.
No link maintenance. In systems like Roam or Obsidian, maintaining a useful link graph requires manually linking notes as you write them. Here, the AI builds the link graph automatically during compilation.
No organizational hierarchy decisions. Deciding where to file something is a cognitive overhead most people aren’t willing to pay consistently. Raw is raw is raw , no decision required.
It degrades gracefully. If you don’t add anything new for 3 months, your knowledge base doesn’t deteriorate. The wiki stays current for what it covers. You just haven’t extended it.
What this looks like at different scales
Solo consultant, 2 years of notes: A first compilation typically produces 60-80 concept articles, 200+ source summaries, and reveals connections the user couldn’t have found manually.
Agency with 5 years of client work: A team vault might have 3 separate wikis (competitive intel, client work, content strategy). Monthly compilations keep all three current.
Researcher with a PhD’s worth of reading: Source summaries synthesize the literature; relationship mapping shows which papers are actually responding to each other.
The pattern scales. What changes is the volume of raw material and the number of vaults.
Building this yourself vs. having it built
You can implement this pattern yourself if you’re comfortable with:
- Running LLM API calls or using Claude directly
- Managing a folder structure and prompt engineering
- Running monthly compilations manually
If that sounds like a task you’ll actually maintain, do it yourself. The pattern is open , there’s nothing proprietary about it.
If it sounds like one more technical project you’ll start and not finish, that’s what we do. Setup in 48 hours, ongoing management monthly. The methodology is the same; we just run it for you.
Want this built for you? Book a setup call and we’ll have your knowledge base compiled within 48 hours of receiving your raw files.