Skip to content

Instantly share code, notes, and snippets.

@kkpoon
kkpoon / llm-wiki.md
Created May 11, 2026 20:00 — 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.

To setup AWS S3 for your CI/CD,

  1. Create S3 buckets for deployment

  2. Create an IAM user

aws iam create-user --user-name ci-bot
@kkpoon
kkpoon / bootstrap.sh
Last active December 21, 2018 02:49
userdata to boot a VM to build servo
#!/bin/sh
apt-get -y update
apt-get -y install git curl autoconf libx11-dev \
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
gperf g++ build-essential cmake virtualenv python-pip \
libssl1.0-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev \
libharfbuzz-dev ccache clang \

Keybase proof

I hereby claim:

  • I am kkpoon on github.
  • I am kkpoon (https://keybase.io/kkpoon) on keybase.
  • I have a public key ASAo-rVblJbbmKStvrsKjDZMX_ALAMRXc0TaKVGj0G71UQo

To claim this, I am signing this object:

@kkpoon
kkpoon / Dockerfile
Created August 24, 2018 10:01
Dockerfile shows how to Install cx_Oracle in Docker
FROM centos:7
RUN mkdir -p /opt/oracle
WORKDIR /opt/oracle
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
RUN yum update -y && \
yum install -y unzip libaio python36u python36u-pip && \
@kkpoon
kkpoon / main.go
Created September 5, 2017 14:42
multi-channel consumer
package main
import "fmt"
func sum(id int, c <-chan int) {
for num := range c {
fmt.Printf("%d %d\n", id, num)
}
}
@kkpoon
kkpoon / .bash_profile
Last active November 27, 2016 14:18
macos git environment
# git tab completion (homebrew)
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then
. `brew --prefix`/etc/bash_completion.d/git-completion.bash
fi
if [ -f `brew --prefix`/etc/bash_completion.d/git-prompt.sh ]; then
. `brew --prefix`/etc/bash_completion.d/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\u:\W$(__git_ps1 " (%s)") \$ '
fi
iPhone :: String -> String
iPhone "7" = "就是七"
iPhone _ = "Poor guy"
main = do
putStrLn "What is your iPhone model?"
model <- getLine
putStrLn $ iPhone model
import Cycle from '@cycle/core';
import {makeDOMDriver, div, label, input, hr, h1, button} from '@cycle/dom';
import {makeHTTPDriver} from '@cycle/http';
import Rx from 'rx';
function main({DOM, HTTP}) {
const username$ = DOM.select('.username')
.events('input')
.map(ev => ev.target.value)
.startWith("");