Preparing your design workspace

Loading the problem and your latest saved attempt…

Design SFT and RL for Consistent LLM Answers

Improve an assistant's factual and abstention consistency across equivalent prompts with reviewed SFT data, reward design, and independent evaluation.

Problem statement

For this exercise, assume an LLM assistant answers bounded factual questions against one approved, versioned reference-answer policy. Several differently worded prompts may ask the same question.

The model should give materially equivalent factual answers and the same answer-or-abstain decision for equivalent prompts under the same reference revision; exact wording need not match. Prompts with changed qualifiers or different facts may require different answers.

Design an improvement program that first uses supervised fine-tuning (SFT) on approved demonstrations, then explores reinforcement learning (RL) from reviewed feedback.

Specify which data should be collected, how equivalent and non-equivalent prompts are labeled, what reward encourages correct consistency without teaching the model to repeat a canned answer or always abstain, and how SFT and RL candidates are evaluated independently.

For this exercise, a candidate can be promoted only after a versioned holdout shows both consistency and factual utility, then monitored in a bounded canary with rollback. The numbers below are practice assumptions rather than interview-reported constraints.

Building live retrieval, changing the reference policy, training a foundation model from scratch, and creating a general chatbot platform are outside scope.

What to build

  1. A review team can version approved SFT demonstrations and preference judgments with equivalence-group labels, reference revisions, consent and split lineage.
  2. An ML team can run reproducible SFT and RL candidates, compare them to a fixed baseline, and measure semantic agreement, factual correctness and answer coverage on independent held-out prompt groups.
  3. A release owner can promote a candidate through a bounded canary or restore the prior release without mixing model, policy or evaluation versions.

At scale

  • For this exercise, assume 100,000 approved demonstration prompts grouped by underlying fact or intent, with reviewed equivalent paraphrases and deliberately different near-neighbor questions; one training cycle may sample up to one million candidate responses for preference or RL work.
  • For this exercise, hold out 10,000 disjoint fact or intent groups from training and threshold tuning. For each group at one fixed reference revision and decoding configuration, evaluate exactly three approved equivalent prompt variants with two independent generations each. Among the six responses, compare all 15 unordered pairs: a pair agrees when both express the same core factual answer or both abstain; an answer-versus-abstain mismatch fails. Average the pair-agreement rate across groups.
  • For this exercise, before promotion require at least 95 percent macro-averaged pair agreement across equivalent held-out groups, at least 90 percent judged factual accuracy among answered, answerable cases, and at least 80 percent answer coverage on answerable cases, with no material regression on deliberately different near-neighbor prompts or safety slices.
  • For this exercise, a production canary serves at most 5 percent of eligible requests and must keep every request pinned to one model and reference-policy revision; promotion or rollback is governed by the same independent quality and safety monitors.