AI Foundations for Developers COURSE·LESSON 19 OF 410 completed

Instruction Tuning and Preference Learning

Teach a base model the desired response pattern

Supervised fine-tuning, often shortened to SFT, trains on input-output examples. An instruction-tuning dataset might pair a support question with a helpful answer that cites a policy and asks for missing information. This teaches response behavior; it does not guarantee every answer will follow the example perfectly.

Formatting, role templates, refusal examples, and response quality all matter. If every training example confidently guesses a missing fact, the model may learn that pattern too.

Preferences introduce another signal

A preference dataset contains alternatives and judgments about which response is better. For “Can I get a refund?”, reviewers might prefer a response that asks for purchase date over one that promises money immediately.

In one common RLHF approach, a reward model learns from preferences and a policy is optimized against that reward, usually with constraints that discourage excessive deviation. Other methods, such as direct preference optimization, train from preference pairs without using a separate reward-model optimization loop in the same way.

Rendering diagram…
flowchart LR
  A[Base model] --> B[Supervised instruction tuning]
  B --> C[Preference data]
  C --> D[Preference optimization]
  D --> E[Behavioral evaluations]

Alignment here means shaping behavior toward intended criteria. It is not a proof that the model shares human values, cannot be manipulated, or has become factually correct.

Proxy objectives can fail

If reviewers consistently prefer long answers, a model can learn verbosity. If rewards favor agreement, it can become sycophantic. If an evaluator prizes confident wording, it may encourage unsupported certainty. Optimizing a proxy aggressively can exploit weaknesses in the proxy rather than improve the actual user outcome.

Use clear review rubrics, examples of subtle failures, and separate held-out behavioral tests. Evaluate refusal quality as well as refusal rate: rejecting harmless requests can also damage usefulness.

Checkpoint with answers

What is the difference between SFT and preference learning? SFT learns from target responses; preference methods learn which alternatives are preferred according to a specified signal.

Can preference optimization fix every hallucination? No. It can shape behavior, but factual reliability still depends on knowledge, evidence, task design, and evaluation.

Exercise: Your reward is “contains a citation.” What failure might emerge? Answer: invented or irrelevant citations can satisfy the surface criterion. Check whether the cited source actually supports the claim.

Reference

Direct Preference Optimization describes a preference-training approach; it is one method, not a universal recipe.

Learn at your own pace0 / 41 lessons complete