This Site's AI Twin — RAG over my own content
The assistant on this site answers from an embedded corpus of its own pages — projects, essays, profile and FAQ — rather than from the model's memory. Retrieval is a vector query, not a guess.

- Year
- 2026
- Type
- Personal
- Role
- Solo developer · Live
- Status
- Live
What needed solving
A portfolio chatbot that answers from a general model will confidently invent a project I never built or a stack I've never used. For a site whose whole job is to represent my work accurately, a plausible hallucination is worse than no assistant at all.
The solution
Built a retrieval layer over the site's own content. An ingest script chunks every project, essay, service and FAQ entry, embeds each chunk with text-embedding-3-small, and stores the 1536-dimension vectors in Postgres via pgvector. At query time the question is embedded and matched with an HNSW cosine index through a `match_content_chunks` RPC that enforces a similarity floor, and only the retrieved chunks are put in front of the model.
What changed
- Answers are grounded in retrieved chunks, each carrying the page it came from, so the assistant links back to real content instead of describing work that doesn't exist
- Re-ingest is content-hash addressed: unchanged chunks are skipped and stale ones pruned, so editing one project re-embeds one project
- HNSW over IVFFlat for the index — better recall at this corpus size, and no training step to schedule
- Retrieval runs as a Postgres function with a similarity floor, so an off-topic question returns nothing rather than the least-bad match
Technical highlights
Need something like this?
I take on a small number of projects each quarter. Let's talk if your idea fits.