Skip to content

Instantly share code, notes, and snippets.

View tjbrennan's full-sized avatar

Taylor Brennan tjbrennan

  • San Francisco, CA
View GitHub Profile
@tjbrennan
tjbrennan / llm-wiki.md
Created May 3, 2026 05:44 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

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 is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

Shanghai-Style Hong Shao Rou

Ingredients

  • Pork Belly with Skin
  • 1 stick of Cinnamon
  • 3 Star Anise
  • 3 Ginger pieces
  • 2 Bay Leaves
  • About 2 spoonfuls of Dark Soy Sauce
@tjbrennan
tjbrennan / README.md
Last active August 29, 2015 14:15 — forked from milroc/README.md

d3.unconf example gist. Fork it here.

// Long-polling chat server + client.
var chats = [];
require('http').createServer(function(req, res) {
if (/\/c/.test(req.url)) return res.end(chats.join('\n'));
var m = req.url.split('=');
if (m.length > 1) chats.unshift(m[1].replace(/\+/g, ' '));
res.end('<html><body><form><input name="m"></form><pre></pre><script>'
+ 'var r=new XMLHttpRequest;(function e(){r.open("GET","/c",true);r.send();r.onreadystatechange=function(){if(r.readyState==4){document.getElementsByTagName("pre")[0].innerHTML=r.responseText;setTimeout(e,1e3)}}})();document.forms[0].m.focus()'
+ '</script></body></html>')
}).listen(parseInt(process.env.PORT, 10)|| 3000);