{"head":{"title":"What Is Fine-Tuning an LLM? Definition | OceanLab","description":"Fine-tuning trains an existing model further on your own examples to change how it behaves. When it beats prompting or RAG, what it costs, and mistakes.","canonical":"https://oceanlab.in/glossary/fine-tuning"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"fine-tuning","path":"/glossary/fine-tuning"}],"slug":"fine-tuning","term":"Fine-tuning","aka":["model fine-tuning","supervised fine-tuning","SFT"],"category":"AI building blocks","short":"Training an existing model further on your own examples so it behaves the way you want, such as following a format, tone or task more reliably.","body":[["Fine-tuning starts from a trained model and continues training on a smaller set of examples, usually pairs of input and ideal output. The result is a new version of the model that has learned the pattern in those examples. Hosted APIs offer it for some models; open-weight models can be fine-tuned on your own hardware."],["It is good at changing behaviour: output format, style, classification labels, domain wording. It is a poor way to add facts that change, because updating them means training again. For that, ",{"href":"/glossary/rag","text":"RAG"}," is usually the better fit."]],"why":["A fine-tuned smaller model can sometimes match a larger model on one narrow task, which can lower ",{"href":"/glossary/inference","text":"inference"}," cost and latency. The cost is preparing good training data, running training, and owning a model version you must re-test and update."],"example":["A support team wants every ticket labelled with one of their own categories. Prompting a general model gets most labels right but drifts on edge cases. They fine-tune a small model on a few thousand past tickets labelled by their agents and check it against a held-out set before switching."],"inBuild":null,"mistakes":[["Fine-tuning to teach facts that change every week."],["Training on messy, inconsistent examples. The model learns the mess."],["No ",{"href":"/glossary/llm-evals","text":"evals"}," to compare the tuned model with the base model and a good prompt."]],"related":[{"href":"/glossary/rag","label":"RAG (retrieval-augmented generation)","detail":"A pattern that finds relevant passages from your own data and gives them to a language model along with the question, so it answers from your content."},{"href":"/glossary/llm-evals","label":"LLM evals (evaluations)","detail":"Repeatable tests that score how well a model, prompt or AI feature does a specific task."},{"href":"/glossary/llm","label":"LLM (large language model)","detail":"An AI model trained on very large amounts of text that predicts the next piece of text, which lets it read, write and reason in language."},{"href":"/glossary/temperature","label":"Temperature (LLM setting)","detail":"A setting that controls how random a language model's output is: lower is more predictable, higher is more varied."}],"tools":[{"href":"/tools/fine-tuning-vs-rag","label":"Fine tuning vs RAG","detail":"Free tool"},{"href":"/tools/llm-model-picker","label":"LLM model picker","detail":"Free tool"}],"links":[{"href":"/compare/rag-vs-fine-tuning","label":"RAG vs fine-tuning","detail":"Comparison"},{"href":"/ai-labs/human-feedback","label":"Human feedback","detail":"RLHF and SFT data from OceanLab Labs."},{"href":"/ai","label":"AI by industry","detail":"AI use cases, costs and risks per industry."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}