Skip to content
Ákos Kappel
Language: en
Theme
Light
Dark

Portfolio Assistant

The AI chat on this site, answering questions about my work from its own pages, on free models only.

Swagger UI listing the chat, feedback, evals and health endpoints

About the project

Recruiters and visitors often have one specific question, and the answer is spread over several pages. The "Ask about me" button opens a chat that answers it in a few sentences, links the pages it used and suggests what to ask next.

It answers only from the portfolio itself. The site publishes its content as one text file, generated from the same data as its pages, so the chat never drifts from what the site says. When something is not there, it says so instead of guessing.

It runs on free tiers only, and no provider account has a payment method, so it cannot cost money. I planned the design and reviewed every change; AI coding agents helped write it.

Key decisions

  1. Several free models instead of one paid model

    A paid model would be simpler and steadier, but a public chat can be abused, and a spending limit is still a bill. With no payment method on any account, the worst case is a busy message. The cost is uneven quality between models, which is why the weekly evals decide their order.

  2. Fixed rules instead of an AI judge

    Another model could grade the answers more flexibly, but its verdict changes from run to run and needs its own quota. Regular expressions give the same result every time, so a drop in the score means the model changed, not the judge. The cost is narrower checks that I have to write per question.

  3. Picking pages instead of a vector database

    Embeddings and a vector store are the usual way to find relevant text, but the site is small and already split into pages with titles. A fast model choosing pages from that list needs no index to keep in sync. The cost is one extra model call per question; when it fails, the whole site is sent instead.

  4. No stored conversations

    Cloudflare's AI Gateway would have given caching and analytics, but its logs keep full prompts and answers. I dropped it, and the Worker logs only which model answered, how fast and why others failed. The cost is that a bad answer cannot be looked up later, so the evals and the thumbs down have to catch problems.

What you can try

  • Ask about my experience, skills or projects and get a streamed answer with links to its sources
  • Recruiter mode: paste a job description to see what the portfolio shows, what is related and what it does not mention
  • Answers in English, German, Slovak, Czech and Hungarian, and "this project" refers to the page you are reading
  • Suggested follow-up questions, voice input and a thumbs up or down for each answer
  • The weekly test results of every model, shown on the page about how the chat works

Under the hood

  • A Cloudflare Worker in plain TypeScript with no framework: two routes and one small request shape did not need one
  • Five free models from Groq, Workers AI, Google AI Studio and OpenRouter, tried in order; a model that is rate-limited, slow or breaks off mid-stream is skipped and cools down
  • Before answering, a fast model picks the one to four pages a question needs through function calling, so each request sends only part of the site
  • Checks run cheapest first: origin allowlist, body size, five requests a minute per IP, then Cloudflare Turnstile, which fails closed
  • An eval suite of fixed questions runs against every model each week in GitHub Actions; the results decide the model order and are served as JSON
  • The API is described in OpenAPI and browsable with Swagger UI at ai.akoskappel.dev/docs; Vitest covers the routes, the fallback and the stream handling

Architecture

  1. 1BrowserChat panel on this site, Turnstile token per message
  2. 2Cloudflare WorkerChecks the request, picks the pages, stores nothing
  3. 3Free modelsGroq, Workers AI, Google AI Studio, OpenRouter, in eval order
  4. 4Site content/llms-full.txt, generated from the pages, cached for an hour

Lessons learned

  • Some models answered with nothing or timed out, and the cause was hidden reasoning: it counts against the same output limit as the answer. Turning reasoning off or down per model fixed it. Now I check what a model does before its first visible word, not just the answer.
  • My first fallback moved on only when a provider returned an error. Some streams started fine and then stopped halfway, which shows up as a cut-off answer. Now a stream that ends early counts as a failure too, and the model cools down like any other.
When
2026
Type
Personal
A question typed into the chat and the answer streaming in
A real answer, streamed as the model writes it, with its sources and three follow-up questions.
Recruiter mode comparing a pasted job description with the portfolio
Recruiter mode lists what matches, what is related and what the portfolio does not show, without scores.
Bars showing how many of the 34 test questions each model answered correctly
The weekly eval results on the page about how the chat works. The scores set the order in which models are tried.
Swagger UI listing the chat, feedback, evals and health endpoints
The API documentation at ai.akoskappel.dev/docs, generated from an OpenAPI spec.

1 of 4

A real answer, streamed as the model writes it, with its sources and three follow-up questions.