LLMOpsThe LLMOps lifecycle · MLflow 3 · FastAPI · Docker · AWS/Azure
Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
41 small wins to finish your pathNext lesson →

Data for fine-tuning

Fine-tuning data is a set of example inputs paired with the outputs you want, used to retrain or adapt the model itself so the behaviour is baked into the weights rather than supplied at request time.

Last updated: 15 Oct, 2026 · LLMOps

The The RAG data pipeline gave the model knowledge to look up. Fine-tuning takes the other road from the lifecycle's build stage: instead of retrieving facts, you change the model's weights so the pattern you want is part of the model. The Detailed LLMOps Project Lifecycle video describes this as retraining or adapting the LLM, run as a training pipeline with hyperparameter tuning and experiment tracking.

When fine-tuning is worth it

In the lifecycle the video puts fine-tuning next to RAG as a way to make a chatbot work the way a company wants. The operational read is that fine-tuning earns its cost only when retrieval cannot do the job.

  • A fixed style or format the model must follow every time, such as a house tone or a strict output schema, which is a behaviour rather than a fact to look up.
  • A narrow task repeated at scale, where a smaller fine-tuned model can be enough, which lowers the per-call cost once it is running.
  • Knowledge that rarely changes, since anything that changes often is cheaper to keep in a RAG index you can re-run than in weights you must retrain.

What the data has to look like

Fine-tuning data is paired: each row is an input and the target output, in the format the base model expects. The quality bar is high, because the model copies the patterns in the examples, including their mistakes.

  • Examples, not documents. Where RAG stores passages to retrieve, fine-tuning needs input-output pairs that show the model what to do.
  • Clean and consistent. Contradictory or sloppy examples teach contradictory or sloppy behaviour.
  • Representative. The examples have to cover the range of inputs the deployed model will see.
Two panels. The fine-tuning panel runs down from input-output example pairs, through a training run on a GPU, to your model with its weights changed; it changes the model's weights, and updating it means collecting more pairs and retraining. The RAG panel runs down from documents, through the data pipeline and the index, to chunks retrieved at query time; it changes what the model can retrieve, and updating it means adding a document and re-running the pipeline.

How much, and what it runs on

Fine-tuning runs as a training pipeline: you set hyperparameters, run the training, and track each run so you can compare them, the same experiment-tracking discipline the lifecycle names. How much data you need depends on the method and the base model, but the operational constant is the hardware it demands.

Fine-tuningRAG
What you collectInput-output example pairsDocuments to index
What it changesThe model's weightsWhat the model can retrieve
Cost to updateRetrain on a GPURe-run the data pipeline
Best forFixed behaviour and styleFacts that change

Where fine-tuning data pays off

  • A support bot with a strict house voice, where every reply must sound and format the same way.
  • A classifier or extractor doing one narrow job over a large volume of calls.
  • An on-premise deployment where a smaller fine-tuned open model is run in the company's own cloud for privacy.
Watch out. Fine-tuning retrains the model, so it needs a GPU and a training run, and it is named here rather than run: this course keeps to work you can follow with no GPU and no key. The lifecycle video lists GPU clusters among the compute resources a fine-tuning project draws on. When you do fine-tune, version the training data and every hyperparameter alongside the resulting model, because a fine-tuned model is reproducible only if its data and settings are.
Try it yourself
  • For your use case, list three behaviours you would fine-tune in and three facts you would keep in a RAG index, and defend each placement.
  • Sketch ten input-output example rows for a fine-tuning set and check that they agree with each other.
  • Read the fine-tuning guide of one provider and note the minimum example count and the data format it asks for.

Every expert started right here.