Language models & chatbots

Fine-tuning

Fine-tuning is taking an already-trained model and training it a bit more on a smaller, specific set of examples so it performs better at a particular job.

Training a large model from scratch costs millions. Fine-tuning skips that. You start from a model that already understands language in general, then show it a few hundred or thousand examples of exactly what you want: your company's writing style, a medical vocabulary, a strict output format. Its weights shift slightly to match.

Fine-tuning changes how a model behaves more than what it knows. It is excellent for tone, format, and specialized tasks. It is a poor way to teach fresh facts that change often, because you would have to fine-tune again each time. For up-to-date information, RAG is usually the better tool.

The chat assistants you use are themselves fine-tuned. A raw pretrained model just continues text; fine-tuning on conversations and human feedback is what turns it into a helpful assistant that answers questions and follows instructions.

Example

A hospital fine-tunes a general model on thousands of its own discharge summaries so the model writes new ones in exactly the required structure and tone.

Lesson: RAG vs fine-tuning →