A full-stack RAG assistant built and deployed on Cloudflare’s own platform, as a tailored application artifact for Cloudflare roles. Live demo above (if reachable); fallback link below.
Stack
- Routing / orchestration: A Cloudflare Worker (TypeScript) that handles the
inbound request, embeds the query (
@cf/baai/bge-small-en-v1.5), queries the Vectorize index, assembles the prompt, and forwards to the Workers AI generation model. - Knowledge memory: Cloudflare Vectorize — embeddings of Cloudflare’s own docs serve as the retrievable knowledge base.
- Conversational memory: Cloudflare Durable Objects — each user session is a distinct DO instance, so the assistant can carry multi-turn context without a global database.
- Generation:
@cf/meta/llama-3-8b-instructvia Workers AI. - Frontend: React + TypeScript on Cloudflare Pages (
main.cloudflare-ai-assistant.pages.dev).
The memory architecture
The non-obvious design choice was to split memory along two axes that scale and fail independently:
- Knowledge memory lives in a Vectorize index. It’s append-only, read-mostly, high-cardinality. Embeddings are computed once and re-used across all users.
- Conversational memory lives per-user in a Durable Object. It’s mutable, read-write balanced, low-cardinality (1 DO per active session).
Conflating these would force every user’s transient chat state to scale with the size of the knowledge corpus — wrong shape for the workload, wrong cost curve.
Why this is on the portfolio
When I apply to Cloudflare, the implicit ask is “have you actually used what we build?” This project answers that with a deployed URL.