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.

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active July 29, 2026 05:48
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@dabit3
dabit3 / App.js
Last active December 16, 2024 19:03
Working example of Solana and Anchor on JavaScript Client - React
import './App.css';
import { useEffect } from 'react';
import {
Program,
Provider,
BN,
web3,
} from '@project-serum/anchor'
import {
Connection,
@h4rkl
h4rkl / harkl.js
Last active July 11, 2022 08:19
Can't get the correct signing authority for solana serum anchor implementation
const anchor = require("@project-serum/anchor");
const serumCmn = require("@project-serum/common");
const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");
describe("harkl-tests", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.Provider.env());
const program = anchor.workspace.Harkl;
@aalbertson
aalbertson / gist:e2f3a63ff92800a16c6251de0a0a1f85
Created February 5, 2019 19:52
example disable audio - vagrant mac virtualbox v2 config
$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.define "LogsParsing"
config.vm.network "forwarded_port", guest: 8080, host: 8080, auto_correct: true
config.vm.provision :file, source: './provision.sh', destination: '~/provision.sh'
config.vm.provision "shell", run: 'always', path: "./provision.sh", privileged: false
@xnau
xnau / wp-locale-conversion-array.php
Created February 1, 2019 19:56
Conversion array for WordPress locale codes and standard language codes and names
<?php
$wp_locale_conversion = array(
'af' => array(
'name' => 'Afrikaans',
'code' => 'af',
'wp_locale' => 'af'
) ,
'ak' => array(
'name' => 'Akan',
'code' => 'ak',
@adamgavlak
adamgavlak / dokku.sh
Created December 1, 2018 11:20
Basic dokku installation
# Create a Dokku app and addons
#------------------------------
## Go to http://SERVER_IP and add a IP address (if you don't it seems to go weird: use a junk one if needed)
dokku apps:create APP_NAME
## Add postgresql and link it to the application
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
dokku postgres:create APP_NAME-db
dokku postgres:link APP_NAME-db APP_NAME
@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@joshteng
joshteng / dokku_setup.md
Last active August 27, 2024 04:03
Using Dokku to deploy a Rails Application

#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!

##Notes

  • Follow 12 factor design (include the rails_12factor gem)
  • Don't forget your Procfile with the command to start up your application server
  • I prefer using external hosted logging services like Logentries (not in this guide)
  • Set up performance monitoring AppSignal or New Relic (not in this guide)
@fatnic
fatnic / all-in-one.rb
Created December 28, 2011 18:50
One file images in Sinatra
require "sinatra"
require "base64"
get "/" do
erb :index
end
get "/images/:img" do
case params['img']