Draft status: This is the technical tutorial targeting “how to” search intent. High Q&A and SEO value. Fill in with actual prompts, example outputs, and screenshots before publishing. This post can link to the service offering for readers who don’t want to DIY.
Who this is for
This post is for people who want to build the LLM Knowledge Base Pattern themselves, using Claude as the compilation engine. If you understand Markdown, can manage a folder structure, and are comfortable working with Claude’s Projects feature or API, you can build this system yourself.
If you’d rather have this built for you, that’s what we do. Skip to the end if that’s you.
The tools you need
- Claude Sonnet or Opus (claude.ai, with a paid plan for large context)
- A folder structure (local disk is fine; Google Drive works; any system you can export files from)
- Your raw notes (Markdown, PDF text extracts, Word docs , anything text-based)
No special software required. This runs in Claude’s web interface. The only technical requirement is the ability to paste or upload text.
Step 1: Create your folder structure
Create a folder on your computer. Inside it, create three subfolders:
knowledge/
├── raw/
├── wiki/
└── outputs/
Move everything you want in your knowledge base into raw/. Don’t organize , dump everything in. The messier, the better.
[EXPAND: Tip on what “everything” means. Specifically: how to export from Notion, Obsidian, Apple Notes, Google Docs. Bullet points with the export method for each. This is high-value practical advice that searchers are looking for.]
Step 2: Write your CLAUDE.md schema file
Create a file called CLAUDE.md at the root of your knowledge folder (not inside any subfolder).
This file defines the rules the AI will follow when compiling your wiki. Here’s a starter template:
# Knowledge Base Schema
## My knowledge domains
[List your main areas of expertise / interest here]
Example: B2B marketing strategy, SaaS product management, competitive intelligence
## Folder structure
- raw/ , Source material, unprocessed. Add anything here.
- wiki/ , AI-compiled knowledge. Do not manually edit.
- outputs/ , Q&A reports and analysis.
## Concept article format
Each wiki article should follow this structure:
1. Definition (2-3 sentences)
2. Key claims or principles (bulleted)
3. Where this is debated or uncertain
4. Related concepts (markdown links to other wiki articles)
5. Sources (citing which raw files support each claim)
## Source summary format
Each source summary should include:
1. Title and author
2. Core argument (1 paragraph)
3. Key findings (bulleted)
4. My annotations (from any highlights or notes in the raw file)
5. Relevance to my domains
[EXPAND: Make this concrete. Show an example CLAUDE.md for a specific persona , consultant, researcher. Show what it looks like to customize for your domain. Include the exact prompt you’ll use to generate your CLAUDE.md automatically if you don’t want to write it manually.]
Step 3: Run your first compilation
[THIS SECTION IS THE HIGH VALUE SECTION , be very specific]
Open Claude and start a new Project (this is important , Projects maintain context across sessions).
Upload your raw files to the Project context. Then run this prompt:
[INSERT ACTUAL COMPILATION PROMPT HERE]
Draft version: “I’m building a second brain knowledge base using the LLM Knowledge Base Pattern. I’m going to provide you with my raw notes and files. Please read everything and build wiki concept articles following the schema in CLAUDE.md. For each major concept you identify in my raw material, create a concept article. Also create a summary for each source file. Generate an INDEX.md at the end.”
[EXPAND: The actual prompt you use. This is the most valuable thing in the post. Be specific. Show what a compilation prompt looks like, what the output looks like, and how to handle edge cases (what if the raw folder is too big for one context window?).]
Step 4: Review and refine the wiki
After the first compilation, your wiki/ folder will have:
- Concept articles for every major topic the AI identified
- Source summaries for every file you provided
- An INDEX.md with navigation
Your job now is to review, not to edit. Look for:
- Concepts that got split unnecessarily into two articles (merge them)
- Concept labels that don’t match how you think about topics (rename)
- Sources that got misinterpreted (add a correction note to the CLAUDE.md)
Don’t manually write wiki content. The wiki is AI-maintained. If you write things manually in wiki/ they’ll get overwritten on the next compilation run. Instead, add clarifications and corrections to CLAUDE.md so the next run incorporates them automatically.
[EXPAND: Screenshots or examples of what a first compilation looks like. An example concept article before and after a refinement cycle. Make this feel real.]
Step 5: Run Q&A queries
Once the wiki is compiled, you can query it. The easiest way:
- Upload your wiki/ folder contents to Claude
- Include CLAUDE.md in the context
- Ask a question directly: “Based on my knowledge base, what do I know about [topic]?”
[INSERT EXAMPLE Q&A round-trip. The question, the context setup, the output. This is what readers want to see , proof that this works.]
Maintaining the system monthly
On whatever cadence works for you (monthly is typical):
- Add new raw files to raw/
- Run a new compilation with the updated raw material
- Review the updated wiki for new articles and updated existing ones
- Run any Q&A queries you’ve been collecting
Total time: 20-30 minutes per month, plus whatever time you spent adding raw files (which is near-zero if you’re just dropping things in as you go).
[EXPAND: Tips on making the monthly run efficient. What to do when your raw folder gets very large. How to handle running out of context window.]
When to DIY vs. when to hire it out
Build this yourself if:
- You’re comfortable with technical workflows
- You enjoy the process of building and iterating on your own systems
- You have 2-3 hours for the initial setup and 30 minutes/month for maintenance
Hire it out if:
- You want the end result without the setup time
- You’ve tried building this yourself and haven’t finished it
- You want the assurance that the first compilation is done right
We build and maintain this for you: See the setup service →. $1,500, 48-hour delivery after we receive your raw files.