Research
Evolving better clinical coding agents with GEPA
October 15, 2026
Our GEPA-evolved workflow improved clinical-coding micro-F1 by 13.4% over an expert-designed baseline, without retraining the language model.
Explainer • October 24, 2026 • Raymond Lee
An interactive demo that treats each row of a grayscale photo as a vector, keeps the first k principal components, and rebuilds the picture from them.
Each row of a grayscale image is a vector of pixel brightnesses. Principal component analysis (PCA) finds the few directions along which those rows vary most. Keep only the first k directions, describe each row by k numbers, and you can rebuild a recognisable picture from a fraction of the original data.
Drag the slider below to choose how many components to keep. Everything runs in your browser, including photos you load yourself.
Treat the image as a matrix X with H rows and W columns. Subtract each column’s mean, then form the W×W covariance matrix C = XᵀX / (H − 1).
The eigenvectors of C, sorted by eigenvalue, are the principal components. Each one is a row-shaped pattern, orthogonal to all the others, and its eigenvalue says how much of the variance between rows that pattern explains. The demo computes them with a Householder tridiagonalisation followed by implicit QL iteration, the same approach used in EISPACK and JAMA, written in plain JavaScript.
Projecting every row onto the first k components gives an H×k table of scores. The compressed image consists of those scores, the k component vectors, and the column means: Hk + Wk + W numbers instead of HW. For the 256×256 sample scene, ten components need 5,376 numbers, about 8% of the original 65,536.
To decompress, multiply the scores by the components and add the mean back. Structure that runs along rows, such as the horizon and the lake’s edge, survives with very few components. Fine texture and diagonal edges, like the jetty, need many more, which the error view makes easy to see.
Real image codecs do not work this way. JPEG uses a fixed cosine basis on 8×8 blocks, so it never has to store a basis per image. PCA learns a basis tailored to one picture and then has to ship it alongside the scores, which is why the storage count climbs past 100% once k approaches half the image width.
The same idea carries much further when the basis is shared across many examples. Low-rank approximations of this kind sit underneath latent semantic analysis, recommender-system factorisations, and LoRA adapters for language models, where a weight update is stored as the product of two thin matrices.
Photos you load are resized so that the longer side is 256 pixels and converted to grayscale. They never leave your browser.
Research
October 15, 2026
Our GEPA-evolved workflow improved clinical-coding micro-F1 by 13.4% over an expert-designed baseline, without retraining the language model.
Reliable Inference
July 5, 2026
Evaluator aware decoding: let the model write the expression, let the engine write the answer
AI Engineering
May 12, 2026
Preliminary benchmark results comparing local LLM quantizations across coding agent harnesses on 16 software-engineering tasks.