AI EngineeringInterview preparation
Advanced·Concept·2 min read

Fine-tuning and when it is justified

Practice this question

🟢 ADVANCED · Learn after prompts, RAG, tools, and evaluation.

Overview

  • Fine-tuning trains an existing model further using task-specific examples.
  • It changes learned behavior rather than simply adding a document to the current prompt.
  • It can target formatting, domain task performance, style, or consistent instruction following.

Why this matters

Some repeated task errors remain after good prompting, structured outputs, retrieval, and model selection.

An everyday example

Train an experienced employee on many correctly handled company-specific examples.

A technical example

Train an extractor on reviewed accident narratives and expected field objects after demonstrating that the base model repeatedly misses certain domain cases.

How it works

  1. Diagnose failure
  2. Build representative reviewed examples
  3. Split data
  4. Train candidate
  5. Compare against baseline
  6. Validate safety/quality
  7. Version and deploy.

Architecture and flow

Reviewed examples → training → candidate model → held-out evaluation → approved deployment.

The insurance assistant example

Improve consistent claim-intake categorization, while policy wording and account status still come from RAG/tools.

When to use it

Stable repeated behavior gaps with enough high-quality examples and a measurable payoff.

When to avoid it

Not for constantly changing claim status, sparse low-quality examples, or problems caused by broken retrieval.

Interview answer

“Fine-tuning changes behavior learned from examples. I use it only after cheaper fixes and validate gains on held-out production-like tasks.”

Benefits, trade-offs, and production considerations

  • Fine-tuning adds dataset governance, training expense, new model lifecycle, and regression risk.
  • It may memorize sensitive examples.
  • Consider smaller specialized models or deterministic preprocessing before training.
Adapted from 13_AI.MD · “Fine-tuning and when it is justified”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.