← Back to work
Ask my AI: Portfolio Assistant
LLMsOpenAI APIEvaluationNext.js

Ask my AI: Portfolio Assistant

2026Live on this site

The assistant on this site. It answers questions about my work from published facts only, cites the exact role or case-study section it used, and is checked by an automated evaluation suite.

The problem

Recruiters and hiring managers skim portfolios quickly and often have one specific question. A chat assistant can answer it directly, but only if it never invents experience, stays on topic, resists prompt injection, and shows where each answer came from.

How it works

  1. 01, Input
    Visitor question

    Asked in the chat panel, with the recent conversation.

  2. 02, Tool or code
    Guardrails

    Size limits, input moderation, per-visitor rate limits, and a daily cap.

  3. 03, Tool or code
    Grounded context

    Facts from the site's content file, plus live GitHub or Medium data only when the question needs it.

  4. 04, Model
    Streamed answer

    OpenAI Responses API, with web search restricted to approved domains.

  5. 05, Tool or code
    Citation check

    The model names its sources by ID; the server keeps only IDs on an allowlist.

  6. 06, Output
    Answer and deep links

    Links scroll to the exact role or case-study section.

InputTool or codeModelOutputBuilt with Next.js on Vercel. Visitor questions are not logged.

What I did

  • Grounded every answer in the same content file that renders the site, so the assistant and the pages never disagree.
  • Streamed answers through the OpenAI Responses API, fetching live GitHub or Medium data only for questions that need it, and restricting web search to approved domains.
  • Had the model end each answer with the IDs of the sources it used, then stripped that line from the stream and kept only IDs on a server-side allowlist, so it can never introduce a link of its own.
  • Linked each source to the exact role or case-study section, which scrolls into view and is briefly highlighted.
  • Protected it with input moderation, request size limits, per-visitor and daily rate limits, and disabled response storage.
  • Built an evaluation suite that replays real questions, including multi-turn follow-ups, prompt-injection attempts, and questions with no published answer, and checks the answer text, the cited sources, and that every link lands on a real anchor.

Results

  • Passes all 34 evaluation cases, including follow-ups where the sources must change with the question.
  • Says when something is not published instead of guessing, and declines off-topic and injection attempts.
  • Every source link opens the exact part of the site the answer relied on.