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.

@anecdata
anecdata / code.py
Last active May 24, 2025 17:02
CircuitPython Pin Finder: microcontroller.pin to board mappings
# SPDX-FileCopyrightText: 2020 anecdata
#
# SPDX-License-Identifier: MIT
import microcontroller
import board
for pin in dir(microcontroller.pin):
if isinstance(getattr(microcontroller.pin, pin), microcontroller.Pin):
print("".join(("microcontroller.pin.", pin, "\t")), end=" ")
@sakurai-youhei
sakurai-youhei / screenshot.py
Created November 21, 2018 10:48
Taking screenshot of web page using QWebEngineView
from os.path import basename
from os.path import dirname
from os.path import join
import sys
from PyQt5.QtCore import Qt
from PyQt5.QtCore import QUrl
from PyQt5.QtCore import QTimer
from PyQt5.QtGui import QPixmap
from PyQt5.QtWebEngineWidgets import QWebEngineView
@SyncChannel
SyncChannel / LoRaFW_IOX_TransceiverMode.ino
Created March 17, 2016 01:15
LoRa FeatherWing IOX Tranceiver Mode Example Program
/* LoRa FeatherWing IOX Tranceiver Mode Example Program
* By: Dan Watson | syncchannel.blogspot.com
* Date: 3-12-2016
* Version: 0.1 Initial Release
*
* Example Tranceiver Mode Program for the LoRa FeatherWing IOX for Adafruit Feather
* Tested with Feather M0, 32U4 and HUZZAH ESP8266
*
* This program configures the Feather as a LoRa receiver. It is intended as a companion
* to the LoRA FeatherWing Beacon Example Program, and can receive the beacon messages.
@pklaus
pklaus / README.md
Last active July 14, 2017 17:15
This module has now evolved into a proper Python package, that you can install with pip: https://github.com/pklaus/serialman
@5263
5263 / gist:3041500
Created July 3, 2012 18:13
FreeCAD interpolate surface
import FreeCAD
f1=open("surface.dat")
coords=[]
miny=1
for line in f1.readlines():
sline=line.strip()
if sline and not sline.startswith('#'):
ycoord=len(coords)
lcoords=[]
for xcoord, num in enumerate(sline.split()):