Skip to content

Instantly share code, notes, and snippets.

@webcane
webcane / llm-wiki.md
Last active July 7, 2026 11:00 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Knowledge Compiler

A pattern for building persistent knowledge bases using LLMs.

This is an idea file, designed to be copied into your own LLM agent (OpenAI Codex, Claude Code, OpenCode, Pi, etc.). Its purpose is to communicate the architecture, while leaving implementation details to the agent and the user.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM rediscovers knowledge from scratch on every question. Nothing accumulates.

<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@webcane
webcane / index.html
Last active December 10, 2015 09:18 — forked from anonymous/index.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
/* reset */
html, body, div, span, applet, object, iframe,
h1, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,