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.

Cloudflare Workers Workers AI BGE embeddings Llama 3.1 SSE streaming
Portfolio AI Chat interface
The original widget. The editorial rebuild retires the floating chat bubble, but the RAG service behind it is still a useful reference.

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.

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.