Lab Notes
Technical writing by Henry Hsu on software engineering, machine learning and building systems that endure.
- When My CAG Chatbot Outgrew Its Prompt
My portfolio chatbot's prompt reached 77% of its budget, so notes now go in as summaries and the model reads the ones it needs. The first version let 3 of 5 prompt injections through: what the eval caught, and the fix.
- Letting Claude Write on My Site Through MCP
My notes lived behind an admin page only a browser could open. How an MCP server inside the site's API lets Claude draft and publish them, and why the hardest part was not the tools but deciding who may sign in.
- Why My Portfolio Chatbot Uses CAG, Not RAG
When all your content fits in the prompt, retrieval only adds ways to miss. Why the Ask box reads everything, how prefix caching makes that fast, and the guardrails, model choice and prompt-injection tests behind it.
- GitOps and Disaster Recovery on a Single-Node k3s
One laptop runs this site, with no second node to fail over to. How Argo CD, Sealed Secrets and WAL archiving to R2 reduce a full rebuild to two keys and a backup bucket, and the restore drill that proved it works.
- Two LLMs on One 8 GB Laptop GPU
Time-slicing lets two pods share a GPU, but not its memory. How this site's autocomplete and Ask chat share one RTX 4060 Laptop: measured memory budgets, why the model's architecture decided what fit, and priorities that let batch jobs take the whole card.
- A Prosecutor’s Guide to Confusion Matrix and Infection Metrics
In the courtroom of Raccoon City, a False Negative (FN) is a death sentence for the city, while a False Positive (FP) is an innocent life wasted. As your Prosecutor, I demand more than just Accuracy; I demand a model that understands the cost of a missed zombie.
- The Geometry of SVD
Discover the visual intuition behind Singular Value Decomposition (SVD). Learn how SVD powers Ridge Regression and NLP while deconstructing complex transformations into simple rotations and stretches.
- Breaking the "Elite" Illusion: How I Reclaimed My ADD Brain from the Fluency Trap
From middle school "prodigy" to high school failure, and finally to university success. My journey of learning that the "slowest" way to study—through pain and friction—is actually the fastest shortcut.
- Building a Portfolio with Markdown Notes in 7 Days
A personal experiment born from a conversation in New York. This is how I used AI and serverless tools to turn a static resume into a living digital garden in just seven days.