π 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.
- 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.
π οΈ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.