
Comment je me suis construit un « deuxième cerveau » IA (Obsidian + Claude Code)
AI Summary
This video introduces a method to create a "second brain," a knowledge base that can be useful for various aspects of life, such as personal AI monitoring, or for developers working on projects requiring extensive context. The speaker emphasizes that this knowledge brain will manage and improve itself automatically, and it's not as complex as it might seem.
The concept draws inspiration from a tweet by Karpathy, co-founder of OpenAI and former head of AI at Tesla, which garnered 20 million views and led to a project receiving 5,000 stars on GitHub within a week. Karpathy's idea was to transform Claude into a self-growing personal wiki, similar to Wikipedia but focused on an individual's projects, interests, and monitoring.
A common issue with daily use of Large Language Models (LLMs) is their limited memory; they forget information quickly. While solutions like Notebook LM or custom GPTs exist, they rely on Retrieval Augmented Generation (RAG). The fundamental problem with RAG is that for every question, the LLM retrieves small chunks of information and reconstructs a response from scratch. This means knowledge doesn't accumulate or build upon itself. Even after feeding 500 PDFs into Notebook LM, the model might still not grasp the domain, requiring the same work to be redone the next day.
Karpathy’s insight was to make the LLM compile knowledge once and for all, building and maintaining a persistent wiki instead of re-reading sources for every query. This system is structured in three layers:
1. **Raw Sources:** This layer holds raw data like PDFs, articles, and transcripts. The LLM reads these but never modifies them.
2. **The Wiki:** This layer consists of .md (Markdown) files that the LLM writes and maintains. It includes pages for each concept, model, AI tool, or benchmark, with interlinking similar to Wikipedia.
3. **The Schema:** This is a `cloud.md` file that instructs Claude on how to structure information and what conventions to follow, acting as a contract.
In this setup, Obsidian becomes the Integrated Development Environment (IDE), the LLM acts as the programmer, and the wiki serves as the codebase. The core principle is that knowledge becomes code. As new information is added, existing pages are enriched, leading to a self-compiling, self-maintaining system that grows with each new source.
Obsidian is chosen for several reasons:
* **Local and Markdown-based:** It's a free, local Markdown editor. This avoids proprietary databases and cloud dependency. If Obsidian were to disappear, the knowledge, stored as .md files, would still be accessible with any text editor, ensuring ownership of the second brain.
* **Graph View:** This feature allows for visual representation of knowledge, making it easy to see the connections and structure of information.
* **LLM Compatibility:** Claude is highly proficient with .md files, as Markdown is a prevalent format in its training data. This makes it easy for Claude to write clean wiki pages and synthesize large amounts of text.
The video then provides a practical guide to setting up this second brain:
1. **Download and Install Obsidian:** The tutorial is compatible with both Windows and Mac.
2. **Create an Obsidian Vault:** A new vault (e.g., "veille IA" for AI monitoring) is created, and its storage location is chosen. The speaker also switches to dark mode for personal preference.
3. **Open the Vault in VS Code:** The vault folder is opened in VS Code to view its contents, which initially include some standard files.
4. **Launch Claude and Provide Instructions:** The instructions, based on Karpathy's structure, are copied and pasted into Claude. It's recommended to use English for commands. The instructions tell Claude to act as an LLM Wiki agent, implement the idea file as a complete second brain, guide step-by-step, create the `cloud.md` schema file with rules, configure `index.md` and `log.md`, define folder naming conventions, and demonstrate the first ingestion example. All text for these instructions is available on the speaker's GitHub.
5. **Create Custom Commands:** Within the vault, a `.cloud` folder is created, and inside it, custom command files: `ingest.md`, `lint.md`, `query.md`, and `save.md`. The content for these files is also available on GitHub.
6. **Install Obsidian Web Clipper:** A browser extension called Obsidian Web Clipper (available for Firefox and Chrome) is installed. This extension allows users to convert web page content into .md files and directly add them to Obsidian.
7. **Ingest Articles:**
* An article from an AI blog is clipped using the extension and saved into Obsidian.
* Another article from the OpenAI blog is also clipped and added.
* These clipped articles are initially placed in the `row/assets` folder, designated for raw, unorganized data, as Claude will sort them.
* The `ingest` command is then triggered in Claude, pointing to the article files (renamed to `article1.md` and `article2.md` to remove special characters and spaces that Claude dislikes).
* Claude processes the articles, extracting important information and creating corresponding .md files for concepts like "Glass Wing project," "Sony 4.6," and "Opus 4." These files are interlinked, visible in Obsidian's graph view, showing how new knowledge connects with existing information. For example, the "Glass Wing project" is shown to be related to "Cloud Mythos preview" and "security concerns," involving Facebook and Windows.
8. **Query the Second Brain:** After ingestion, the `query` command is used to ask questions, such as "What happened with the Axios supply chain attack?" Claude provides a detailed answer and asks if the response should be saved as a summary in the wiki, further enriching the knowledge base.
9. **Lint the Second Brain:** The `lint` command is run to check for errors, contradictions, or inconsistencies within the second brain, ensuring its health and accuracy.
The speaker concludes by expressing enthusiasm for the concept, highlighting how this visual second brain allows users to see connections within their knowledge, and encourages viewers to like, comment, and share the video.