← Back to projects

AIPersonal project2026

Ask about my background

An AI assistant on this very site that answers questions about my experience, projects and publications, using RAG over the site's content and citing its sources.

RAGCloudflare WorkersWorkers AITypeScriptAstro

The idea

A portfolio is read top to bottom, but visitors usually arrive with a specific question: “has he worked with RAG?”, “what does he do today?”. This assistant answers those questions in natural language, in English or Spanish, and links to the page where the answer lives.

How it works

  1. Knowledge base: on every build, Astro generates a file with chunks of all the published content: projects, games, background, publications and blog posts. The assistant knows nothing that isn’t on the site.
  2. Retrieval (RAG): a Cloudflare Worker turns the question into an embedding with bge-m3 and finds the 8 most similar chunks by cosine similarity, plus a fixed profile summary.
  3. Answer: Gemma 4 26B generates the answer on Workers AI, instructed to use only that context, speak in the third person and cite its sources as [n].
  4. Streaming: the answer reaches the browser word by word through server-sent events.

Costs and limits

Each question uses about 50 Workers AI “neurons”. A Durable Object counts the day’s questions: 10 per visitor and 120 in total. That keeps usage well below the 10,000 free neurons per day, so the chat never costs anything. Visitors are identified by a hash of their IP, which is never stored.

Design decisions

  • Only answer with what’s published: so it never says anything I haven’t reviewed.
  • Third person: it’s an assistant that talks about me; it doesn’t pretend to be me.
  • Testing without spending: the Worker is tested against a mocked model that checks retrieval, limits and the response format.