RAG Chat Assistant
A retrieval-augmented chat assistant that answers from the site's own content, using Cohere embeddings, reranking and Command A.
What it is
The chat assistant answers questions about my projects, work and education, on the chat page or through a floating widget. A language model on its own will happily make things up about a person, so the assistant retrieves passages from the site’s content first and answers only from those. The first version, in December 2024, used Command R over the site’s pages. The 2026 rebuild added reranking, a curated knowledge base and Command A.
How it works
Each question is embedded with Cohere’s embed-v4.0, matched against a Pinecone index and reranked with rerank-v4.0-fast. Command A answers from the top few chunks in the third person, leading with the answer, and the reply streams back as it’s generated. I picked Command A after benchmarking a few lighter models on speed, conciseness and resistance to prompt injection.
Knowledge base and safety
The index comes from curated third-person markdown files. A script splits each file by heading, embeds the chunks and stores each with its page URL, so an answer can point back to its source.
The back end runs on Netlify Functions, and conversation history stays in the browser. Requests are checked against the site’s origin and rate-limited before any model call.













