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.

@lichenbuliren
lichenbuliren / create-reducer-action-types
Created September 14, 2021 02:06
dynamic create reducer actions by enum action type
type CreateActionMap<M extends { [index: string]: any }> = {
// 通过 extends undefined 来判断是否有 payload 要求
[Key in keyof M]: M[Key] extends undefined
? {
type: Key;
}
: {
type: Key;
payload: M[Key];
};
@kaiye
kaiye / my.sh
Last active October 18, 2016 02:20
常用 Linux 命令行
# 网络
# 查看本地公网 IP
curl ifconfig.me
dig 1024.io
dig -x 104.155.233.156
# 并发测试
ab -n 1000 -c 1000 http://www.meizu.com/
# 全站抓取
wget -r -p -np -k http://www.meizu.com/es/
@aNd1coder
aNd1coder / mongodb_create_database_and_user.sh
Last active October 18, 2016 02:30
Mongodb create database and user
> use admin
> db.createUser({user: 'root',pwd: '123456',roles: ['root']})
> db.auth('root','123456')
> use page_factory
> db.createUser({user: 'user',pwd: '123456',roles: [{role: 'readWrite', db: 'dbName'}]})
> db.auth('user','123456')
@rowanmanning
rowanmanning / README.md
Last active April 17, 2025 05:46
Writing a Friendly README. This a companion-gist to the post: http://rowanmanning.com/posts/writing-a-friendly-readme/
@staltz
staltz / introrx.md
Last active May 7, 2026 01:31
The introduction to Reactive Programming you've been missing