Skip to content
Verdict

Method

How Verdict decides whether a change to its own answer-finding is worth shipping, in plain language.

The question

Does a better retrieval pipeline, chosen by offline screening, make more visitors mark an answer as helpful than the simple keyword baseline? The unit of analysis is the participant, counted once, because one person asking five questions is not five people.

Screening offline

Sixty questions were written from the documentation: 20 dev questions used to tune thresholds, 40 test questions used only for the reported numbers. Each test question names the pages that contain its answer. Eight candidate pipelines retrieve passages for every question; an automated judge grades the answers against reference answers with a fixed rubric (correctness and faithfulness, each 0, 0.5 or 1). Candidates must pass gates on faithfulness, decline accuracy, latency and cost, and beat the baseline composite by at least 0.03. The full table is on the Candidates page. Reproduce it with one command: pnpm eval:offline.

The live experiment

The retrieval pipeline is a Flagsmith multivariate flag, retrieval_strategy. Half of visitors get the keyword baseline, half get the screened challenger; Flagsmith performs the split, never the application. On the first visit the server issues an anonymous random ID in one cookie; the same ID evaluates the flag, records the exposure when an answer is shown, and records the conversion if the visitor presses Helpful. One metric, answer_helpful, locked before the start. The flag values are locked while the experiment runs.

visitor -> /api/ask -> evaluate flag (identity) -> retrieve -> answer shown -> exposure event
visitor presses Helpful -> /api/feedback -> conversion event (same identity)

How we read the result

Two numbers are shown side by side and never merged. The Flagsmith result is the win probability in the Flagsmith dashboard; it is the source of truth for the ship decision. The Verdict estimate is computed here from the same counts: a Beta posterior over each arm, the probability the challenger is better, and a 95 percent credible interval for the difference, which is the range that plausibly contains the true difference given the data. The decision rule was fixed before the start: ship the challenger only at a Flagsmith win probability of at least 95 percent with all four guardrails passing (latency, cost, no-answer rate, error rate). Otherwise keep control, or say inconclusive.

What could mislead you

  • Helpful presses are a noisy proxy for answer quality, and not everyone presses. Mitigation: the metric is defined per participant and the feedback row is prominent but quiet.
  • Participants are mostly hackathon participants: a narrow, technical audience. Results may not generalise.
  • Cookie-based identity can split one person into several participants (two browsers, cleared cookies). This is accepted and disclosed.
  • The automated judge used in offline screening shares biases with language models in general. Mitigation: a different model judges than answers, the rubric is fixed text, and raw judge output is stored.
  • Real traffic may be too small for a confident conclusion. If so, the Lab says so, and the result is reported as underpowered.
  • Simulated traffic exists to exercise the pipeline. It is labelled everywhere and never merged into headline claims.

Shipping without a redeploy

The flag carries the full retrieval config as its value: strategy, number of passages, fusion and rerank switches. Promoting the winner means changing the flag in Flagsmith; the running process reads the new config on the next request. The Rollout page proves it: the served config changes while the build identifier and the process start time stay the same.

Reproduce it

Clone the repository, copy .env.example to .env and fill in the variables by name (a Flagsmith server-side key, a Postgres URL, a model provider key). Then:

pnpm install
pnpm ingest
pnpm build:index
pnpm eval:offline
pnpm dev

Embed it

The assistant can be embedded on any page:

<iframe src="https://your-verdict-url/embed" width="100%" height="560" title="Verdict assistant"></iframe>