Fine-tuning.

The process of further training a pre-trained model on a smaller, task-specific dataset to specialize its behavior for a particular use case.

Fine-tuning starts with a foundation model that has already learned general language capabilities from massive pre-training. Additional training on a curated dataset nudges the model's weights to improve performance on a specific domain or task — without starting from scratch. This is orders of magnitude cheaper than pre-training.

Common fine-tuning approaches include full fine-tuning (updating all weights), LoRA (Low-Rank Adaptation, which trains small adapter matrices), and PEFT (Parameter-Efficient Fine-Tuning) methods. LoRA has become the dominant technique for open-weight models because it achieves strong results while being practical on consumer hardware.

When to fine-tune versus prompt engineer is a key decision for AI practitioners. Fine-tuning is typically justified when you need consistent style or format, when you have hundreds of examples of the desired behavior, or when you need to embed domain knowledge that the base model lacks. For most use cases, careful prompting with RAG is sufficient and significantly cheaper.