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.

@jboner
jboner / latency.txt
Last active November 30, 2026 09:01
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012 except when noted)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@ekv88
ekv88 / ai-install-wizard.ps1
Created August 9, 2026 10:28
llama.cpp install wizard with hf models and opensource config
#requires -Version 5.1
<#
.SYNOPSIS
Interactive Windows installer for llama.cpp, selected Hugging Face models,
models.ini, and the OpenCode llama.cpp provider configuration.
.DESCRIPTION
Run from Windows PowerShell or PowerShell 7 on Windows. The wizard:
1. Selects a fixed drive with at least 100 GiB free.
@rxliuli
rxliuli / GEMINI.md
Created November 30, 2026 04:52
我的 Antigravity 全局规则配置(~/.gemini/config/GEMINI.md)

工作方式与主动性(默认开启)

  • 端到端闭环推进:把用户目标视为完整交付,不要只做字面上的最小一步就停下来交差。凡是本地可逆的必要步骤(排查关联文件/依赖包/workflow、修复直接相关的联动问题、跑 typecheck/test/build 验证),默认一次做到位,不要为低风险判断反复向用户请示。
  • 主动发现关联影响:改代码、bump 版本或修 bug 时,主动检查上下游依赖(如 monorepo 内的关联 package、CI/release workflow、类型与测试、相关文档);发现遗漏或潜在风险时,本地能补的直接补齐,涉及取舍的在交付时明确指出并给出推荐方案。
  • 深度排查,拒绝敷衍:遇到不清楚的事实优先自己读代码、查日志、跑命令求证,不要猜测或把「你可以自己检查一下……」抛给用户。仅在真正缺少外部权限/密钥、存在业务歧义或触发高风险操作时才停下来确认。
  • 区分风险边界:严格刹车只针对不可逆或对外生效的动作(如 git push、生产部署、删远程资源);严禁因为谨慎而对本地读取、排查、重构和验证缩手缩脚。

交互反馈与任务调度

  • 先回复,再批量执行:收到任务时先输出 1~2 句简短可见回复说明判断和计划,随后尽量并行批量完成一整阶段的工具调用,不要为了汇报把原本可并行的动作拆成碎步。
@naa0yama
naa0yama / kagoya-outage-2026-11-28.md
Last active November 30, 2026 08:49
ripestat-as24282-KIR-103.3.48.0/22-20261128T0600Z-20261128T0759Z.json

KAGOYA 障害(2026-11-28)BGP 観測タイムライン

  • 対象プレフィックス: 103.3.48.0/22(Origin AS24282 KAGOYA JAPAN)
  • 主な上流: AS4713 OCN(プリペンドなし=メイン経路)、AS2519 ARTERIA と AS17511 OPTAGE(24282 を 4 回プリペンドしたバックアップ)
  • 作成: 2026-11-28

まとめ

  • ネットワークとして到達できなかった時間: 15:22 頃〜17:10 頃(JST)、約 1 時間 48 分
  • BGP の最初の変化(15:18:37 JST)は、KAGOYA の告知「15時20分頃」とほぼ同じ時刻
@tadwohlrapp
tadwohlrapp / ublock-filter-youtube.txt
Last active November 30, 2026 08:45
Filters for uBlock Origin I use to block annoying elements on YouTube
! ============================
! YouTube Top Nav Bar
! ============================
! always show normal YouTube logo, never that distracting doodleyoodle
www.youtube.com##ytd-topbar-logo-renderer > a > ytd-yoodle-renderer
www.youtube.com##ytd-topbar-logo-renderer > a > div:remove-attr(hidden)
! hide "Search with your voice" button (YouTube users have no voice)
www.youtube.com###masthead #center #voice-search-button
@emschwartz
emschwartz / README.md
Last active November 30, 2026 08:39
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

@pervognsen
pervognsen / shift_dfa.md
Last active November 30, 2026 08:35
Shift-based DFAs

A traditional table-based DFA implementation looks like this:

uint8_t table[NUM_STATES][256]

uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
    for (const uint8_t *s = start; s != end; s++)
        state = table[state][*s];
    return state;
}
@karpathy
karpathy / microgpt.py
Last active November 30, 2026 08:35
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp