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.

@danieldietrich
danieldietrich / gist:55b4f08fbe2720ea89954b216418d4ff
Created December 1, 2023 15:15 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@danieldietrich
danieldietrich / LLM.md
Created March 30, 2023 20:39 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@danieldietrich
danieldietrich / launch.json
Created October 26, 2022 15:29
Langium Launch configuration
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
@danieldietrich
danieldietrich / thoughts.md
Last active October 18, 2022 12:48
The case of IsEmpty<T> versus universal types any, unknown and never

IsEmpty<T>

A value of type T is defined to be empty, if

  • it is an array and has no elements
  • it is an object and has no properties

Handling of universal types

  • any can be seen as the union of all types. A union distributes in conditional types, so any may or may not be empty. true | false = boolean
@danieldietrich
danieldietrich / attributions.md
Last active October 7, 2022 02:33
Traverse the type of an object tree, find leafs that are function types and collect the type of their first argument.
@danieldietrich
danieldietrich / 01_definition.md
Last active September 27, 2022 20:20
TypeScript: Conditional types are distributive over type parameters.

Def. A conditional type with a checked naked type parameter T is called distributive conditional types.

Example:

// given U, X and Y
type DistributiveConditionalType<T> = T extends U ? X : Y;

Distributive conditional types are automatically distributed over union types during instantiation.

@danieldietrich
danieldietrich / print256colours.sh
Created December 9, 2021 12:56 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@danieldietrich
danieldietrich / .bashrc
Last active December 11, 2021 05:44
Git prompt for shell
#
# Usage: `source <(curl -sL https://bashrc.danieldietrich.dev)`
#
export LANG=en_US.UTF-8
export LC_ALL=${LANG}
export TERM=xterm-256color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
@danieldietrich
danieldietrich / easing.js
Created October 8, 2020 22:14 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity