Skip to main content
In this lesson, we’ll define fine-tuning and compare it with dynamic context injection. Pre-trained large language models (LLMs) are trained on massive, but sometimes outdated, datasets—GPT-3.5, for example, has a knowledge cutoff of September 2021. You can append fresh data to a prompt, but you’ll quickly hit the context window limit. GPT-3.5 Turbo only supports about 4 k tokens, and even 16 k-token windows can force you to chunk inputs, manage state, and suffer extra latency.

Why Fine-Tuning?

Rather than repeatedly attaching external context to every API call, fine-tuning lets you retrain an existing model on your own up-to-date, domain-specific data—PDFs, web pages, CSVs, or any other format. The model’s parameters internalize your private information, eliminating token-window headaches and simplifying your application logic.
The image explains fine-tuning, showing a person with icons for LLMs and datasets, and describes it as an alternative to using dynamic context with prompts. It suggests considering fine-tuning when frequently adding external data to prompts.
If you’re attaching external data to nearly every prompt, fine-tuning is probably the better path.
The image lists key reasons to fine-tune models, including retraining with refreshed data, overcoming context length limitations, avoiding dynamic context overhead, increasing response speed, and achieving higher quality responses.
Fine-tuning can dramatically cut latency and reduce prompt-management complexity when your application relies on frequent data updates.

Key Advantages of Fine-Tuning

This walkthrough will cover the end-to-end process of fine-tuning an OpenAI model, from data preparation to deployment.

Watch Video