Graphify: The Knowledge Graph Tool Born from a Single Karpathy Tweet
Background: Karpathy's LLM Wiki Vision
On April 2, Andrej Karpathy posted that he increasingly prefers using LLMs to build personal knowledge bases rather than just generating code. His workflow: dump raw materials (papers, screenshots, code snippets, notes) into a /raw folder, then have the LLM compile them into a structured, internally linked knowledge Wiki — instead of retrieving fragments from raw documents on every query. This contrasts sharply with RAG: Karpathy advocates "compile once, reuse persistently." He summarized it as: Obsidian is the IDE, the LLM is the programmer, the knowledge Wiki is the codebase.
On April 4 he published an ideas file on GitHub Gist detailing a three-layer LLM Wiki architecture, stressing that knowledge should accumulate continuously rather than be rediscovered on every question. This became the inspiration for Graphify.
Birth: From Idea to Project in 48 Hours
Safi Shamsi, an AI graduate student from Birmingham, turned the idea into reality in under 48 hours, building Graphify on knowledge graph techniques from his master's thesis. The project was created on GitHub on April 3, gained over 6,000 stars within two days, and reached about 34,500 stars by April 25, topping GitHub trending and earning official integrations with more than ten AI coding platforms.
Core Idea: Don't Feed Code to AI — Let AI Draw the Knowledge Graph
Graphify preprocesses materials with a dual-channel extraction engine before generating a structured knowledge graph:
- Channel A: Deterministic AST extraction. For code files, Tree-sitter parses abstract syntax trees with zero LLM calls, extracting class definitions, function signatures, imports, call graphs, docstrings, and design-decision comments (e.g.,
# WHY:,# HACK:,# NOTE:). Confidence is fixed at 1.0. - Channel B: Semantic extraction. For Markdown/text/reStructuredText documents, PDFs, and images (PNG/JPG/WebP/GIF), LLM subagents extract concepts; images go through vision models and PDFs are mined for citations and concepts.
- EXTRACTED — explicitly found in source (confidence 1.0), e.g., AST-derived call or import relations.
- INFERRED — reasonably inferred by the LLM (confidence 0.6–0.9), e.g., semantic links between modules sharing data structures.
- AMBIGUOUS — uncertain, flagged for human review.
- Query cost: only graph summaries and relevant nodes are read, not raw document chunks.
- Knowledge accumulation: unlike one-shot RAG retrieval, the graph persists and grows with each new source.
- Cross-document synthesis: inter-document links are pre-built, so no re-discovery per query.
The merged results form a NetworkX graph, partitioned into knowledge communities via the Leiden algorithm — no vector database or embeddings required. Outputs include an interactive HTML graph, structured JSON, and a Markdown audit report highlighting "god nodes," "surprising connections," and suggested questions.
Confidence Labels: Every Edge Is Accountable
Each relationship edge carries a three-level confidence label:
This keeps the graph transparent: developers know exactly which connections are certain and which are guesses.
Efficiency: 71.5x Token Savings
Compared to having the model read raw files, querying the Graphify knowledge graph reportedly cuts token consumption by 71.5x. Key advantages:
Growth: 6,000 Stars in 48 Hours
Graphify hit GitHub trending almost immediately, gaining roughly 6,000 stars in two days and ~34,500 by April 25. It was integrated into over ten mainstream AI coding platforms, including Claude Code, OpenAI Codex, OpenCode, Cursor, GitHub Copilot CLI, Factory Droid, Trae, and Google Antigravity — a positive feedback loop of popularity and ecosystem support.
Karpathy's Vision: Knowledge Should Accumulate
The shared vision: a knowledge base that auto-updates when new material is added and reuses existing structure on every query. Graphify takes a concrete step toward this by letting LLMs stand on accumulated knowledge rather than re-exploring raw files each time. Open challenges remain, such as automatically detecting and correcting contradictions in the graph (Karpathy's proposed "Lint" operation) and making the tool accessible to non-technical users.
Conclusion
Graphify demonstrates the potential of the knowledge graph + LLM combination: knowledge becomes a growing, queryable, comprehensible network rather than static text. Born from a single tweet and built in 48 hours, it validates knowledge graphs in the LLM era and sets a benchmark for the "LLM + knowledge management" space.