Skip to content

Instantly share code, notes, and snippets.

View eriknomitch's full-sized avatar

Erik Nomitch eriknomitch

View GitHub Profile

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.

@eriknomitch
eriknomitch / README.md
Last active April 25, 2025 13:31
aider-commit: Automatic git commit messages with aider

aider-commit

A simple wrapper for using aider to create commits with automatically generated messages using AI. Includes a few extra checks and outputs.

Installation

  1. Set up aider
  2. Add the function to your ~/.zshrc or ~/.bashrc.

Usage

@kylemcdonald
kylemcdonald / pyaudio-test.py
Created October 11, 2023 09:27
Show microphone level in realtime using pyaudio.
import pyaudio
import audioop
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16,
channels=1,
rate=44100,
input=True,
frames_per_buffer=1024)
@veekaybee
veekaybee / chatgpt.md
Last active June 17, 2026 13:50
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

"""
Toy demonstration of chain-of-thought and consensus prompting using OpenAI API.
© Riley Goodside 2022
"""
import os
import re
from statistics import mode
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
@0x-2a
0x-2a / git-up.sh
Last active August 17, 2025 15:24
Replacement for Git-Up ruby gem
#!/bin/zsh
# Add the following to your ~/.gitconfig
#
# [alias]
# up = !zsh /path-to-this-script/git-up.sh
#
# Then you can call
#
# `git up`
@ibrennan
ibrennan / useVisibilityState.js
Last active November 12, 2024 12:20
useVisibilityState - A simple React Hook for tracking document.visibilityState, useful for things like suspending API polling on inactive tabs
import { useState, useEffect, useCallback } from 'react';
export const useVisbilityState = () => {
const [visibilityState, setVisibilityState] = useState(null);
const handleVisbilityChange = useCallback(() => {
setVisibilityState(document.visibilityState);
}, [setVisibilityState]);
useEffect(() => {
@ramast
ramast / pulse-recorder.py
Last active November 18, 2024 16:11
Record a program's output with PulseAudio
#!/usr/bin/env python3
# Based on code from these stackoverflow answers:
# https://askubuntu.com/questions/60837/record-a-programs-output-with-pulseaudio/910879#910879
import re
import subprocess
import sys
import os
import signal
from time import sleep
@wonderbeyond
wonderbeyond / fields.py
Last active December 14, 2024 10:26
Generic foreign key field for peewee based on postgresql's jsonb type, with Inter-Model-Identifier(IMID) support.
import six
from peewee import Model, FieldAccessor
from playhouse.postgres_ext import BinaryJSONField
class GForeignKeyAccessor(FieldAccessor):
def get_rel_instance(self, instance):
value = instance.__data__.get(self.name)
model_name = value['model']
rel_model = self.field.allowed_types[model_name]