Implement text analysis solutions 4.1 Apply language model text analysis

A logistics company wants a model to produce delivery-route plans.

Study guide skill: Customize language model outputs for domain tasks, such as compliance summarization and domain extraction

Question B7-010

A logistics company wants a model to produce delivery-route plans. Many different plans can be valid, and the team can't write one ideal answer for each request, but it has code that reliably scores any plan for cost and rule compliance. The team is new to model customization. Which approach fits best?

Select one answer.

  • A Managed fine-tuning with reinforcement fine-tuning (RFT), using the scoring code as the grader ✓ Correct answer
  • B Managed supervised fine-tuning (SFT) with one sample plan written for each prompt
  • C Interactive training (preview), writing a custom Python training loop with custom rewards
  • D Preference fine-tuning (DPO) with pairs of preferred and rejected plans

Answer: A

RFT trains from prompts plus a grader that scores generated responses, and it fits when many solutions are possible and you can reliably score their quality. SFT needs desired responses to demonstrate, and DPO fits when quality depends on preferences such as tone rather than a score. Microsoft recommends starting with managed fine-tuning if you're new to customization; interactive training (preview) is for experienced ML practitioners and requires access approval.

Deep dive

How it works

Foundry's fine-tuning overview matches each managed fine-tuning method to the training signal you have:

  • SFT: learns from prompts and desired responses. Fits when you can demonstrate the behavior.
  • DPO: learns from preferred and rejected responses. Fits when quality depends on preferences such as tone.
  • RFT: learns from prompts plus a grader that scores responses. Fits when many solutions are possible and you can reliably score them.

The route-planning case matches the RFT description word for word. Many plans can be valid, so there's no single answer to demonstrate, but existing code scores any plan for cost and rule compliance. That code becomes the grader. The model learns to produce plans that score well.

On the approach: managed fine-tuning runs a training job from your data and settings. The overview recommends starting there if you're new to model customization, because its workflows are predefined. Interactive training (preview) gives Python control over losses, rewards and rollouts. It's aimed at experienced ML practitioners and requires access approval.

The other options, and when you'd use them

  • SFT with one sample plan per prompt: SFT learns from prompts and desired responses, for cases where you can demonstrate the behavior. The team can't write one ideal answer per request.
  • Interactive training with a custom loop: It's for experienced ML practitioners building custom training workflows, and it needs access approval. The team is new to customization.
  • DPO with preferred and rejected pairs: DPO fits when quality depends on preferences such as tone or completeness. Here quality is a computable score.

Exam tip

Gradeable but open-ended output = RFT with a grader. Demonstrations = SFT. Preference pairs = DPO. New to customization = managed, not interactive.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Text analysis questions · AI-103 study guide

Thanks for your feedback!