A Small Language for One Answer Box

A Pattern Language shows the power of a small language with a porch: ten patterns, chosen from 253, that together generated one particular porch on one particular house, each pattern adapted to the place rather than copied. This composition does the same for a small AI content system. It is an illustration, not a report of a project.

The project

A product team of four writers keeps its documentation as Markdown in a repository: about three hundred topics. It wants an answer box at the top of each help page where readers can ask a question in their own words. There is no budget for an agent platform, a graph database, or a review team. The writers want answers they would be willing to sign.

The language

Working down the language checklist from the starting pattern, the team ticks ten patterns and leaves the rest.

  1. RETRIEVAL CONTENT LAYER (3) is the starting pattern; it describes the whole project.
  2. THE QUESTIONS PEOPLE ASK (1) is a larger pattern, but the team can act on it in a small way: it exports a year of the help site’s search queries and support-ticket subjects and sorts them into thirty families. The families become the first evaluation cases.
  3. CONSTRAINED MARKUP PROFILE (11) turns the Markdown into a substrate. The writers already use consistent front matter; the profile adds a required information type and checks it in the pull-request pipeline.
  4. SEMANTIC CHUNKING (32) cuts each topic at its second-level headings, with one rule from the profile: a warning stays with the step it governs.
  5. INDEX SYNCHRONIZATION (33) takes its smallest honest form. Three hundred topics are few enough to rebuild the whole index from the repository every night and switch to it only when the rebuild passes. Deletions propagate because nothing survives that is not in the new build. The pattern’s obligation is met without a change feed.
  6. FILTER BEFORE RANKING (34) filters by product version, which the reader’s page already knows, and by the information type the question asks for, before ranking.
  7. ANSWER FROM THE EVIDENCE (35) answers in two or three sentences, each citing a topic. A twenty-line check confirms that every cited topic was actually retrieved.
  8. ABSTAIN ON THIN EVIDENCE (61) declines when fewer than two directly relevant passages are found, shows the nearest topic, and files the question as an issue in the repository.
  9. SIGNALS FROM READERS (44) adds a “this was wrong” link; reports go to the same issue tracker.
  10. REPAIR AT THE SOURCE (45) is the team’s rule for those reports: fix the topic, the profile, or the chunking rule, never the prompt alone.

INDEPENDENT EVALUATION LOOP (80) is satisfied by a script that runs the thirty question families weekly and reports retrieval and answer quality separately; the team counts it as part of pattern 1 rather than a separate system.

How the patterns were used

The patterns were used judiciously, not blindly. Index synchronization calls for complete generations with verification; for three hundred topics, a nightly full rebuild is a complete generation. Abstention calls for a threshold per question type; the team starts with one threshold and plans to split it when the weekly evaluation shows where it is wrong. The question population is a spreadsheet, owned by one writer, refreshed quarterly.

The patterns also compress. The chunk’s front matter is its applicability filter, its citation target, and its provenance at once. The issue tracker is both the abstention queue and the repair queue. The writers’ pull requests are the governed change path, the human approval, and the release record.

What was left out, and why

The claims registry, the content pipeline, the agentic root, the change feed, the policy decision point, and governed memory are all absent. Each solves a problem this project does not have yet. When the team begins answering from support transcripts, CLAIMS KNOWLEDGE REGISTRY (5) will enter the language. When the corpus outgrows nightly rebuilds, SUBSTRATE CHANGE FEED (31) will. The small language is not a lesser version of the complete system; it is a whole of its own, and it can grow piecemeal into a larger one.

flowchart LR
    REPO["Markdown repo<br/>(profiled)"] --> NIGHT["Nightly rebuild<br/>+ switch"]
    NIGHT --> IDX["Chunks with front matter"]
    Q["Reader's question"] --> F["Filter: version + type"]
    IDX --> F
    F --> A["Two cited sentences"]
    F -. "fewer than two" .-> AB["Abstain + issue"]
    A --> WR["'This was wrong'"]
    WR --> FIX["Fix at the source"]
    AB --> FIX
    FIX --> REPO

The whole system: ten patterns, one repository, one index, one issue tracker.