Skip to content

Instantly share code, notes, and snippets.

View drpoggi's full-sized avatar

David Poggi drpoggi

  • Grand Rapids, MI
View GitHub Profile
@drpoggi
drpoggi / llm-wiki.md
Created May 15, 2026 20:19 — 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.

@drpoggi
drpoggi / main.py
Created May 12, 2018 00:25
Adafruit unmodified main.py from PyCon 2018
# Gemma IO demo
# Welcome to CircuitPython 2.2.4 :)
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from digitalio import DigitalInOut, Direction, Pull
from analogio import AnalogIn, AnalogOut
from touchio import TouchIn
import adafruit_dotstar as dotstar
import microcontroller
@drpoggi
drpoggi / with_web_import.txt
Created March 15, 2018 23:59
Aiohttp with web import
import time: self [us] | cumulative | imported package
import time: 638 | 638 | _frozen_importlib_external
import time: 78 | 78 | zipimport
import time: 71 | 71 | _codecs
import time: 571 | 642 | codecs
import time: 447 | 447 | encodings.aliases
import time: 720 | 1808 | encodings
import time: 285 | 285 | encodings.utf_8
import time: 231 | 231 | _signal
import time: 578 | 578 | encodings.latin_1
@drpoggi
drpoggi / no_web_import.txt
Created March 15, 2018 23:59
Aiohttp no web import
import time: self [us] | cumulative | imported package
import time: 703 | 703 | _frozen_importlib_external
import time: 81 | 81 | zipimport
import time: 70 | 70 | _codecs
import time: 525 | 595 | codecs
import time: 452 | 452 | encodings.aliases
import time: 700 | 1747 | encodings
import time: 248 | 248 | encodings.utf_8
import time: 145 | 145 | _signal
import time: 345 | 345 | encodings.latin_1
@drpoggi
drpoggi / install_pyenv.sh
Last active March 6, 2018 22:23
Install Pyenv
sudo apt-get update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev git
PYTHON_VERSION="$1"
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
sudo chown $USER:$USER .pyenv
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
@drpoggi
drpoggi / install_docker.sh
Last active January 17, 2018 02:33
Script for installing Docker and Docker Compose on Ubuntu
#!/usr/bin/env bash
sudo apt-get update
# allows Docker to us aufs storage driver
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
# stuff we need to install over https
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common