Corporate AI training · Onsite & live online

Based in Bengaluru · delivering across India

AI foundations · The Technovids glossary

What is Fine-Tuning?

Fine-tuning is additional training that adapts a pretrained model using a selected dataset. It changes some or all trainable parameters to improve behaviour for a particular task or domain. For language models, examples may teach a consistent response format, classification style or task-specific behaviour.

See a practical example

Start here

Fine-Tuning in plain language

Suppose a support team repeatedly maps messages into a stable set of categories. Clear prompts and examples may be enough. If an evaluated baseline still misses the required behaviour, training on carefully labelled examples can be a candidate next step.

Fine-tuning needs a repeatable objective and data that represent future inputs. A model that performs well on its training examples may still fail on new cases. Keep evaluation examples separate and compare against the simpler baseline before treating training as an improvement.

How it works

  1. Define the task

    Specify the desired behaviour, quality criteria and current baseline. Identify which failures training is intended to address.

  2. Prepare and train

    Build consistent examples, inspect labels and use a supported training method. Keep sensitive information under appropriate controls.

  3. Evaluate and maintain

    Test unseen inputs, edge cases and regressions. Consider operating cost, deployment requirements and changes to the task.

Illustrative example · Fictional data

Classifying support requests

Input
Fictional categories: billing, technical support and account access. Example: “I paid twice for the same invoice.” Expected label: billing.
Process
Prepare varied labelled examples, including ambiguous messages. Reserve a separate test set and compare the trained model with a prompted baseline.
Expected output
The model should select billing for the duplicate-payment message and follow the agreed output format.
How to check it
Inspect per-category errors, ambiguous cases and unfamiliar phrasing. Better training-set accuracy alone is not evidence of improvement.

Where it helps

  • Consistent classification when a measured baseline needs improvement.
  • Task-specific output conventions across many recurring requests.
  • Adapting model behaviour to a domain with suitable training data.

Prompting, RAG and fine-tuning

Prompting
Changes instructions and supplied examples at use time. Start here for a quick behavioural baseline.
RAG
Supplies retrieved information at use time. Consider it when answers depend on maintained source material.
Fine-tuning
Changes trainable model parameters. Consider it when repeated task behaviour merits a training and evaluation cycle.

What changes during fine-tuning?

Training examples are tokenised and passed through the model. A loss measures the mismatch with the training objective; backpropagation produces gradients, and an optimiser updates trainable parameters. In supervised instruction tuning, examples commonly pair an instruction or conversation with a desired response.

Full fine-tuning updates the selected base-model weights. Parameter-efficient fine-tuning updates a smaller parameter set; LoRA represents weight adjustments through low-rank matrices while typically keeping the base weights frozen. This can reduce training memory and artefact size, but does not remove data, evaluation or serving requirements.

Fine-tuning within post-training

Post-training is a broader category of adaptation after initial pretraining. It can include supervised instruction tuning and preference-based optimisation. Different objectives change behaviour in different ways; teaching a response format is not the same as supplying a searchable, current knowledge base.

Keep validation examples separate, compare against the untuned baseline and test unrelated capabilities for regressions. Record the base version, dataset, adapter configuration and evaluation results. Access to weights, supported training methods and deployment permissions depend on the model licence and platform.

Related reading and learning pathways

Common pitfalls

  • Inconsistent labels can teach inconsistent behaviour.
  • Training on evaluation examples produces misleading results.
  • Fine-tuning does not guarantee factual correctness or automatically keep changing policies current.

Put the idea to work

Try it yourself

Write ten fictional support messages and label them. Ask another person to label the same messages without seeing your answers. Resolve disagreements before imagining a larger training dataset.

Common questions

Is fine-tuning the same as adding documents to a chatbot?

No. Many document-chat applications retrieve passages at query time. Fine-tuning is an additional training process that changes model parameters. Retrieval is usually cheaper and easier to update when documents change. Fine-tuning suits teaching a consistent format, tone or task behaviour rather than adding fresh knowledge.

Can fine-tuning and RAG be used together?

Yes. One can shape behaviour while the other supplies retrieved information. Evaluate whether both are needed for the task. For example, fine-tune a model to follow your reporting format and use RAG to supply the latest policy documents. Combining both adds cost and maintenance, so justify it with evaluation.

How many examples are required?

There is no universal number. It depends on the model, training method, task diversity and desired improvement. Follow provider requirements and evaluate data quality and coverage. Some teams see useful changes from a few hundred high-quality examples, while harder tasks need thousands. Start small, measure against a baseline and add data where errors cluster.

Your next step

Continue learning

Connected concepts

Browse the full AI & Cloud glossary →

Sources and further reading

Examples on this page are teaching exercises using fictional information. They are not client case studies or measured outcomes.