Skip to content

Architecture

Prompter is a single deployable with one database. It is a retrieval-augmented generation (RAG) pipeline: the documentation is never trained into a model - it is indexed, and relevant excerpts are given to the model per question, which is why answers stay current with the docs. What that means for trust and freshness is covered in Grounded answers; this page covers the moving parts.

Prompter

Sources

cratis.io
sitemap + .md mirrors

Discord
mention / /ask / help forum

Ingestion
heading chunking, hash-keyed

Retrieval
hybrid BM25 + vector, RRF

Answering
Claude, citations, refusal

Postgres + pgvector

The documentation site already publishes a sitemap and a markdown mirror of every page on each deploy. Ingestion walks the sitemap, fetches each page’s markdown mirror, splits pages into chunks along their heading structure (a section under 200 characters is merged with a neighbor under the same second level heading, keeping its heading inline), and embeds only chunks whose content hash changed since the last run. Generated code-snippet fragments are excluded. A re-index runs as a one-shot Kubernetes Job through Reindex - Production, nightly at 03:52 UTC or on demand on main. Documentation dispatches do not trigger it, and production has no public reindex route.

Retrieval is hybrid: full-text search (BM25-style, Postgres tsvector) and semantic search (embedding cosine similarity, pgvector) run in a single SQL query and are fused with reciprocal rank fusion. The full-text arm matches every question term first and then any term, so a broad question whose words never occur together in one chunk still finds candidates. Hybrid retrieval roughly halves retrieval failure compared to embeddings alone in published benchmarks, and it is the one quality technique Prompter commits to from day one.

The model receives only the retrieved excerpts and must answer from them - answers reference the excerpts they used, and those pages are attached as source links. When the best passage scores below a confidence threshold, Prompter refuses instead of guessing. Every interaction is recorded as anonymous signal (no message content, no user identity) so answer quality is measured against a golden question set rather than assumed.