liveBook · Manning

Fine-tuning

As explained in The Art of AI Product Development

Fine-tuning is adapting a pretrained model by training it further on task- or domain-specific data.

A content team keeps rewriting AI drafts: the wording sounds generic, specialist terms are off, and every article needs another editing pass. Better prompts help, and retrieval can supply relevant documents, but neither necessarily gives the model the team’s voice or a dependable grasp of its domain. Fine-tuning becomes worth considering when these gaps recur across users and the improvement could justify the cost. section 8.0 section 8.1.2

Fine-tuning trains a pretrained language model further on data chosen for a particular domain, task, or way of following instructions. It produces a model adapted to those examples rather than relying solely on instructions or retrieved information at inference time. It is not the default fix for every weak response: prompt engineering is a quicker adjustment, while retrieval-augmented generation (RAG) is useful when answers need access to current or specific source material. section 8.0 section 5.4.3

Table 8.1 Fine-tuning techniques and how they are used in Alex’s app

Fine-tuning technique

What it does

Addressed pain point

Domain-specific fine-tuning

Trains the model to understand industry-specific terminology, tone, and knowledge

The AI lacks intrinsic understanding of Tom’s domain (e.g., enterprise resource planning [ERP] integrations) and brand voice, requiring constant rewrites.

Supervised fine-tuning

Optimizes the model for a specific task, such as classification, using labeled datasets

The app retrieves irrelevant sources because the AI can’t classify content according to Tom’s taxonomy.

Instruction fine-tuning

Teaches the model to follow iterative user instructions and refine outputs dynamically

Users like Tom can’t edit drafts directly in the app or give feedback to refine outputs, leading to a clunky workflow.

Compare the three fine-tuning objectives by the user problem each is meant to solve. section 8.2

Choose the training objective from the failure users actually experience:

  • Domain-specific fine-tuning targets terminology, knowledge, and tone. A B2B software team might use past content and style guidance to reduce generic drafts and repeated brand-voice rewrites. section 8.2 section 8.1.1
  • Supervised fine-tuning targets a defined task using labeled examples. For topic classification, document titles and excerpts can be paired with the client’s topic labels so a content tool can filter out irrelevant sources. section 8.2.2
  • Instruction fine-tuning targets reliable responses to editing requests. Pairs of an instruction, an original draft, and a desired revision can teach changes such as simplifying language or moving key points earlier. This supports an editing workflow; it does not mean every user edit instantly retrains the model. section 8.2.3 section 8.3

Treat adoption as a product and engineering decision, not just a training run:

  • Confirm the payoff. Look for persistent specialist errors, heavy user rewrites, inconsistent task performance, or an improvement that can benefit many customers. Compare the expected value with compute, infrastructure, and engineering effort. section 8.1.2 section 8.1
  • Test candidate base models for task relevance, quality, cost, and adaptability rather than committing immediately. Smaller models may suit narrow classification tasks; parameter-efficient fine-tuning (PEFT) can make later iterations less costly than changing every parameter. section 8.2.1 section 8.2.2
  • Start with a small, precise dataset reflecting real use, then add feedback and edge cases. Define evaluations for the intended outcome—such as domain expertise, classification accuracy, or instruction following—and validate performance in the application. section 8.3
  • Plan for ongoing correction. Monitor biased or inaccurate training data and harmful outputs; collect in-app feedback and use it to guide later data and model updates. section 5.5 section 8.3

When retrieval still leaves too much editing

In sustainability reporting, users still had to reshape outputs into the formal language of ESG reports after prompt engineering and RAG were introduced. The team chose to fine-tune Llama 3.2 on regulations, previous reports, and other ESG documents. The decision addressed a specific, costly editing problem rather than treating fine-tuning as an automatic upgrade. section 8.1.2

Product and engineering teams should agree on the user problem, the data that represents a good result, and how success will be judged before training. Fine-tuning can improve specialized output, but its value depends on whether the resulting workflow saves users effort and earns their trust. section 8.0 section 8.1.2

How The Art of AI Product Development covers it

How deep it goes
Works through objectives, model choice, data, and evaluation from a product perspective; leaves detailed training engineering to specialists.
Examples
Uses brand-voice rewrites, topic-label datasets, draft-revision pairs, and Llama 3.2 adapted for ESG reporting.
What it assumes
Assumes familiarity with prompt engineering and RAG; introduces fine-tuning objectives without requiring training-code or mathematical detail.
What you can do after
Practice/perform it by selecting a justified fine-tuning objective, planning representative data, and evaluating improvements against user needs.
How it connects
Connects fine-tuning to prompt engineering, retrieval-augmented generation, classification, model evaluation, and parameter-efficient fine-tuning.

Also explained in

Compare how 37 books explain fine-tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.