Answers are grounded in this paper and cite their sources.
Note describes a TypeScript implementation that distinctively manages answerability using evidence in questions.
Chat-style language-model systems collapse five distinct operations (retrieval, use of private context, generation, citation, and refusal) into a single conversational surface, which makes it hard to say what evidence an answer rests on or whether it should have been given at all. This note describes answer-engine, a small TypeScript reference implementation that holds those operations apart. The system answers one question at a time against a bounded corpus, cites the public evidence it used, declines when no evidence clears a retrieval floor, and enforces a type-level boundary that keeps private text out of the model prompt while still allowing it to route retrieval. A fixed set of gold queries tests refusal, citation grounding, and the no-leak boundary as regressions. The artifact is a teaching-sized reference pattern, not a benchmark or a production framework.
No takes yet. Share an insight, caveat, or question.
Luke F. Walton (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: