Skip to content

Instantly share code, notes, and snippets.

View brandongalbraith's full-sized avatar

B brandongalbraith

  • Earth
View GitHub Profile

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.

@dabit3
dabit3 / you_couldve_invented_openclaw.md
Last active May 9, 2026 00:03
You Could've Invented OpenClaw

See more of my writing here. Also check out Devin

In this post, I'll start from scratch and build up to OpenClaw's architecture step by step, showing how you could have invented it yourself from first principles, using nothing but a messaging API, an LLM, and the desire to make AI actually useful outside the chat window.

End goal: understand how persistent AI assistants work, so you can build your own (or become an OpenClaw power user).

First, let's establish the problem

When you use ChatGPT or Claude in a browser, there are several limitations:

@rmtbb
rmtbb / listgitfiles.sh
Created September 3, 2025 22:23
List Git Files - List raw GitHub URLs for files in a repo or subfolder, filtered by extensions
#!/usr/bin/env bash
# listgitfiles.sh
# List raw GitHub URLs for files in a repo or subfolder, filtered by extensions.
# Full README is embedded and printed only with: listgitfiles.sh -h|--help
set -euo pipefail
# ------------------------- Minimal Help (usage) -------------------------
print_min_help() {
cat <<'USAGE'
@gmoz22
gmoz22 / tampermonkey-glinet-goodcloud-map.js
Last active April 21, 2026 21:22
GL.iNet GoodCloud dynamic world map - Tampermonkey
// ==UserScript==
// @name GoodCloud Dynamic Map
// @namespace https://www.steveinnovates.com
// @version 2025-07-24
// @description Displays a dynamic map of your bounded devices
// @author Steve Oziel
// @match https://www.goodcloud.xyz/
// @icon https://www.google.com/s2/favicons?sz=64&domain=goodcloud.xyz
// @grant none
// @downloadURL https://gist.github.com/gmoz22/3daa61753f27562dd7af460cb8a12eb6
@bagder
bagder / slop.md
Last active April 16, 2026 18:52
AI slop security reports submitted to curl

Slop

This collection is limited to only include the reports that were submitted as security vulnerabilities to the curl bug-bounty program on Hackerone.

Several other issues not included here are highly suspcious as well.

Reports

  1. [Critical] Curl CVE-2023-38545 vulnerability code changes are disclosed on the internet. #2199174
@dannguyen
dannguyen / README.openai-structured-output-demo.md
Last active February 25, 2026 11:22
A basic test of OpenAI's Structured Output feature against financial disclosure reports and a newspaper's police blotter. Code examples use the Python SDK and pydantic for the schema definition.

Extracting financial disclosure reports and police blotter narratives using OpenAI's Structured Output

tl;dr this demo shows how to call OpenAI's gpt-4o-mini model, provide it with URL of a screenshot of a document, and extract data that follows a schema you define. The results are pretty solid even with little effort in defining the data — and no effort doing data prep. OpenAI's API could be a cost-efficient tool for large scale data gathering projects involving public documents.

OpenAI announced Structured Outputs for its API, a feature that allows users to specify the fields and schema of extracted data, and guarantees that the JSON output will follow that specification.

For example, given a Congressional financial disclosure report, with assets defined in a table like this:

@dnnsmnstrr
dnnsmnstrr / spotifyUri.js
Last active January 3, 2026 15:58
PastePal transform Spotify URL to URI
function transform(clip) {
const pathRegex = /^[a-z]+:\/\/[^:\/]+(:[0-9]+)?\/(.*?)(\/[0-9]+)?(\?.*)?$/
const uriPath = clip.text.replace(pathRegex, '$2');
const spotifyUri = "spotify:" + uriPath.replaceAll('/', ':')
return spotifyUri;
}
@darconeous
darconeous / rect-starlink-cable-hack.md
Last active November 4, 2025 17:21
Hacking the Rectangular Starlink Dishy Cable
@danopia
danopia / Dockerfile
Last active January 24, 2026 20:58
ERCOT Frozen Grid 2021 - Metrics Reporters
FROM hayd/alpine-deno:1.10.1
WORKDIR /src/app
ADD deps.ts ./
RUN ["deno", "cache", "deps.ts"]
ADD *.ts ./
RUN ["deno", "cache", "mod.ts"]
ENTRYPOINT ["deno", "run", "--unstable", "--allow-net", "--allow-hrtime", "--allow-env", "--cached-only", "--no-check", "mod.ts"]
@danielkaczmarczyk
danielkaczmarczyk / programming-as-theory-building.md
Created June 1, 2020 15:24 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct