📌 pinned · a tour of the build
The Data Science Hiding in My Portfolio
🧭The one idea everything is built on: embeddings
💡 the concept
An embedding turns text (or an image) into a list of numbers, a vector. A good model places similar meanings close together, even with no shared words: "make LLMs faster" and "reduce inference latency" land near each other.
To measure "close" I use cosine similarity: the cosine of the angle between two vectors, from -1 (opposite) through 0 (unrelated) to 1 (identical). It cares about direction, not length, so a short phrase and a long paragraph on the same topic still match.
💬Ask-my-portfolio chatbot (RAG)
💡 the concept
🔍Semantic search across my projects
💡 the concept
🔍 try it: pick a search, watch it rank by meaning
Illustrative cosine scores. Anything under 0.24 is treated as “no real match” and dropped, which is why a vague word still returns only what's genuinely relevant.
🌌The embeddings galaxy (PCA)
💡 the concept
🏷️Auto-pulled blog with embedding zero-shot tagging
💡 the concept
📸Photo clustering (k-means + silhouette + CLIP)
💡 the concept
✨The smaller LLM touches
💡 the concept
- Poem mood classification into eight moods with a confidence score; average 0.894 across 8 poems, reported on the page.
- AI poem art: a model distills each poem into one evocative prompt and an image model renders it. Cached so it is paid for once, but I can regenerate a fresh take, keep versions I like, or upload my own.
- Auto-captioned photos via a vision model, low-detail to stay cheap.
- ELI5 / expert toggle rewrites every blurb for a 10-year-old or a senior engineer, under a strict "keep every fact truthful" rule, and to the same card-filling shape as everything else.
- Guestbook moods: when someone signs the guestbook, the same temperature-0 JSON trick sorts their note into one of six moods (sweet, excited, curious, funny, kind, proud) and pins a matching little emoji to it.
📐Writing to fit a card
💡 the concept
🔎Answering a job posting
💡 the concept
🛠️The engineering around it
- Caching + ISR. Embeddings, art, captions, and rewrites are computed once; GitHub and Substack refresh hourly, so the site stays fresh without re-paying every request.
- Batched calls. Labels and classifications go out in one batched call, not one-per-item.
- Graceful fallback. The live embedding classifier has a deterministic keyword backup, so a flaky API degrades quality instead of breaking the page.
- Evals as a habit. If I can't measure it, I try not to claim it.
- Cards that carry their work. Beyond code and demo, a project card can link straight to a live results dashboard and a Substack write-up, its tags can be anything I want (reinforcement learning, robotics), and any PDF attachment renders its first page right in the card instead of a grey box.
- It keeps its own paperwork. The readable resume page is rendered straight from the LaTeX the PDF is compiled from, so the two can never drift. Saving a new version also commits that PDF to my GitHub profile, and a nightly job adds any repo I publish to the profile README on its own, classifying it into the right section. That one only ever appends, so the descriptions I wrote by hand are never overwritten.
- Editable from inside itself. Almost nothing here lives only in code. The passages, project blurbs, tags and links, the About and education cards, the photos and their captions, the guestbook, even the LaTeX résumé are all edited from a little key-gated atelier on the site. Edits are stored as overrides that win at render time, so a change is live the moment I save it, with no rebuild and no deploy.
- It checks itself on a schedule. A browser walks the whole public site every week, clicking through semantic search, the galaxy, the chatbot and the poems gate, so a broken deploy fails loudly instead of sitting there; the same pass records the demo reel, which is why the reel can never show something the site no longer does. The chatbot's accuracy is re-measured weekly too, because the numbers quoted on this page would otherwise quietly stop being true as new work is published. And everything editable is backed up encrypted every week, since it lives in one place and the poems can't be rewritten.
- The editing rooms are locked twice. A key alone opens nothing: the right key emails a one-time code, kept only as a hash, good for ten minutes and one use, and the code opens a signed session for a day. Every route that spends a model call has a limit per visitor and across the site, because on a free plan a script leaning on the chatbot is not a bill, it is the whole site going dark. Everything editable is also backed up weekly, encrypted, since none of it lives in git.
- Pictures are put right in the browser. An iPhone photo arrives as HEIC, which only Safari can display, and a photo off a camera is too heavy for one request. Both are fixed before anything is sent: converted to JPEG and scaled to a size nothing on the site exceeds. Framing is saved, not cropped: dragging a photo to recenter it and sliding to zoom stores three numbers beside the picture, so it can be reframed any time without uploading it again. The portrait and the tab icon are replaced the same way, from the page itself.