All projects

Ask Me Anything — RAG Widget

Shipped

A RAG-powered chat widget that answers recruiters’ questions about my background in natural language.

PythonFastAPIPineconeClaude APIReactAWSCloudflare

Visitors ask natural-language questions about my professional background and get grounded, conversational answers — the model answers about me, in the third person, citing its sources. Built across three fully-designed layers: Notion ingestion, a Python/FastAPI query pipeline, and a React streaming frontend.

Highlights

  • Ingestion: Notion → chunk → hosted Pinecone embedding (llama-text-embed-v2 @ 384-dim, cosine) → vector store.
  • Query pipeline: retrieve → relevance gate → grounded prompt → Claude Haiku 4.5, streamed over SSE from FastAPI.
  • Answers are grounded and cited — a relevance gate keeps the model from answering off-corpus questions.
  • Cloud rollout on AWS Lightsail + Cloudflare, with Lambda + EventBridge for scheduled ingestion.
  • The frontend widget is a first-party, style-isolated component embedded directly in this site at /ask.

Architecture

The widget is split into independently designed layers so each can be reasoned about and tested on its own: a Notion ingestion pipeline, a Python/FastAPI retrieval-and-serving pipeline, and a React streaming frontend. Embedding is a hosted API call by design — there is deliberately no local torch / sentence-transformers dependency.

Screenshots

A full ask-me-anything cycle — type a question, watch the answer stream in token by token, source cards appear, then an off-topic question is politely declined by the relevance gate.
One full cycle: ask a question, watch it stream in, see the sources — then an off-topic question is turned away by the relevance gate.
The idle Ask Me Anything widget with an empty question box and suggested-question chips.
The idle widget — an empty ask box with suggested questions to get started.
The widget rendering an answer as it streams in token by token from the FastAPI backend over SSE.
An answer streaming in token by token, served over SSE from FastAPI.
Source cards below a completed answer, grouped by portfolio page with a preview snippet and a read-more link.
Every answer is grounded — the source cards show the portfolio content it drew from.
An off-topic question answered with a polite decline and no source cards, showing the relevance gate at work.
Ask something off-corpus and the relevance gate declines — no sources, no hallucinated answer.

Repository