Skip to content

Instantly share code, notes, and snippets.

@woosal1337
woosal1337 / llm-wiki.md
Created April 7, 2026 21:36 — 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.

@woosal1337
woosal1337 / postgresql-mac
Created July 17, 2023 10:01
PostgreSQL Mac Setup
If you need to have postgresql@15 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc
For compilers to find postgresql@15 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/postgresql@15/lib"
export CPPFLAGS="-I/opt/homebrew/opt/postgresql@15/include"
To start postgresql@15 now and restart at login:
brew services start postgresql@15
Or, if you don't want/need a background service you can just run:
$ conda config --append channels conda-forge
$ conda create --name py11 python==3.11
@woosal1337
woosal1337 / wsl2
Created August 11, 2022 08:36
WSL2 on Windows 10
$ wsl.exe --install
$ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
$ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
$ wsl --set-default-version 2
$ wsl.exe --set-version Ubuntu 2

Keybase proof

I hereby claim:

  • I am woosal1337 on github.
  • I am woosal (https://keybase.io/woosal) on keybase.
  • I have a public key ASDCxVFGtmVPPA5JKI1HiKplXkzmsP7ZjfLZS0neMhJEqwo

To claim this, I am signing this object:

@woosal1337
woosal1337 / archive-linux
Created July 5, 2022 13:27
🐧Linux archive CLI
cd / # THIS CD IS IMPORTANT THE FOLLOWING LONG COMMAND IS RUN FROM /
tar -cvpzf backup.tar.gz \
--exclude=/backup.tar.gz \
--exclude=/proc \
--exclude=/tmp \
--exclude=/mnt \
--exclude=/dev \
--exclude=/sys \
--exclude=/run \
--exclude=/media \
sudo apt-get install 'bluez*'
sudo apt-get install blueman
@woosal1337
woosal1337 / keybase_ubuntu_22.04_Jammy_Jellyfish
Created May 27, 2022 21:44
Keybase fix for Ubuntu 22.04 Jammy Jellyfish edition
Instead of adding --disable-gpu-sandbox manually each time, it worked for me to edit /usr/lib/systemd/user/keybase.gui.service and replace:
ExecStart=/opt/keybase/Keybase
with:
ExecStart=/opt/keybase/Keybase --disable-gpu-sandbox
(I've had rendering issues with the Keybase GUI in Ubuntu earlier, so maybe this solves that as well crossed_fingers)
@woosal1337
woosal1337 / nodejs_ubuntu_22.04_Jammy_Jellyfish
Created May 27, 2022 21:43
Nodejs installation fix for Ubuntu 22.04 Jammy Jellyfish edition
sudo curl -LO https://nodejs.org/dist/v18.0.0/node-v18.0.0-linux-x64.tar.xz
sudo tar -xvf node-v18.0.0-linux-x64.tar.xz
sudo cp -r node-v18.0.0-linux-x64/{bin,include,lib,share} /usr/
node --version # => v18.0.0
@woosal1337
woosal1337 / .mp4-to-.mov-ffmpeg-davinci-resolve
Created November 6, 2021 13:43
Davinci Resolve 16+ on Linux fix .mp4 videos to work by converting them automatically to .mov files using ffmpeg.
mkdir transcoded; for i in *.mp4; do ffmpeg -i "$i" -vcodec mjpeg -q:v 2 -acodec pcm_s16be -q:a 0 -f mov "transcoded/${i%.*}.mov"; done