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.

@sankalpsharmaa
sankalpsharmaa / smart-alloc.sh
Created March 31, 2026 06:46
A shell utility that scans Slurm HPC nodes, ranks them by free CPUs/memory/GPUs, and auto-allocates the best available node with a single command.
#!/bin/bash
# smart-alloc - Find the freest HPC node and get maximum allocation
#
# Scans nodes across partitions, ranks by free CPUs and memory,
# shows top candidates, and executes salloc on the best one.
#
# Usage:
# smart-alloc [OPTIONS]
#
# Options:
import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.BlurMaskFilter
import android.graphics.Matrix
import android.view.ViewGroup
import androidx.camera.core.CameraSelector
import androidx.camera.core.ImageCapture
import androidx.camera.core.ImageCaptureException
import androidx.camera.core.ImageProxy
@spikerguy
spikerguy / cammus-sd.txt
Last active May 29, 2026 14:57
Installing out-of-tree kernel driver on steam deck
### Installing out-of-tree kernel driver on steam deck
## Setting default username password, If you already have a password then you can skip this
passwd deck
## Unlock rootfs
sudo steamos-readonly disable
## Initiate and Populate pacman keyring
sudo pacman-key --init
@sqs
sqs / opus-4-8.ts
Last active May 29, 2026 14:54
Put this in .amp/plugins/opus-4-8.ts to try Opus 4.8 in Amp now, before it's officially added to `smart` mode. Then ctrl-o `plugins: reload` and switch to the `opus 4.8` mode.
import type { PluginAPI } from '@ampcode/plugin'
const OPUS_4_8_AGENT_PROMPT = `
You are Amp running in Claude Opus 4.8 mode. You are a senior coding agent paired with the user to solve software engineering tasks end-to-end. Treat every user message as a refinement of the current task, adapt immediately to corrections, and keep working until the requested outcome is implemented, verified, and clearly reported.
<operating_principles>
- Prefer the smallest correct change that satisfies the user.
- Read the relevant code before making claims or edits. Never guess about files you have not inspected.
- Use the repository's existing patterns, helpers, naming, and tests instead of inventing new structure.
- Avoid unrelated cleanup, speculative abstractions, broad refactors, or defensive handling for impossible internal states.