Lifestyle

Fine-tuning: Adapting an Existing Model to Your Task

Fine-tuning continues training an existing model to fit a task or domain. Using support email classification, this article covers data preparation, parameter updates, held-out test sets and version deployment; distinguishes full fine-tuning, LoRA, supervised fine-tuning and RAG; and explains why training gains can mask real-world decline. Learn to judge whether fine-tuning is worthwhile and check format consistency, unknown types, data leakage and loss of prior abilities.

About 7 min read

Share on LINE
An existing model network retains its blue structure with added orange adjustment nodes, while separate test documents check the updates.
Image: Mokaair (© Mokaair)
Contents
  1. 1. First, Clarify What You Want to Change
  2. 2. Training Objectives and Update Methods Are Separate Choices
  3. 3. Example: Evaluating Support Email Classification
  4. 4. Why Good Training Scores Can Still Lead to Failure
  5. 5. From Completed Training to a Usable Model

Fine-tuning starts with a trained model and continues training it on more focused data to better suit a particular task or domain. It builds on existing capabilities rather than starting over with random . For language models, fine-tuning may improve classification, produce consistent output formats, or support domain-specific document processing. What it can actually improve depends on the training objective and data; the label "custom model" alone does not establish those benefits.

Fine-tuning updates some trainable parameters in the model, unlike putting examples in a prompt. This article uses a fictional support email classification task to explain design and acceptance criteria, distinguishing fine-tuning methods, training objectives, and external retrieval. Hugging Face's implementation documentation and the original ULMFiT research provide the foundations for continuing to train an existing model. The discussion below does not claim that any particular configuration has been tested successfully, nor does it guarantee a universally sufficient number of training examples.

First, Clarify What You Want to Change

Suppose a support team needs to classify emails into account, payment, and other categories. A general-purpose model understands the gist but often produces a lengthy explanation or uses inconsistent category names. Fine-tuning could aim to make classification and the required output format consistent. If the issue is an order status just updated in a database, fine-tuning is not a suitable channel for real-time updates. Instead, query a system you are authorized to access, then have the model process the results.

Fine-tuning is not limited to imitating a tone of voice. It can adapt a model for tasks such as classification, sequence labeling, and generation, but each requires suitable data and evaluation. The closer training data is to actual use, the better you can assess whether the goal has been met. If you collect only polished, standardized demonstrations, the model may be unreliable with typos, mixed requests, and ambiguous emails. Define success and failure conditions first to determine whether training is worthwhile.

Training Objectives and Update Methods Are Separate Choices

Supervised fine-tuning learns from inputs and expected outputs, while preference optimization may use better and worse responses to the same question. This is a choice of training signal. Full fine-tuning updates most or all model parameters, while parameter-efficient methods such as LoRA update a smaller, added component. This is a choice of how to adjust the model. These two dimensions can be combined; SFT and LoRA should not be treated as mutually exclusive product options.

Training still requires handling data formats, tokenization, loss calculation, learning rates, and evaluation. Merely changing the model name or uploading data to an interface does not mean every step has been completed correctly. Data truncation may remove the expected answer, misaligned fields may teach the model the wrong objective, and duplicate content may overemphasize certain cases. Check these issues with a small sample before committing to a full, lengthy training run.

An existing model is fine-tuned on training examples. Separate held-out emails are used only for evaluation; a deployable version is created only after it passes.
Test data must not also become answers the model practices on. · Image: Mokaair (© Mokaair)
Read the full description

An existing model is fine-tuned on training examples. Separate held-out emails are used only for evaluation; a deployable version is created only after it passes.

Example: Evaluating Support Email Classification

For an input such as "I forgot my password, and the payment notification was sent to my old email address," you cannot arbitrarily assign a single category. First define the business rules: allow multiple categories, prioritize account issues, or route the email to a person. Then build demonstrations using consistent standards, holding out some emails from training for testing. Expected outputs should follow the rules and format, rather than merely making the model reproduce standard answers to training emails more closely.

As a baseline, first use the original model with clear prompts and a few examples, then compare it with the fine-tuned version on the same unseen emails. Record whether categories are correct, formats are valid, ambiguous cases remain assigned for human handling, and how errors are distributed across categories. If formatting improves but critical classifications get worse, an overall average alone cannot establish that fine-tuning succeeded. This is an evaluation design; the actual degree of improvement still requires testing.

Also retain out-of-scope emails, such as requests for real-time updates on personal orders. A classification model can route them to the appropriate channel, but it must not invent order statuses from training memory. If the model increasingly sounds like a support agent but starts fabricating outcomes, its output behavior has exceeded the task boundaries. Adjust the demonstrations and acceptance criteria instead of treating fluency as good performance.

Why Good Training Scores Can Still Lead to Failure

Overfitting occurs when a model fits the training data too closely but performs unreliably on new cases. Another problem is data leakage: different versions of the same email are split between training and testing, making scores look like evidence of generalization when they still largely reflect repeated practice. Split data by groups based on source, time, or the same underlying case, and check for near-duplicates. The split must reflect the new inputs the product will actually encounter.

Existing capabilities may also deteriorate after focused training. For example, the model may become limited to producing support categories and respond less naturally to questions it previously handled. Whether this is an acceptable trade-off depends on its deployment purpose; a dedicated classifier and a general-purpose assistant have different standards. Improvement on one set of tasks does not imply that every capability has improved. Keep tests for the capabilities that must be maintained, and record the differences before and after fine-tuning.

From Completed Training to a Usable Model

The training program finishing only means that a model state has been produced. You still need to verify loading, inference formats, latency, the deployment version, and rollback procedures. When using added parameters, ensure they are compatible with the specified base model. Prompts, the tokenizer, and the output parser can also affect results, so record the entire inference setup rather than saving only a weights filename.

Before starting, try improving prompts, providing clear examples, and fixing the data. If errors persist in stable behaviors the model can learn, then assess fine-tuning. For knowledge-based question answering where information changes frequently and sources are required, consider RAG first. The two can coexist: fine-tuning helps the model follow an answer format, while retrieval supplies current evidence. Base the choice on the cause of failure to avoid adding unnecessary maintenance merely for customization.

After deployment, spot-check new types of emails, especially when business rules change. If the old model continues using the old classifications, the issue may go beyond an unclear prompt: the training objective itself may be outdated. Preserve data and model versions, annotation rules, and evaluation results so you can determine whether to retrain, fix preprocessing, or simply update external workflows. Personal data in demonstrations should also be prepared according to the intended purpose, preventing unnecessary contact details from being learned as answer patterns. Whether data meets the conditions for training use is a separate question from whether it has appeared in a support system.

Concept comparison; sources checked: 2026/9.
MethodFocusConsiderations
Prompts and examplesChange the current inputUsually leave parameters unchanged
Fine-tuningContinue training toward an objectiveRequires data and version management
RAGProvide external evidenceKnowledge updates can be separate from the model

Low-Rank Adaptation (LoRA): How a Small Set of Trainable Parameters Adjusts a Model

AI Terminology Index: From Loop Engineering to Generative AI

Found this guide helpful? Share it with someone who needs it

Share on LINE
  • Lifestyle

    Agentic Retrieval-Augmented Generation (Agentic RAG): When to Search Again

    Agentic RAG lets models make retrieval decisions, choosing sources, rewriting queries or searching further based on the question and available evidence. Using a concrete LangGraph workflow and a comparison of venue-use conditions, this article contrasts it with fixed RAG and explains stopping criteria, permissions, query logs and cost control. Learn to judge whether a task needs dynamic exploration or a predictable fixed workflow is enough.

  • Lifestyle

    Graph Retrieval-Augmented Generation (GraphRAG): Understanding a Document Collection Through Relationships

    GraphRAG uses entities and relationships in retrieval to answer questions about cross-document connections and overall themes. Drawing on Microsoft's original paper and official docs, this article explains entity extraction, community summaries, and local and global search, using local event records to show why different questions need different paths. It also shows how missing links, mistaken name merges, and distorted summaries affect answers: a pretty graph is not verified fact.

  • Lifestyle

    Knowledge Graphs: Making Entities and Relationships Clear

    Knowledge graphs organize entities and relationships to trace who took part in what, where and when through links. Using community events, this article covers entity identity, relationship direction, sources and time; compares Resource Description Framework (RDF) and property graphs; and explains why graphs are not equivalent to visualizations or reliable facts. Learn when to build one and how it works with tables, vector search and graph retrieval-augmented generation (GraphRAG).

  • Lifestyle

    Hybrid Search: Balancing Exact Terms and Meaning

    Hybrid search merges full-text, vector and other retrieval results to cover exact codes and natural-language needs. An equipment-manual query explains candidate retrieval, deduplication, rank fusion and reranking, including how Reciprocal Rank Fusion (RRF) merges results by rank. Hybrid search is not always more accurate. Learn to test quality with code, paraphrase and no-answer queries and spot biases from permissions, filters and duplicate content.

Sources

Compiled from the references and verification dates listed above; fares, schedules, product features, and terms can change, so please confirm the latest details on the relevant official website before travelling, booking, or purchasing.

Lifestyle