Skip to content
  1. Projects

This website

A portfolio you can question. The pages are static and light, and a chat on every page answers from my CV, papers and project notes. Designed, built and run by me.

This website
  • Astro
  • FastAPI
  • ChromaDB
  • Claude API
  • Docker
  • Hugging Face Spaces
  • Cloudflare Pages

What the site holds

  • ProjectsCase studies, each told in its own look, inside one shared frame.
  • About and CVWho I am, where I worked, talks, and the CV as a PDF.
  • A chat on every pageAsk about my work from any page, or full screen on Ask my CV.
  • Light and darkFollows the device, and works with JavaScript turned off.

The system

Pages and answers come from two places. The pages are static files on Cloudflare. Answers come from a small API that searches my work and asks Claude.

A page

  1. Your browserAsks for a pageAny page of bharatpatil.dev.
  2. Cloudflare PagesStatic pagesHTML and CSS built ahead of time by Astro, sent with strict security headers.
  3. theme.jsPicks light or darkBefore the page shows, so it never flashes the wrong theme.
  4. site.jsWakes the chatStarts the sleeping server early. A little plain script, no framework.

A question

  1. Your browserSends a questionThe page woke the server while it loaded.
  2. Hugging Face SpaceFastAPI in DockerAnswers only this site, with limits on how often and how much.
  3. ChromaDBFinds passagesThe closest pieces of my CV, papers and notes.
  4. ClaudeWrites the answerFrom those passages only, streamed back word by word.

How the chat finds an answer

Once, ahead of time

  1. SourcesCV, cover letter, papers, thesis and project notes.
  2. PassagesSplit at headings or paragraphs. Short bits and setup steps are dropped.
  3. VectorsEach passage becomes a vector that captures its meaning (MiniLM).
  4. IndexStored in ChromaDB and published as a dataset the server loads at start.

Every question

  1. QuestionTurned into a vector the same way.
  2. SearchThe closest passages, each with how close it is.
  3. PromptA fixed persona, cached, plus the passages.
  4. AnswerStreamed to the page as it is written.

It says when it is unsure

Every passage carries how close it is to the question. Close matches get a plain answer, weaker ones a hedged one, and with nothing close it says so.

answershedgessays so

A bigger model for job ads

Questions go to Claude Haiku, which is fast and cheap. A long paste that reads like a job description goes to Claude Sonnet, which checks how my work fits the role.

Haiku: questionsSonnet: a job ad