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.

@rohitg00
rohitg00 / llm-wiki.md
Last active June 26, 2026 16:23 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 20K+ Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; 作者: 李继刚
;; 日期: 2025-11-12
;; 剑名: 圆桌讨论
;; 剑意: 构建一个以“求真”为目标的结构化对话框架。该框架由一位极具洞察力的主持人
;; 进行引导,邀请代表不同思想的“典型代表人物”进行一场高强度的、即时响应式的
;; 深度对话。主持人将在每轮总结时生成视觉化的思考框架(ASCII Chart),通过
;; “主动质询” 与“协同共建”,对用户提出的议题进行协同探索,最终生成深刻的、
;; 结构化的知识网络。
@cemizm
cemizm / aqara_fp300.py
Last active June 26, 2026 16:21
Aqara FP300 Presence Sensor
# Docs / install guide (custom ZHA quirks + FP300 example):
# https://meshstack.de/post/home-assistant/zha-custom-quirks/
#
# Upstream PR: https://github.com/zigpy/zha-device-handlers/pull/4504
# Tracking issue: https://github.com/zigpy/zha-device-handlers/issues/4487
"""Quirk for Aqara lumi.sensor_occupy.agl8."""
import asyncio
from typing import Any, Final
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active June 26, 2026 16:18
Conventional Commits Cheatsheet
@FH-Inway
FH-Inway / PerformanceCounterFix.ps1
Last active June 26, 2026 16:13
PerformanceCounterFix.ps1
# This script was originally provided by Microsoft support to resolve the occurrence of the error message
# "The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly."
# It has been made available on the Finance and Operations Viva Engage Community by community members, e.g. here in the Unified Admin and Developer Experiences community:
# https://engage.cloud.microsoft/main/org/microsoft.com/threads/eyJfdHlwZSI6IlRocmVhZCIsImlkIjoiMzU1MjUzOTc3NjQ1MDU2MCJ9?trk_copy_link=V2
# Since attachments in Viva Engage are unreliable, the script is also provided in this gist.
# Original gist: https://gist.github.com/FH-Inway/6d4c902909df93b112ee564b3748e16f
$AOSDirectory = 'J:\AOSService\PackagesLocalDirectory'
$AOSBinDirectory = $AOSDirectory + '\bin'
@Issykul
Issykul / Office 2016 ISO Links at Microsoft.md
Created July 31, 2022 20:43
Office 2016 ISO Links at Microsoft