English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Graphify: The Knowledge Graph Tool Born from One Karpathy Tweet

Forum topic · ✨步子哥 · 2026-04-25

Summary

Graphify is an open-source tool that turns scattered code, documents, papers, and images into a structured, queryable knowledge graph for LLMs. It was inspired by Andrej Karpathy's April tweet proposing an 'LLM Wiki' — compiling raw materials into a persistent, interlinked knowledge base instead of retrieving fragments via RAG at query time. Built in under 48 hours by AI graduate student Safi Shamsi, Graphify uses a dual-channel extraction engine: deterministic AST analysis via Tree-sitter for code (confidence 1.0), and LLM-based semantic extraction for documents, PDFs, and images. Relationships are labeled EXTRACTED, INFERRED (0.6–0.9 confidence), or AMBIGUOUS for transparency. Community detection with the Leiden algorithm clusters knowledge without vector databases. According to the project, querying the compiled graph cuts token consumption by roughly 71.5x versus feeding raw files. The project gained 6,000+ GitHub stars in 48 hours and about 34,500 stars by April 25, with official integrations across a dozen AI coding platforms including Claude Code, Cursor, and GitHub Copilot CLI.

Graphify: The Knowledge Graph Tool Born from One Karpathy Tweet

Background: Karpathy's LLM Wiki Idea

On April 2, Andrej Karpathy posted a widely discussed tweet arguing that he increasingly prefers using LLMs to build personal knowledge bases rather than just generate code. He described dumping raw materials (papers, screenshots, code snippets, notes) into a /raw folder and having an LLM compile them into a structured knowledge Wiki — instead of retrieving fragments from raw documents at every query, as traditional RAG does. His analogy: Obsidian is the IDE, the LLM is the programmer, and the knowledge Wiki is the codebase. Knowledge, he argued, should accumulate persistently rather than be rediscovered each session. He later published a detailed idea file on GitHub Gist laying out the LLM Wiki architecture.

Birth: From Idea to Reality in 48 Hours

Safi Shamsi, an AI graduate student from Birmingham, turned the idea into a working open-source tool in less than 48 hours, drawing on knowledge graph research from his master's thesis. Graphify was created on GitHub on April 3, earned over 6,000 stars within two days, and reached roughly 34,500 stars by April 25, with official integrations on a dozen-plus major AI coding platforms.

Core Philosophy: Don't Feed Code to AI — Let AI Draw the Knowledge Graph

Graphify pre-processes materials with a dual-channel extraction engine before an LLM ever answers a question:

  • Channel A — Deterministic AST extraction: Uses Tree-sitter to parse code, extracting class definitions, function signatures, imports, call graphs, docstrings, and design-decision comments (# WHY:, # HACK:, # NOTE:). Zero LLM calls; confidence fixed at 1.0.
  • Channel B — Semantic extraction: LLM sub-agents extract concepts from Markdown, text, reStructuredText, PDFs (including citations), and images (via vision models).
  • Results are merged into a NetworkX graph, and the Leiden algorithm performs community detection purely on graph topology — no vector database or embeddings required. Outputs include an interactive HTML graph, structured JSON, and a Markdown audit report highlighting "hub nodes," "surprising connections," and suggested questions.

    Confidence Labels: Every Edge Is Accountable

    Each relationship edge carries one of three labels:

  • EXTRACTED — explicitly found in source (confidence 1.0)
  • INFERRED — plausibly deduced by the LLM (confidence 0.6–0.9)
  • AMBIGUOUS — uncertain, flagged for human review
  • This makes the graph transparent: developers know exactly which connections are certain and which are guesses.

    Efficiency: ~71.5x Token Savings

    Compared with reading raw files, querying the compiled graph reportedly reduces token consumption by about 71.5x. Benefits include:

  • Query cost: answers draw on pre-compiled graph summaries instead of re-reading large document sets.
  • Knowledge accumulation: new materials update the graph; prior knowledge is reused rather than re-derived per query (unlike one-shot RAG retrieval).
  • Cross-document synthesis: inter-document links are pre-built, so multi-source questions don't require rediscovering connections each time.

Growth: 6,000 Stars in 48 Hours

Star growth was nearly vertical: 6,000+ stars in the first 48 hours, ~34,500 by April 25. Graphify was quickly integrated by major AI coding platforms including Claude Code, OpenAI Codex, OpenCode, Cursor, GitHub Copilot CLI, OpenClaw, Factory Droid, Trae, Google Antigravity, and others.

Karpathy's Vision: Knowledge Should Accumulate

The ideal knowledge base updates automatically as new material is added and reuses existing structure at query time. Graphify takes a concrete step toward this: LLMs answer from an already-compiled knowledge network rather than re-exploring raw sources. Open challenges remain — keeping the graph current across sessions (partially addressed via persistent graphs and incremental updates), auto-detecting contradictions and stale information (Karpathy's proposed "Lint" operation), and making the tool accessible to non-technical users.

Conclusion

From a single tweet to a 48-hour open-source project to tens of thousands of stars, Graphify embodies the open-source spirit and validates the value of knowledge graphs + LLMs. It suggests a shift from passive retrieval to active knowledge accumulation — with AI as a partner in building and maintaining knowledge systems, not a tool starting from zero each time.

Tags

#graphify#knowledge-graph#andrej-karpathy#llm#rag#open-source#tree-sitter#github

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177618750