Skip to content

Instantly share code, notes, and snippets.

@oremj
oremj / llm-wiki.md
Created August 4, 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.

https://bouncer-bouncer.stage.mozaws.net/?attribution_code=Y2FtcGFpZ249dGVzdGNhbXBhaWduJmNvbnRlbnQ9dGVzdGNvbnRlbnQmZXhwZXJpbWVudD1leHAxJmluc3RhbGxlcl90eXBlPWZ1bGwmbWVkaXVtPXRlc3RtZWRpdW0mc291cmNlPW1vemlsbGEuY29tJnRpbWVzdGFtcD0xNTkxMjg4NjY3JnZhcmlhdGlvbj12YXIx&attribution_sig=24fe67c6fedbbde3767f9d4ebb73bdcdeb2c7778e042fd429e1b4e5d1b1f3ea2&lang=en-US&os=win&product=firefox-latest-ssl
@oremj
oremj / bigquery_cloudfront_schema.txt
Last active May 13, 2020 22:21
bigquery cloudfront schema
date:DATE,time:STRING,location:STRING,bytes:INTEGER,request_ip:STRING,method:STRING,host:STRING,uri:STRING,status:INTEGER,referrer:STRING,user_agent:STRING,query_string:STRING,cookie:STRING,result_type:STRING,request_id:STRING,host_header:STRING,request_protocol:STRING,request_bytes:INTEGER,time_taken:FLOAT,xforwarded_for:STRING,ssl_protocol:STRING,ssl_cipher:STRING,response_result_type:STRING,http_version:STRING,fle_status:STRING,fle_encrypted_fields:STRING,c_port:INTEGER,time_to_first_byte:FLOAT,x_edge_detailed_result_type:STRING,sc_content_type:STRING,sc_content_len:INTEGER,sc_content_start:STRING,sc_range_end:STRING
@oremj
oremj / watch_cloudwatch_logs.py
Created November 12, 2019 16:08
watch_cloudwatch_logs.py
#!/usr/bin/env python3
import click
import boto3
import time
logs_client = boto3.client('logs')
@click.command()
@oremj
oremj / keybase.md
Created August 12, 2019 16:38
keybase.md

Keybase proof

I hereby claim:

  • I am oremj on github.
  • I am oremj (https://keybase.io/oremj) on keybase.
  • I have a public key whose fingerprint is 86C6 7AC2 70EB DB77 D8F8 6701 61C0 4E72 F8DE 7B67

To claim this, I am signing this object:

@oremj
oremj / input
Created October 30, 2018 23:36
This file has been truncated, but you can view the full file.
100000
100000
23860 99865
50763 32492
58198 12402
62324 45154
36169 83580
21219 10561
64338 16841
93963 37330
@oremj
oremj / settings.json
Created October 25, 2018 19:21
VSCode settings.json
{
"python.linting.enabled": false,
"python.pythonPath": "/usr/local/bin/python3",
"window.zoomLevel": -1,
"editor.formatOnSave": true,
"vim.neovimPath": "/usr/local/bin/nvim",
"workbench.list.openMode": "doubleClick",
"files.associations": {
"*.jsonnet": "json"
},
https://cdn.stubdownloader.services.mozilla.com/builds/firefox-stub/en-US/win/1f023ec81783c9d3cc86c148ab3495f0cd6ae06eb711c05a84fec710ce5377b4/Firefox%20Installer.exe
# This configuration file for Fluentd is used
# to watch changes to Docker log files that live in the
# directory /var/lib/docker/containers/ and are symbolically
# linked to from the /var/log/containers directory using names that capture the
# pod name and container name. These logs are then submitted to
# Google Cloud Logging which assumes the installation of the cloud-logging plug-in.
#
# Example
# =======
# A line in the Docker log file might look like this JSON:
@oremj
oremj / customresp.js
Created December 1, 2017 17:14
bug 1408474
'use strict';
const https = require('https');
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
let username = 'Guest';
if (request.headers['user-name']) {
username = request.headers['user-name'][0].value;