Skip to content

Instantly share code, notes, and snippets.

View vintagewang's full-sized avatar

Xiaorui Wang vintagewang

View GitHub Profile
@vintagewang
vintagewang / llm-wiki.md
Created April 7, 2026 11:22 — forked from karpathy/llm-wiki.md
llm-wiki

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.

@vintagewang
vintagewang / os.sh
Created August 4, 2013 01:59
RocketMQ操作系统调优脚本
#!/bin/sh
#
# 此脚本只允许运行一次
#
echo 'vm.overcommit_memory=1' >> /etc/sysctl.conf
echo 'vm.min_free_kbytes=5000000' >> /etc/sysctl.conf
echo 'vm.drop_caches=1' >> /etc/sysctl.conf
echo 'vm.zone_reclaim_mode=0' >> /etc/sysctl.conf
/**
* Copyright (C) 2010-2013 Alibaba Group Holding Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@vintagewang
vintagewang / eclipse.plug
Created October 10, 2012 15:12
Eclipse插件
http://mevenide.codehaus.org/release/eclipse/update/site.xml
@vintagewang
vintagewang / mmap.c
Created September 17, 2012 01:48
test linux virtual memory max size
/**
* $Id: mmap.cpp 1595 2012-07-28 10:33:18Z shijia.wxr $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>