Skip to content

Instantly share code, notes, and snippets.

View xni7's full-sized avatar

Xiao Ni xni7

  • Sarepta
  • Cambridge, MA
View GitHub Profile
@xni7
xni7 / llm-wiki.md
Created May 24, 2026 03:03 — 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.

#' QT Outlier Explorer
#'
#' @param data ECG data structured as one record per person per visit per measurement. See details for column requirements.
#' @param settings named list of settings with the parameters specified below.
#'
#' @details The settings object provides details the columns in the data set.
#'
#' \itemize{
#' \item{"id_col"}{ID column}
#' \item{"value_col"}{Value column}
@xni7
xni7 / sg_QT_cmd.R
Created October 6, 2021 20:05
command line script to launch a QT app in SafetyGraphics V2 framework
# QT Shiny modules
# https://github.com/SafetyGraphics/safetyGraphics/wiki/ChartConfiguration#example-2---static-outlier-explorer
# Use sample clinical trial data sets from the {safetyData} package
library(safetyData)
library(safetyGraphics)
library(ggplot2)
library(dplyr)
library(yaml)
library(plotly)
@xni7
xni7 / gist:d2e4c410a362f8f7b50c19a4b59413e4
Created September 29, 2019 16:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: