Dwi Ahmad Dzulhijjah

Model card: the portfolio chatbot

A small retrieval-grounded assistant that answers questions about Dwi's work from this site's own content. This page documents what it does, what it is built from, how it is evaluated and monitored, and what it stores.

Version
v2.0, December 2026
Owner
Dwi Ahmad Dzulhijjah, dwiahmaddzul@gmail.com
Models
Qwen/Qwen3-8B for answers, Qwen/Qwen3-Embedding-0.6B for retrieval, both through the SiliconFlow API
Status
Live

Intended use

Answer visitors' questions about Dwi's projects, methods and stack in English or Indonesian, briefly, with the sources each answer came from.

Out of scope, by design

How it works

  1. Privacy guard. A rule-based classifier reads the question first. Education and personal questions get a scripted reply in the visitor's language.
  2. Retrieval. The question is embedded with Qwen3-Embedding-0.6B and compared by cosine similarity with every content chunk. The four best go into the prompt. If the embedding index is missing or older than the content, a BM25 keyword search takes over, so the bot never goes dark.
  3. Generation. Qwen3-8B with thinking mode off, temperature 0.3 and at most 420 new tokens, streamed to the browser as server-sent events. The prompt allows only the retrieved context.
  4. Output checks. While the reply streams, the last 40 characters are held back so an output filter can stop out-of-scope terms before they reach the screen, and a loop detector cuts repeated-token loops.
  5. Sources and grounding. The model lists the chunk ids it used. A lexical grounding score counts how many named terms and numbers in the reply also appear in those chunks.
  6. Logging. One anonymous event per turn feeds the Lab panel and the evaluation.

In Data scientist mode every answer shows this trace: the chunks retrieved and their similarity, timings, which checks ran, and the grounding score.

Data

Knowledge base

One file, content/content.json, renders the page and feeds the bot, so the two cannot disagree. It is split into 15 chunks: one per project plus short notes on Dwi, contact, stack, other builds, privacy and evaluation. The embedding index records the content version it was built from and is ignored when they differ.

Content is edited without touching code: through a private admin page, or by Claude through this site's own MCP server at /mcp, protected with OAuth 2.1 and PKCE. Every change is checked against the education and personal-life policy, versioned, reversible, and followed by a rebuild of the embedding index, so the page and the bot change together. Hidden projects are removed from the public content before the page loads it.

Visitor logs

FieldWhat it holds
tsTime of the event, UTC
sidRandom id created in the browser tab, gone when the tab closes
qThe question text, omitted under Do Not Track and for self-introductions
retRetrieval method, chunk ids and scores, whether a good source was found
llmTime to first token, total time, reply length, errors
stop, gr, srcSafety stops, lexical grounding, cited sources
mode, langVisitor or Data scientist mode, English or Indonesian
cc, devTwo-letter country code from Cloudflare, device class (mobile, desktop, bot)

Not stored: IP addresses, cookies, full user-agent strings, or names, unless a visitor chooses to pass a hello on to Dwi.

Evaluation

A golden set of fact questions with expected facts, plus privacy probes that must be redirected, in English and Indonesian. Each version of the bot is scored on:

The baseline is v1 from August 2026: a static prompt with Qwen2.5-7B-Instruct and no retrieval, measured on the same set before it was retired.

Loading results…

Monitoring

The Lab panel on the portfolio, visible in Data scientist mode, recomputes these every ten minutes from the last 30 days of logs: questions answered, share that found a good source, mean lexical grounding, first-token latency at the median and 95th percentile, safety stops, and topic clusters. Weekly, logged questions are clustered by topic and the ones without a good source become content to add.

Limitations

Privacy and data governance

Changelog

Back to the portfolio