Skip to content

Instantly share code, notes, and snippets.

View amotl's full-sized avatar

Andreas Motl amotl

  • $PYTHONPATH
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.

@EpicWink
EpicWink / .gitlab-ci.yml
Created November 17, 2025 09:56
GitLab CI YAML with Docker image build cache mount persistence
# Docker build cache mount persistence
#
# Usage: add `extends: .docker-build` to your Docker build CI job, and set
# environment variable `DOCKER_CACHE_MOUNTS` to a comma-separated list of
# build cache mount IDs, then use `--mount=type=cache,id=...,target=...`
# in your Dockerfile
#
# Adapted from: https://github.com/reproducible-containers/buildkit-cache-dance
#
# See bottom for license
@WalBeh
WalBeh / soup2.py
Last active April 11, 2025 11:55
Get a condensed view on the cratedb documentation...
#!/usr/bin/env uv python
"""
CrateDB Settings Extractor
This tool extracts settings from CrateDB's documentation and outputs them
in either JSON or Markdown format, or the SQL statements to set the default value.
It parses the HTML structure of the documentation to identify settings, their
descriptions, default values, and whether they're runtime configurable.
Author: wolta
@codeinthehole
codeinthehole / git-fixup-files
Created August 8, 2024 11:01
Custom version of `git absorb` which autosquashes unstaged changes
#!/usr/bin/env bash
#
# Try and squash unstaged changes into existing branch commits.
#
# This command examines each unstaged file and attempts to create a fix-up
# commit to squash it into its natural parent in the current branch.
#
# - If it's able to do this for all modified files, the fix-up files are
# automatically squashed in.
#
@tkurki
tkurki / 00doc.md
Last active August 16, 2024 13:00
Wind Speed and Direction with Grafana ECCharts plugin
@hyperupcall
hyperupcall / settings.jsonc
Last active March 17, 2026 09:13
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@todbot
todbot / synthio_midi_synth.py
Last active December 27, 2025 05:31
pretty usable MIDI-controlled synth using synthio in CircuitPython
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython
# 11 May 2023 - @todbot / Tod Kurt
# Uses cheapie PCM5102 DAC on QTPY RP2040
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k
# Features:
# - midi velocity controls attack rate (gentle press = slow, hard press = fast)
# - notes have small random detune on all oscillators to reduce phase stacking
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83)
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82)
# - vibrato depth on mod wheel (midi controller 1)
@Suor
Suor / 1-plus-n.md
Created March 22, 2023 11:11
Trying to make ChatGPT to write a blog post

> Write a blog post about this code trick:

import logging
import os

from funcy import monkey

from django.db.models.query_utils import DeferredAttribute
@scollis
scollis / plotLidar.py
Created December 10, 2022 19:11
quick ingest and plot of HALO LiDAR
import numpy as np
from netCDF4 import Dataset
import os
import datetime
import xarray as xr
import pandas as pd
import matplotlib.dates as mdates
import matplotlib.dates as mdates
from matplotlib import pyplot as plt
from matplotlib.colors import LogNorm
@xylar
xylar / grayskull_autoupdate.py
Last active October 31, 2023 10:08
A script for automatically updating dependencies in conda-forge bot branches using grayskull and pypi
#!/usr/bin/env python
import argparse
import os
import shutil
import subprocess
import packaging.version
import grayskull.strategy
from importlib.resources import open_binary
import yaml