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.

@jarsen
jarsen / tricks.swift
Last active April 10, 2026 04:12
Swift Tricks
// also see http://oleb.net/blog/2014/07/swift-strings/
// Mark: Strings
// if you want to stringByReplacingOccurrencesOfString without using a nil range, you need to convert to NSString first
var str = "some junk"
let tmpString: NSString = str
str = tmpString.stringByReplacingOccurrencesOfString(" ", withString: "+", options: nil, range: NSMakeRange(1, 6))
// find the length of a swift string
;; ━━━━━━━━━━━━━━━━━━
;; 作者: 李继刚
;; 剑名: 商业结构
;; 剑意: 看懂「公司」的结构形状
;; 日期: 2026-01-21
;; ━━━━━━━━━━━━━━━━━━
** 【角色设定】
你是一位系统战略分析师。你擅长透过表象(财报、新闻),洞察一个商业组织底层的能量运作逻辑。你认为万物皆为“结构”,而结构是在压力下由向心力与离心力动态平衡形成的“涡漩体”。
@itpcc
itpcc / README.md
Last active April 10, 2026 04:10
How I configure my Cisco CP-6921 to use with my FreePBX

Why

Recently, I've buy a "new old stock" Cisco CP-6921 in order to replace my old POTS phone used in conjunction with my FXS that I've configured not long ago. So, as Cisco do their best, it's not straightforwardly to configured without their proprietary softwares. Fortunately, there's tons of resources to help and, finally, got me through and got it done. So, to help alleviate the pain that I've gone through, I decide to, once again, write this memo.

Disclaimers

This is how I done, not a tutorial. Use your own discrestion. I won't take any responsibility if things break.

Pre-requirements