Skip to content

2026-10-15 · 1 min read

How the text assistant on this site works

How the portfolio's text assistant sends questions to a rate-limited API and falls back to profile-based answers.

The assistant on this portfolio answers questions about Mahmud's projects, experience, skills and rates. Visitors type questions into a small chat interface.

A narrow API route

Messages are sent to a rate-limited API route with bounded message length and history. When a language model is configured, the route supplies portfolio facts and instructs it to answer only from those facts.

A local fallback

When no model key is configured, or the model request fails, the API uses simple intent matching against the same profile and project data to produce a basic answer.

Progressive response display

The interface reveals each completed answer a few characters at a time. This is a display animation; the current API response is returned as a complete message rather than streamed token by token.

Limits

Answers are constrained to portfolio information and may still be wrong. Visitors are encouraged to email Mahmud to confirm important details.

← All articles