Skip to content

Instantly share code, notes, and snippets.

View EthantLu's full-sized avatar
🐯
I may be slow to respond.

EthanLu EthantLu

🐯
I may be slow to respond.
View GitHub Profile
@EthantLu
EthantLu / llm-wiki.md
Created May 2, 2026 14:09 — 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.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="error" strict="true" name="XMLConfig">
<Appenders>
<!-- 类型名为Console,名称为必须属性 -->
<Appender type="Console" name="STDOUT">
<!-- 布局为PatternLayout的方式,
输出样式为[INFO] [2018-01-22 17:34:01][org.test.Console]I'm here -->
<Layout type="PatternLayout"
pattern="[%p] [%d{yyyy-MM-dd HH:mm:ss}][%c{10}]%m%n" />
</Appender>
package ETL;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
public class ETLDriver {
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="001" />
</profile>
#include <iostream>
using namespace std;
#include <cstring>
#include <fstream>
#include<stdlib.h>
struct DagNode
{
int fatherNum; //是否有父节点
bool isSingle; //是否是单分支
bool isLeaf;
@EthantLu
EthantLu / 词法分析
Created April 28, 2020 10:52
词法分析
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
char val[50];
char buffer[50];
char temp[50];
char reserve[2];
struct wrong {
@EthantLu
EthantLu / 词法分析
Created April 28, 2020 10:52
词法分析
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
char val[50];
char buffer[50];
char temp[50];
char reserve[2];
struct wrong {
@EthantLu
EthantLu / 词法分析
Created April 28, 2020 10:52
词法分析
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
char val[50];
char buffer[50];
char temp[50];
char reserve[2];
struct wrong {
@EthantLu
EthantLu / 词法分析
Created April 28, 2020 10:52
词法分析
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
char val[50];
char buffer[50];
char temp[50];
char reserve[2];
struct wrong {
@EthantLu
EthantLu / shell_PPT作业
Created March 9, 2020 06:30
shell_PPT作业
#!/bin/bash
for file in *.txt
do
delete=`basename $file .txt`
mv $file $delete.doc
done