The website you’re exploring is a Next.js application built with React and TypeScript: a bilingual portfolio, case studies, articles and interactive diagrams. I integrated an LLM assistant with document retrieval to make my work accessible through conversation.
THE QUESTION
How can visitors explore my work through a few questions, without invented experience or a paid inference budget?
MY APPROACH
A bilingual assistant that searches the public portfolio, answers with sources, and keeps a classic Q&A path available at all times.
How I built it
01
One content source
I organized experience, projects and articles as bilingual TypeScript content. The website and retrieval use that data, so portfolio updates also inform the answers.
I normalize words, expand French and English synonyms, then rank relevant passages. Retrieval selects up to five passages; the server adds profile context when needed.
A Next.js route validates input with Zod, checks scope and reserves quota before calling OpenRouter. The prompt distinguishes experience, projects and articles, and requests numbered references.
The browser receives server-sent events, with generation cancellation and source links. If the service fails or references are invalid, a prepared answer takes over when one is available.
The browser sends the question and a short history to the server. Model credentials stay on the server; visitors never receive them.
Checks
The server validates the request and reserves an attempt: ceilings of 5 per visitor and 40 total per day. Redis shares counters across instances; without Redis, these limits apply separately to each instance.
Retrieval
Lexical retrieval selects relevant passages from my experience, projects and articles. Sources distinguish professional experience from topics I have written about. No model training or vector database is needed.
Generation
The model receives the question and selected passages. Only free models are allowed, with zero-price caps. Unavailability never triggers a paid-model fallback.
Answer
The answer appears progressively. Reference numbers are checked against the selected passages, and visitors can open the sources. Responses remain labelled as AI-generated.
01 / 05
Question
The browser sends the question and a short history to the server. Model credentials stay on the server; visitors never receive them.
When a check fails, predefined answers take over. A valid reference alone does not prove that every claim is correct.
THE IMPORTANT CHOICES
One content source for the website and retrieval, avoiding a duplicated biography that goes stale separately.
Atomic Redis counters, when configured, to share the budget across server instances.
A useful fallback: exhausted allowance, unavailable service or a failed check → classic questions without a model call.
Public source passages are sent to the provider only for AI answers. This site does not save conversations. Application checks limit abuse; DDoS mitigation also depends on the hosting platform.