Personal projectThis site2026

This AI Lab

The portfolio you're using — a grounded assistant, a live retrieval engine, and an evaluator.

01Why I built it

Most portfolios describe AI work. Few let visitors inspect how an AI system actually works.

Every AI portfolio says "built with LLMs". I wanted mine to prove it — a site where anyone can ask a question, watch retrieval happen, and check whether the answer is actually grounded.

Questions I had to answer
  • Q1

    How do I stop the assistant from inventing things about me?

  • Q2

    Can retrieval run in the browser, with no vector database to host?

  • Q3

    What happens when there's no API key, or the model is unavailable?

02Approach

Treat the portfolio as a product: every claim lives in one knowledge base, which powers the assistant, the RAG explorer, and the evaluator.

03Key decisions
  1. One knowledge base for everything

    Every claim on the site lives in the content files; the assistant, the RAG explorer and the evaluator all read the same chunks.

  2. Hashed embeddings in the browser

    256-dimension feature-hashed vectors and cosine search run client-side — instant, private, and free to host.

  3. A local fallback behind the model

    With a key, retrieved context goes to Claude; without one, a local composer answers only from retrieved facts, so the site never breaks.

04Architecture
contextstreamYour questioninputEmbedding256-d hashedVector searchcosine top-kKnowledge baseportfolio chunksNext.js UIstreamed tokens/api/chatroute handlerGeneratorClaude · local
AIServiceDataInterfaceData flow
05AI components
01
Hashed embeddings

Portfolio facts are chunked and embedded into 256-dimension feature-hashed vectors, in your browser.

02
Vector search

Cosine similarity retrieves the top-k chunks for each question.

03
Grounded generation

Retrieved context is sent to Claude when an API key is configured; otherwise a local composer answers only from retrieved facts.

04
Evaluation

Claims are scored for groundedness and relevance against the knowledge base.

06Implementation
  • Streaming NDJSON route handler with rate limiting and a local fallback.
  • Physics-based neural canvas with springs, inertia, and theme-aware rendering.
  • Semantic color tokens for two first-class themes.
07Tech stack
Next.js 16TypeScriptTailwind CSS v4Canvas 2DRoute Handlers
08Looking back
The hard part

Making it feel premium without letting the effects take over — the neural canvas, the themes and the transitions had to support the content, not compete with it.

What I learned

Treating a portfolio as a product changes the question from "what should I show?" to "what can a visitor verify?"

09Result

You're looking at it.