Showcase 1 · Self-Correcting RAG

Ask My AI

A self-correcting RAG agent that answers questions about Thomas's background, skills, and projects. It retrieves context from a pgvector store, then grades its own answer — rewriting the query and retrying when the grade fails. Toggle See Thoughts to watch the loop work.

Recursive Portfolio Agent · LangGraph

Ask the agent anything about Thomas's background, projects, or experience.

How it works

Correction loop

retrievegraderewrite → retry → generate. The grader is a small LLM that decides whether the retrieved context actually answers the question; if not, the query is rewritten and the loop runs again.

Knowledge source

The corpus is Thomas's resume, GitHub activity, certifications, and the project write-ups from this site. Stored as pgvector embeddings; retrieval is cosine similarity with a small top-k.

See Thoughts

Toggling the panel exposes the per-turn trace — which documents were retrieved, the grader's verdict, any rewritten query, and the final generate-token count. Designed to make the loop legible, not a black box.

Rate limiting

The chat endpoint is rate-limited per visitor in middleware to keep the demo cheap and prevent abuse. Messages are length-validated server-side before any retrieval runs.