# What is fine-tuning an LLM?

> Fine-tuning trains an existing model further on a smaller dataset. In a 2023 study, retrieval beat unsupervised fine-tuning for adding facts to a model.

Canonical: https://promptlyfound.com/glossary/fine-tuning
Updated: 2026-11-20

## Short answer

Fine-tuning is **further training of a trained model on a smaller set of data, to adapt it to a task or a style**. OpenAI describes it as giving a base model examples of the inputs and outputs an application expects. It changes how a model responds. For adding facts, a 2023 study found that retrieval-augmented generation worked better than unsupervised fine-tuning.

## Key findings

- OpenAI's supervised fine-tuning needs at least 10 examples. OpenAI says it sees improvements from 50 to 100 examples and recommends starting with 50. [1]
- The InstructGPT paper fine-tuned GPT-3 on labeler demonstrations and then with human feedback. Raters preferred outputs from the 1.3 billion parameter result, InstructGPT, to those of the 175 billion parameter GPT-3. [3]
- Across knowledge-intensive tasks, retrieval-augmented generation consistently outperformed unsupervised fine-tuning, for both facts seen in training and new facts. [4]
- OpenAI says it is winding down its fine-tuning platform, which is no longer open to new users. Existing fine-tuned models stay available until their base models are deprecated. [1]

Fine-tuning changes how a model responds, but a 2023 study found retrieval, the method AI search uses for current facts, consistently better than unsupervised fine-tuning for adding facts. OpenAI is also winding down its own fine-tuning platform.

Fine-tuning is further training of a model that has already been trained. A large language model first learns from a large body of text. Fine-tuning then trains it on a much smaller set of examples, so that it performs a specific task or writes in a specific style.

## How fine-tuning works

[OpenAI's model optimization guide](https://developers.openai.com/api/docs/guides/model-optimization) describes the process: collect a dataset of example inputs and outputs, upload it, create a fine-tuning job, and evaluate the result. OpenAI lists several methods. Supervised fine-tuning trains on examples of correct responses. Direct preference optimization trains on pairs of a better and a worse response. OpenAI says fine-tuning lets a model learn from more examples than fit in one prompt, work with shorter prompts, and use a smaller, cheaper model for a narrow task.[2]

[OpenAI's supervised fine-tuning guide](https://developers.openai.com/api/docs/guides/supervised-fine-tuning) sets a minimum of 10 examples and recommends starting with 50. It also says to set up evaluations first, so there is a way to tell whether the fine-tuned model performs better than the base model.[1] The same guide says OpenAI is winding down its fine-tuning platform: it is no longer open to new users, and existing fine-tuned models remain available until their base models are deprecated.[1]

## Fine-tuning for instruction following

Instruction-following models are built with fine-tuning. [Training language models to follow instructions with human feedback](https://arxiv.org/abs/2203.02155), published in March 2022, fine-tuned GPT-3 in two stages: first on demonstrations written by labelers, then with reinforcement learning from human feedback. In human evaluations, raters preferred outputs from the 1.3 billion parameter result, InstructGPT, to outputs from the 175 billion parameter GPT-3.[3] [How do RLHF and Constitutional AI differ?](https://promptlyfound.com/llms/rlhf-vs-constitutional-ai) covers the feedback methods.

## Fine-tuning and retrieval

What a model learns from fine-tuning is fixed when training ends. Retrieval adds documents to the prompt each time the model answers. [Fine-tuning or retrieval? Comparing knowledge injection in LLMs](https://arxiv.org/abs/2312.05934), published in December 2023, compared the two on knowledge-intensive tasks. Retrieval-augmented generation consistently outperformed unsupervised fine-tuning, both for facts the model had seen in training and for new facts. The authors found that models struggle to learn new facts through unsupervised fine-tuning.[4]

## What it means for AI search

AI search products answer questions about current facts by retrieving pages, as [What is retrieval-augmented generation (RAG)?](https://promptlyfound.com/ai-search/rag) explains. A page's content can reach an answer in two ways: through the training data collected before a model's cutoff, or through retrieval when the question is asked. [When does AI answer from training data, and when does it search?](https://promptlyfound.com/ai-search/training-data-vs-live-retrieval) covers the difference, and [What is training data?](https://promptlyfound.com/llms/training-data) covers what models learn from.

## Sources

1. Supervised fine-tuning. OpenAI API documentation. https://developers.openai.com/api/docs/guides/supervised-fine-tuning
2. Model optimization. OpenAI API documentation. https://developers.openai.com/api/docs/guides/model-optimization
3. Training language models to follow instructions with human feedback. arXiv, 2022-03-04. https://arxiv.org/abs/2203.02155
4. Fine-tuning or retrieval? Comparing knowledge injection in LLMs. arXiv, 2023-12-10. https://arxiv.org/abs/2312.05934

---

This is a plain-text copy of https://promptlyfound.com/glossary/fine-tuning from Promptly Found. The web page is the canonical version and includes the charts.
