Case study · RAG
Portfolio AI Chat
A retrieval-augmented chatbot that answers questions about me from a markdown knowledge base, with streaming responses on Cloudflare Workers AI.
How it works
A small RAG pipeline that turns a personal knowledge base into a conversation.
The chatbot answers questions about me using a knowledge base of markdown files. It
uses @cf/baai/bge-base-en-v1.5 for embeddings, cosine similarity to
retrieve the top five relevant chunks, and
@cf/meta/llama-3.1-70b-instruct to generate responses with streaming.
It was built to power a floating chat bubble on the original portfolio. The current editorial design focuses on the work itself, so the widget is no longer loaded — but the pipeline remains a clean example of running RAG entirely at the edge.
Tech stack
Cloudflare Workers
Serverless API endpoint handling chat requests and orchestration.
Workers AI
Embedding (BGE) and generation (Llama 3.1 70B) on the free tier.
RAG pipeline
Chunking, vector similarity and context injection in-worker.
Streaming
SSE token streaming from the LLM to the chat UI.