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.

@sile
sile / 0_succ_bp.md
Last active April 23, 2025 03:15
簡潔データ構造やBalancedParenthesesの紹介資料メモ

発表資料メモ: 簡潔データ構造について

  1. 主題

  • 数千万オーダーの文字列集合(およびマップ)を如何にサイズ効率良く表現するか、の話
    • 諸事情で集合をメモリ上に保持したいことがあるが、サイズは節約したい
    • 実際にはサイズのみを追求するのではなく、諸々のトレードオフを加味しつつバランスを取る
  • 今回はそれを実現するための方法の一つである 簡潔データ構造 について説明する:
@neubig
neubig / crf.py
Created November 7, 2013 10:59
This is a script to train conditional random fields. It is written to minimize the number of lines of code, with no regard for efficiency.
#!/usr/bin/python
# crf.py (by Graham Neubig)
# This script trains conditional random fields (CRFs)
# stdin: A corpus of WORD_POS WORD_POS WORD_POS sentences
# stdout: Feature vectors for emission and transition properties
from collections import defaultdict
from math import log, exp
import sys
@yuroyoro
yuroyoro / FreeMonad.scala
Created November 13, 2012 13:06
FreeモナドをScalaで写経してみた
// Free Monad in Scala
//
// そろそろFreeモナドに関して一言いっとくか - fumievalの日記 : http://d.hatena.ne.jp/fumiexcel/20121111/1352614885
// stackless scala with free monad : http://halcat0x15a.github.com/slide/free/out/#0
// type class: Functor
trait Functor[F[_]] {
def map[A, B](m: F[A])(f: A => B): F[B]
}
@Gab-km
Gab-km / github-flow.ja.md
Last active May 25, 2026 22:56 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@kishida
kishida / App.java
Created August 17, 2012 16:00
かわいいデータベース
package kis.basicdb;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
@ogatatsu
ogatatsu / readme.md
Created June 27, 2012 11:10 — forked from j5ik2o/gist:2996293
リトライハンドラー 魔改造
object RetryUtil {
import scala.util.control.Exception.allCatch
case class RetryResult[T](e: Either[List[Throwable], T]) {
def `catch`(f: List[Throwable] => T): T = e match {
case Right(r) => r
case Left(l) => f(l)
}
}
@qnighy
qnighy / tsffg.md
Created May 28, 2012 14:39
TSFフリーゲームおすすめ

TSFフリーゲームおすすめ

ソースはこれ http://w.livedoor.jp/tsfreegame/d/%b9%f1%c6%e2%a5%b2%a1%bc%a5%e0%b0%ec%cd%f7

プレイ時間は、プレイ後に適当に書いた目安。あとから感覚で書いたものなので正確性は保証できないが、 (1) TSイベントはだいたい網羅する。 (2) わからなくなったら解答を見るのを惜しまない。 という条件のつもりで時間を予想した。

地下の迷宮シリーズ (いが扇風機)