Skip to content

Instantly share code, notes, and snippets.

View kcchien's full-sized avatar

Kuang-Cheng Chien kcchien

View GitHub Profile
@kcchien
kcchien / llm-wiki.md
Created April 5, 2026 15:01 — 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.

@kcchien
kcchien / excel-addins-snippets
Created November 17, 2020 00:55
Excel.run snippet
await window.Excel.run(async (context) => {
// do something
await context.sync();
});
@kcchien
kcchien / nteract-tricks.md
Created August 8, 2020 04:52 — forked from vhoulbreque/nteract-tricks.md
Make conda environments visible in nteract

Nteract tricks

To add a conda environment to the list of environments:

$ source activate thisenv
(thisenv) $ pip install ipykernel
(thisenv) $ python -m ipykernel install --user --name thisenv
@kcchien
kcchien / crerate-env.sh
Created May 1, 2020 01:44
Create Tensorflow 2 Enviroment with Conda
# 建立一個名稱為 tf2 的虛擬環境,並指定python 版本為 3.6
conda create -n tf2 python=3.6
# 啟動 tf2 虛擬環境
conda activate tf2
# 安裝 tensorflow 2
pip install tensorflow
# 安裝 PIL 套件
conda install pillow
<?php
$ipAddress=$_SERVER['REMOTE_ADDR'];
$matches=array();
echo 'IP:' . $ipAddress . '<br>';
# Execute arp
$arp=`arp -a $ipAddress`;
@kcchien
kcchien / response.json
Created May 19, 2019 07:49
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 6
{
"responses": [
{
"faceAnnotations": [
{
"boundingPoly": {
"vertices": [
{
"x": 669,
"y": 324
@kcchien
kcchien / response.json
Last active May 19, 2019 07:38
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 5
{
"responses": [
{
"webDetection": {
"webEntities": [
{
"entityId": "/m/0105pbj4",
"score": 0.8895,
"description": "Google Cloud Platform"
},
@kcchien
kcchien / request.json
Created May 19, 2019 07:00
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 4
{
"requests": [
{
"image": {
"source": {
"gcsImageUri": "gs://[你的bucket名稱]/selfie.png"
}
},
"features": [
{
@kcchien
kcchien / request.json
Created May 19, 2019 04:11
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 3
{
"requests": [
{
"image": {
"source": {
"gcsImageUri": "gs://[你的bucket名稱]/donuts.png"
}
},
"features": [
{
@kcchien
kcchien / CreateBucket.sh
Created May 19, 2019 03:13
Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API - 2
# 取得專案ID
export PROJECT_ID=$(gcloud info --format='value(config.project)')
# Cloud Storage buckets的名稱,格式為[你的專案ID]-upload
export BUCKET_NAME=${PROJECT_ID}-upload
# 建立Bucket
gsutil mb gs://${BUCKET_NAME}
# 檢查一下Bucket是否成功建立