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.

# Source: https://gist.github.com/vfarcic/8301efb15748af1da3e376b7132e519e
###################################################################
# Should We Run Databases In Kubernetes? CloudNativePG PostgreSQL #
# https://youtu.be/Ny9RxM6H6Hg #
###################################################################
# Additional Info:
# - CloudNativePG: https://cloudnative-pg.io
# - EDB: https://enterprisedb.com
# Source: TODO:
#########
# TODO: #
# TODO: #
#########
# Additional Info:
# - Production-Ready Kubernetes Clusters Using Crossplane Compositions: https://youtu.be/uMC2QQfMctg
# - How To Shift Left Infrastructure Management Using Crossplane Compositions: https://youtu.be/AtbS1u2j7po
@hotdoujiang
hotdoujiang / 2018GlobalTerror.csv
Last active December 30, 2020 19:42
1970-2019 Global Terrorism Dataset
We can't make this file beautiful and searchable because it's too large.
year,month,day,country,region,provstate,city,latitude,longitude,nkill,nwound,nwoundkill
2018,1,1,Iraq,Middle East & North Africa,Nineveh,Tal Afar,36.376825,42.448876,3,0,3
2018,1,1,Iraq,Middle East & North Africa,Kirkuk,Kirkuk,35.452112,44.375464,0,0,0
2018,1,1,Pakistan,South Asia,Balochistan,Chaman,30.92211,66.451533,0,2,2
2018,1,1,Pakistan,South Asia,Balochistan,Chaman,30.92211,66.451533,0,6,6
2018,1,1,Nigeria,Sub-Saharan Africa,Adamawa,Madagali,10.88942,13.62832,3,0,3
2018,1,1,Afghanistan,South Asia,Farah,Pusht Rod district,32.48035,62.028915,1,2,3
2018,1,1,Iraq,Middle East & North Africa,Al Anbar,Radhwaniyah,33.18168,44.23542,0,1,1
2018,1,1,Egypt,Middle East & North Africa,Giza,Giza,30.022924,31.185193,2,0,2
2018,1,1,Pakistan,South Asia,Punjab,Multan,30.174426,71.478867,0,1,1
@YoungElPaso
YoungElPaso / dropdown-menu-prototype-using-tachyons-css-and-vue-js.markdown
Last active May 26, 2024 18:36
Dropdown Menu Prototype Using Tachyons CSS and Vue.js
# HELP mothership_collector_working Is the master process collector able to collect metrics
# TYPE mothership_collector_working gauge
mothership_collector_working 1
# HELP mothership_collector_rss total memory used by collector process
# TYPE mothership_collector_rss gauge
mothership_collector_rss 243605504
@ankitsinghaniyaz
ankitsinghaniyaz / nginx_proxy.config
Created April 20, 2017 17:15
Elastic Beankstalk Nginx configuration to supports /assets and /packs
# This is to enable WS support. Credits: # https://gist.github.com/Bubelbub/0a942a0d51a3d329897d
# THIS WORKS! for running the example 5.0.0.beta1 chat app on a single instance Elastic beanstalk AWS instance
files:
"/etc/nginx/conf.d/websockets.conf" :
content: |
upstream backend {
server unix:///var/run/puma/my_app.sock;
}
[aaron@TC omglolwut (master)]$ cat lib/tasks/disable_autoload_during_migrations.rake
task :disable_autoload do
ActiveSupport::Dependencies.class_eval do
extend Module.new {
def load_file(path, const_paths = loadable_constants_for_path(path))
return if path.starts_with? File.join(Rails.application.root, 'app', 'models')
super
end
}
end
@zosiu
zosiu / facebook_graph_api.rb
Last active January 10, 2017 16:23
Facebook Graph API w/ Koala
### app access token
graph = Koala::Facebook::OAuth.new APP_ID, APP_SECRET
graph.get_app_access_token # => APP_TOKEN
### create test users with permissions
test_users = Koala::Facebook::TestUsers.new app_id: APP_ID, secret: APP_SECRET
user = test_users.create true, 'email,user_birthday,user_posts', name: 'Bob'
# =>
# { "id" => USER_ID,
# "access_token" => USER_ACCESS_TOKEN,
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros