Skip to content

Instantly share code, notes, and snippets.

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.

@OrionReed
OrionReed / dom3d.js
Last active July 13, 2026 17:34
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@RazhanHameed
RazhanHameed / resolve_ae.py
Last active September 9, 2023 07:24
A Python function to correct the misspelling of the AE character (ە) in Kurdish text.
import re
def resolve_ae(text):
"""
This function takes a text input in Central Kurdish (Sorani) script and performs a series of character replacements
to standardize variations in the script. Specifically, it addresses cases where the character 'ە' (Arabic letter
AE) may be used in different contexts.
"""
# First replace all occurrences of 'ه' with 'ە'
text = re.sub("ه", "ە", text)
@Justasic
Justasic / tlo.hexpat
Last active May 1, 2023 16:00
ImHex (https://imhex.werwolv.net/) Telegram TLO object decoding (TLO schema v2 should match what Telegram uses)
#include <std/mem.pat>
#include <std/io.pat>
#include <std/sys.pat>
enum ConstructorIDType : u32 {
CID_TLSTYPE = 0x12eb4386,
CID_NATCONST = 0x8ce940b1,
CID_NATVAR = 0x4e8a14f0,
CID_EXPRNAT = 0xdcb49bd8,
CID_EXPRTYPE = 0xecc9da78,
@DavideGalilei
DavideGalilei / README.md
Created March 9, 2023 12:44
Physics simulation test in C + SDL2
@Elschnagoo
Elschnagoo / Semaphor.ts
Created July 28, 2022 02:37
Simple Typescript Semaphor / Mutex
import crypto from 'crypto';
export type SemElement = [string, (value: any | PromiseLike<any>) => void];
export class Semaphor {
private curQueue: Map<string, SemElement>;
private readonly max: number;
private callbackQueue: SemElement[];
@alemidev
alemidev / commit-msg.sh
Last active July 16, 2023 18:17
A git hook that forces you to respect Commit Convention
#!/bin/bash
#
# Commit Convention Hook | alemi <me@alemi.dev> May 2022
#
# A simple git hook to enforce (sort of) Commit Convention.
# www.conventionalcommits.org
#
# This script uses bash builtin regex matching, so it's not sh compatible.
#
# Commit message will be stripped of comments (lines starting with #) and matched
@allekok
allekok / blockchain.py
Created May 19, 2022 18:19
Blockchain
import hashlib
blockchain = []
difficulty = 3
mine_pattern = '0' * difficulty
def add_block(data):
block = make_block(data)
block['prev'] = '' if blockchain == [] else blockchain[-1]['hash']
mine_block(block)
@MidSpike
MidSpike / readme.md
Last active July 12, 2026 09:19
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@painor
painor / call.ts
Created February 9, 2022 21:41
Make a call in telegram using GramJS
import { StoreSession} from "telegram/sessions";
import { TelegramClient } from "telegram/client/TelegramClient";
import { Api } from "./tl";
import { generateRandomBigInt, readBigIntFromBuffer, readBufferFromBigInt, sha256 } from "telegram/Helpers";
import bigInt from "big-integer";
const apiId = ;