wip Self-Correcting

Recursive Portfolio Chatbot

A self-correcting RAG agent that answers questions about my background using a LangGraph correction loop — with a 'See Thoughts' toggle showing internal reasoning.

LangGraphVercel AI SDKPostgrespgvectorReact

An “About Me” page on steroids. Instead of a static bio, visitors chat with an agent that retrieves context from my resume, GitHub activity, and project descriptions.

The Correction Loop

The agent uses a LangGraph correction loop:

  1. Retrieve — fetch context from pgvector embeddings of my resume and GitHub
  2. Grade — a grader LLM asks: “Does this actually answer the question?”
  3. Rewrite — if “No”, the query is rewritten and the loop retries
  4. Respond — only answers the visitor when confident

”See Thoughts” Toggle

A toggle next to the chat exposes the agent’s internal JSON reasoning trace in real time — showing exactly which retrieval step fired, what the grader scored, and why the query was rewritten. This is the transparency feature that makes it a portfolio piece, not just a chatbot.

Tech Choices

  • LangGraph for the stateful correction loop
  • Vercel AI SDK for streaming responses to the React island
  • Postgres + pgvector for semantic memory (resume, GitHub, project writeups)