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.

@naogify
naogify / pbf2geojson.js
Created August 28, 2025 21:32
PBFからGeoJSONに変換するスクリプト
#!/usr/bin/env node
/**
* PBF(MVT) -> GeoJSON
* Usage: node pbf2geojson.js /path/to/{z}/{x}/{y}.pbf > out.geojson
*/
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const { VectorTile } = require('@mapbox/vector-tile');
const Pbf = require('pbf');
@naogify
naogify / upload-sync.sh
Last active November 25, 2025 08:15
xyz のタイルディレクトリをアップロードするスクリプト
#!/usr/bin/env bash
set -ex
# 引数チェック
if [ $# -ne 2 ]; then
echo "Usage: $0 <S3_BUCKET> <UPLOAD_DIR>"
exit 1
fi
S3_BUCKET="$1"
@voluntas
voluntas / duckdb_202501.md
Last active May 14, 2025 06:14
DuckDB 座談会 v2025.1

DuckDB 座談会 v2025.1 発表者向け資料

これはDuckDB 座談会 (2025-01) の発表者向けの資料です。

DuckDB とは

こちらの資料がとてもお勧めです。

@naogify
naogify / shape2datapng.sh
Last active November 25, 2025 08:14
ShapeをDATA PNGに変換するスクリプト
#!/usr/bin/env bash
set -ex
# 引数のチェック
if [ $# -ne 2 ]; then
echo "エラー: 必要な引数が指定されていません。" >&2
echo "使用方法: $0 <カラーテーブルファイル: 例 color_table.txt> <対象フィールド名: 例 Max_Rank>" >&2
exit 1
fi
@mrtry
mrtry / slide.md
Last active August 21, 2025 04:41
expo-routerで(Deep|Web) Link対応

title: expo-routerで(Deep|Web) Link対応 author: mrtry date: 2024/10/04

このスライドでわかること

  • (Deep|Web) Linkがどういうものかわかる
  • expo-routerでの(Deep|Web) Linkの対応方法がわかる
@keichan34
keichan34 / index.ts
Created January 26, 2024 01:11
政令指定都市の自治体コード
// 政令指定都市 (元データでは行政区になっているが、私達は区域全体でまとめたい(東京23特別区以外))
// この配列は、行例指定都市の公共団体コードの頭3または4桁を含む
const DESIGNATED_CITIES = [
/^011/, // 北海道札幌市
/^041/, // 宮城県仙台市
/^111/, // 埼玉県さいたま市
/^121/, // 千葉県千葉市
/^141(?!3|5)/, // 神奈川県横浜市
/^1413/, // 神奈川県川崎市
/^1415/, // 神奈川県相模原市
// unofficial sqlite3 types.
// These are typed only for my scope
declare module "@sqlite.org/sqlite-wasm" {
type InitOptions = {
print: (...msg: any[]) => void;
printErr: (...msg: any[]) => void;
};
declare type PreparedStatement = {
@keichan34
keichan34 / README.md
Last active November 12, 2025 05:56
法務省データもろもろ
cp -r moj_data/ ./
mkdir all_zips
find . -name '*.zip' -maxdepth 1 | xargs -P 16 -I '{}' unzip '{}' -d ./all_zips

ここで all_zips に展開されたzipがある 次は任意座標と公共座標系を分ける

@iulian0512
iulian0512 / geos3.10.2-makefile-iossimulator
Created May 10, 2022 09:49
geos 3.10.2 ios simulator makefile
XCODE_DEVELOPER = $(shell xcode-select --print-path)
#used for selecting the sdk dir
IOS_PLATFORM ?= iPhoneOS
# Pick latest SDK in the directory
IOS_PLATFORM_DEVELOPER = ${XCODE_DEVELOPER}/Platforms/${IOS_PLATFORM}.platform/Developer
IOS_SDK = ${IOS_PLATFORM_DEVELOPER}/SDKs/$(shell ls ${IOS_PLATFORM_DEVELOPER}/SDKs | sort -r | head -n1)
all: