Fine-tuning
Fine-tuning continues training a model on a curated dataset so its weights change and its behavior shifts on every call.
Category
Industry concept
See all terms
What is fine-tuning?
Fine-tuning takes a model that already finished its main training run and trains it further on a smaller, task-specific dataset. The extra training updates the model's weights, so the model comes out of the process changed: it now follows a format, a tone, or a narrow skill by default, without anyone adding instructions to the prompt.
This solves a behavior problem, not a knowledge problem. A base model can know a fact and still answer inconsistently, in the wrong format, the wrong tone, or the wrong level of detail for a recurring task. Fine-tuning corrects that by training the behavior in directly, so every future call inherits the fix instead of depending on a well-written prompt to compensate for it each time.
How does fine-tuning differ from RAG?
Fine-tuning changes the model itself, while RAG leaves the model untouched and hands it new text to read at query time. A fine-tuned model carries its training everywhere it's deployed, while a RAG system can swap in different documents for different queries without retraining.
That difference decides which one fits a given problem. New information doesn't belong in fine-tuning: the model would need retraining every time the underlying facts change, which is slow and expensive. Fine-tuning fits the opposite case, a behavior that stays constant across every use, like a consistent output format or a specialized task the model should perform the same way regardless of which document is on screen.
How does fine-tuning work?
Fine-tuning starts from a pretrained model's existing weights and runs additional training steps on a smaller, labeled dataset built for the target behavior, adjusting those weights through the same gradient-based process used in pretraining, just on less data and for less time. The output is a distinct version of the model, saved and deployed on its own, that produces the trained behavior by default.
That also means a fine-tuned model has no way to reflect a document that didn't exist at training time, and no permission model for who can see what. Qontext doesn't fine-tune models to inject company knowledge. It keeps that knowledge current and access-controlled in the context repository, and lets any agent retrieve it at query time.