// The words the app uses to explain each system and step (from SPEC; numbers never live // here: they come from web/public/data, written from the eval results). import type { SystemId } from './types' export const SYSTEMS: Record = { a: { short: 'A', how: 'Embeds the question and reads the 5 most similar fixed-size text windows. No structure, no policy-date filter.', }, b: { short: 'B', how: 'Keyword (BM25) + meaning (dense) search fused, versions filtered by the policy date, a cross-encoder reranks, cited sections are pulled in.', }, c: { short: 'C', how: "B's hybrid search without the reranker, then an LLM judge lists the facts the answer needs, searches again for any it can't find, picks the passages that cover them, answers, and verifies every quote.", }, } // C's graph nodes (agent/graph.py) and the steps A and B run inside one call. export const STEPS: Record = { retrieve: { title: 'Search', what: 'Hybrid search (BM25 + dense) over the versions in force on the policy date (a form with no version in force is kept and flagged)' }, judge: { title: 'Judge', what: 'Lists the facts the answer needs and which passages state each' }, research: { title: 'Second search', what: 'Searches for each fact no passage states' }, judge_new: { title: 'Judge new passages', what: 'Reads only the new passages, for the missing facts' }, select: { title: 'Select', what: 'Keeps passages covering every fact, adds sections they cite' }, answer: { title: 'Answer', what: 'Claude Haiku answers from the selected passages only' }, verify: { title: 'Verify citations', what: 'Every quote must be word for word in a shown passage: one retry, then citations that still fail are dropped' }, search: { title: 'Search', what: 'Finds passages for the question' }, rerank: { title: 'Rerank', what: 'A cross-encoder reorders the candidates' }, expand: { title: 'Expand', what: 'Adds the sections the passages cite' }, } export const VERDICTS: Record = { exact: { label: 'Verified', tone: 'good', why: 'Word for word in the cited section and in a passage the model was shown.' }, approximate: { label: 'Close match', tone: 'warn', why: 'Close to the cited text, but not word for word.' }, not_shown: { label: 'Not from a shown passage', tone: 'warn', why: 'The text exists, but the model was not shown it.' }, not_found: { label: 'Not verified', tone: 'bad', why: 'The checker could not match this quote to the cited section: not found, a number or negation differs, or it is too short to count.' }, } export const NOT_ADVICE = 'Public FSRA forms and Ontario laws only ยท not coverage advice: read the cited text'