{"course":{"slug":"fine-tuning","title":"Fine-Tuning, and When Not To","url":"https://addaly.com/learn/fine-tuning","level":"advanced","track":"deep"},"lesson":{"slug":"diagnosing-the-failure","title":"Diagnosing the failure before choosing the fix","url":"https://addaly.com/learn/fine-tuning/diagnosing-the-failure","position":3,"of":84,"minutes":10,"answer":"Sort thirty real failures into format, knowledge, style, capability, adherence and cost before choosing a fix; only adherence, style and cost have fine-tuning as their cheapest answer.","keyIdea":"Sort thirty real failures into format, knowledge, style, capability, adherence and cost before choosing a fix; only adherence, style and cost have fine-tuning as their cheapest answer."},"body":{"format":"markdown","text":"## Thirty failures, sorted by cause\n\nNobody fine-tunes because of a hypothesis. They fine-tune because something is wrong and fine-tuning is the most impressive-sounding thing to do about it. The cure is dull: collect thirty real failures, sort them by cause, and count.\n\nThirty is enough because you are not measuring a rate, you are finding out which *kind* of problem you have. If twenty-two of thirty land in one bucket, the decision is made. If they scatter evenly across six buckets, you do not have a model problem, you have a product that has not been specified.\n\n## The six causes, and the test for each\n\n**Format.** The content is right and the shape is wrong: prose where you wanted JSON, three bullet points where you wanted five, a stray preamble before the answer. *Test:* run a schema validator over the output and separately ask a person whether the content is correct. If the validator fails and the person says the content is fine, it is a format failure.\n\n**Knowledge.** The model does not know a fact about your world. *Test: the paste test:* put the missing document into the prompt and ask again. If it now answers correctly, the model was never short of ability, only of information.\n\n**Style and register.** Correct content in the wrong voice: too chatty, too hedged, American spelling in a British document, an apology on the front of every reply. *Test:* rewrite one output by hand. If your rewrite changes no facts, it is style.\n\n**Capability.** Multi-step arithmetic, long-horizon planning, a hard inference. *Test:* give the identical prompt to the largest model you can reach. If the frontier model also fails, you are not going to add the capability with two thousand examples and a rank-16 adapter. Training teaches a model to produce answers of a shape it can already produce.\n\n**Instruction adherence.** The model satisfies four of your seven constraints and drops the rest, usually the ones stated earliest. *Test:* count satisfied constraints per output and plot against the number of constraints in the prompt. If the satisfaction rate falls as constraints rise, it is adherence, and this is one of the places fine-tuning shines.\n\n**Cost or latency.** The outputs are fine. The bill is not, or the p95 is 4.2 seconds and your product needs 800 milliseconds. Nothing about quality is broken.\n\n## The labelling loop\n\n```python\nCAUSES = [\"format\", \"knowledge\", \"style\", \"capability\", \"adherence\", \"cost\"]\n\nfor row in failures:            # 30 rows, read in a text editor is fine\n    print(row[\"prompt\"][:400])\n    print(\"---\")\n    print(row[\"output\"][:400])\n    row[\"cause\"] = input(\"cause? \")   # one label, the thing you'd fix FIRST\n```\n\nOne label per item. Failures overlap (a badly formatted answer to a question the model could not have known is both) so the rule is: label it by what you would have to change first. If you fixed the knowledge and the format problem would still be there, label it knowledge.\n\n> Figure: Thirty real failures, sorted by cause. Bars (failures, out of thirty): Instruction adherence 19; Format 6; Knowledge 3; Capability 2. Style and cost were empty in this sample, so the thirty landed in four of the six buckets. Adherence is one of the few causes whose cheapest answer is fine-tuning; the three knowledge cases went to retrieval.\n\n## What each cause actually wants\n\n- **Format** → constrained decoding first. A grammar or a JSON schema at sampling time makes invalid output *impossible* rather than unlikely, and it costs nothing to try. Fine-tuning for format works, but it only makes the bad output rarer.\n- **Knowledge** → retrieval. Weights are a poor filing cabinet; the next lesson in this module is entirely about this.\n- **Style** → five examples in the prompt, then, if the style is long or subtle enough that the examples eat your context budget, fine-tuning. Style is the cause fine-tuning fixes most reliably.\n- **Capability** → a bigger model, or decomposition into steps each of which the small model can do.\n- **Adherence** → fine-tuning. A model trained on a thousand examples that all respect your seven constraints learns the constraints as a habit rather than as instructions competing for attention.\n- **Cost** → distillation. Not a quality problem at all, and the one place where fine-tuning is unambiguously the right tool.\n\n## Where people get stuck\n\nThe commonest mislabel is knowledge as capability. A model that confidently invents your refund window looks stupid, and stupidity feels like a capability problem. Run the paste test before you believe that. The second commonest is style as adherence: \"it ignores my instruction to be concise\" is usually a style failure, because the model has a strong prior about how long an answer should be and your one word is arguing with millions of training examples.\n\nThe limitation of this whole exercise is that thirty failures are the failures *you noticed*. Silent failures (plausible, wrong, unreported) are invisible to it, and they are usually knowledge failures. So treat the sorted counts as a map of your complaints, not of your quality."},"check":{"question":"A support assistant keeps stating the wrong refund window. Someone pastes the refund policy document into the prompt and the model answers correctly every time. What has the paste test established?","options":[{"text":"A knowledge failure: the fix is getting the document into the context, not changing the weights.","correct":true},{"text":"That the base model is too small, and a larger one would know the refund window without being told.","correct":false,"tempting":"Treats private company policy as general knowledge; no model of any size was pretrained on your internal document."},{"text":"That the model can learn the policy from training, since it clearly understood the document when shown it.","correct":false,"tempting":"Confuses reading a fact in context with storing it in weights; the paste test shows the model can use the fact, not that gradient updates will reliably install it."},{"text":"That the prompt is too short, and lengthening it with more instructions about refunds will resolve the errors.","correct":false,"tempting":"Mistakes the mechanism: what helped was the specific fact being present, not the prompt being longer or more emphatic."}]},"prev":{"slug":"what-it-changes","title":"What Fine-Tuning Changes, and What It Cannot Add","url":"https://addaly.com/learn/fine-tuning/what-it-changes"},"next":{"slug":"try-the-retriever-first","title":"Try the retriever first","url":"https://addaly.com/learn/fine-tuning/try-the-retriever-first"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Diagnosing the failure before choosing the fix', in Fine-Tuning, and When Not To. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/fine-tuning/diagnosing-the-failure (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Diagnosing the failure before choosing the fix","courseTitle":"Fine-Tuning, and When Not To","module":{"index":1,"slug":"deciding-whether-to-fine-tune","title":"Deciding whether to fine-tune at all"},"answer":null,"keyIdea":"Sort thirty real failures into format, knowledge, style, capability, adherence and cost before choosing a fix; only adherence, style and cost have fine-tuning as their cheapest answer.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"bars","unit":"failures, out of thirty","title":"Thirty real failures, sorted by cause","series":[{"label":"Instruction adherence","value":19,"highlight":true},{"label":"Format","value":6},{"label":"Knowledge","value":3},{"label":"Capability","value":2}],"caption":"Style and cost were empty in this sample, so the thirty landed in four of the six buckets. Adherence is one of the few causes whose cheapest answer is fine-tuning; the three knowledge cases went to retrieval."},"alt":"Figure: Thirty real failures, sorted by cause. Bars (failures, out of thirty): Instruction adherence 19; Format 6; Knowledge 3; Capability 2. Style and cost were empty in this sample, so the thirty landed in four of the six buckets. Adherence is one of the few causes whose cheapest answer is fine-tuning; the three knowledge cases went to retrieval."}},"blocks":[{"t":"h2","id":"thirty-failures-sorted-by-cause","runs":[{"text":"Thirty failures, sorted by cause"}]},{"t":"p","runs":[{"text":"Nobody fine-tunes because of a hypothesis. They fine-tune because something is wrong and fine-tuning is the most impressive-sounding thing to do about it. The cure is dull: collect thirty real failures, sort them by cause, and count."}]},{"t":"p","runs":[{"text":"Thirty is enough because you are not measuring a rate, you are finding out which "},{"text":"kind","i":true},{"text":" of problem you have. If twenty-two of thirty land in one bucket, the decision is made. If they scatter evenly across six buckets, you do not have a model problem, you have a product that has not been specified."}]},{"t":"h2","id":"the-six-causes-and-the-test-for-each","runs":[{"text":"The six causes, and the test for each"}]},{"t":"p","runs":[{"text":"Format.","b":true},{"text":" The content is right and the shape is wrong: prose where you wanted JSON, three bullet points where you wanted five, a stray preamble before the answer. "},{"text":"Test:","i":true},{"text":" run a schema validator over the output and separately ask a person whether the content is correct. If the validator fails and the person says the content is fine, it is a format failure."}]},{"t":"p","runs":[{"text":"Knowledge.","b":true},{"text":" The model does not know a fact about your world. "},{"text":"Test: the paste test:","i":true},{"text":" put the missing document into the prompt and ask again. If it now answers correctly, the model was never short of ability, only of information."}]},{"t":"p","runs":[{"text":"Style and register.","b":true},{"text":" Correct content in the wrong voice: too chatty, too hedged, American spelling in a British document, an apology on the front of every reply. "},{"text":"Test:","i":true},{"text":" rewrite one output by hand. If your rewrite changes no facts, it is style."}]},{"t":"p","runs":[{"text":"Capability.","b":true},{"text":" Multi-step arithmetic, long-horizon planning, a hard inference. "},{"text":"Test:","i":true},{"text":" give the identical prompt to the largest model you can reach. If the frontier model also fails, you are not going to add the capability with two thousand examples and a rank-16 adapter. Training teaches a model to produce answers of a shape it can already produce."}]},{"t":"p","runs":[{"text":"Instruction adherence.","b":true},{"text":" The model satisfies four of your seven constraints and drops the rest, usually the ones stated earliest. "},{"text":"Test:","i":true},{"text":" count satisfied constraints per output and plot against the number of constraints in the prompt. If the satisfaction rate falls as constraints rise, it is adherence, and this is one of the places fine-tuning shines."}]},{"t":"p","runs":[{"text":"Cost or latency.","b":true},{"text":" The outputs are fine. The bill is not, or the p95 is 4.2 seconds and your product needs 800 milliseconds. Nothing about quality is broken."}]},{"t":"h2","id":"the-labelling-loop","runs":[{"text":"The labelling loop"}]},{"t":"code","lang":"python","label":"Python","text":"CAUSES = [\"format\", \"knowledge\", \"style\", \"capability\", \"adherence\", \"cost\"]\n\nfor row in failures:            # 30 rows, read in a text editor is fine\n    print(row[\"prompt\"][:400])\n    print(\"---\")\n    print(row[\"output\"][:400])\n    row[\"cause\"] = input(\"cause? \")   # one label, the thing you'd fix FIRST"},{"t":"p","runs":[{"text":"One label per item. Failures overlap (a badly formatted answer to a question the model could not have known is both) so the rule is: label it by what you would have to change first. If you fixed the knowledge and the format problem would still be there, label it knowledge."}]},{"t":"h2","id":"what-each-cause-actually-wants","runs":[{"text":"What each cause actually wants"}]},{"t":"ul","items":[[{"text":"Format","b":true},{"text":" → constrained decoding first. A grammar or a JSON schema at sampling time makes invalid output "},{"text":"impossible","i":true},{"text":" rather than unlikely, and it costs nothing to try. Fine-tuning for format works, but it only makes the bad output rarer."}],[{"text":"Knowledge","b":true},{"text":" → retrieval. Weights are a poor filing cabinet; the next lesson in this module is entirely about this."}],[{"text":"Style","b":true},{"text":" → five examples in the prompt, then, if the style is long or subtle enough that the examples eat your context budget, fine-tuning. Style is the cause fine-tuning fixes most reliably."}],[{"text":"Capability","b":true},{"text":" → a bigger model, or decomposition into steps each of which the small model can do."}],[{"text":"Adherence","b":true},{"text":" → fine-tuning. A model trained on a thousand examples that all respect your seven constraints learns the constraints as a habit rather than as instructions competing for attention."}],[{"text":"Cost","b":true},{"text":" → distillation. Not a quality problem at all, and the one place where fine-tuning is unambiguously the right tool."}]]},{"t":"h2","id":"where-people-get-stuck","runs":[{"text":"Where people get stuck"}]},{"t":"p","runs":[{"text":"The commonest mislabel is knowledge as capability. A model that confidently invents your refund window looks stupid, and stupidity feels like a capability problem. Run the paste test before you believe that. The second commonest is style as adherence: “it ignores my instruction to be concise” is usually a style failure, because the model has a strong prior about how long an answer should be and your one word is arguing with millions of training examples."}]},{"t":"p","runs":[{"text":"The limitation of this whole exercise is that thirty failures are the failures "},{"text":"you noticed","i":true},{"text":". Silent failures (plausible, wrong, unreported) are invisible to it, and they are usually knowledge failures. So treat the sorted counts as a map of your complaints, not of your quality."}]}],"check":{"question":[{"text":"A support assistant keeps stating the wrong refund window. Someone pastes the refund policy document into the prompt and the model answers correctly every time. What has the paste test established?"}],"options":[{"text":[{"text":"A knowledge failure: the fix is getting the document into the context, not changing the weights."}],"correct":true,"tempting":null},{"text":[{"text":"That the base model is too small, and a larger one would know the refund window without being told."}],"correct":false,"tempting":[{"text":"Treats private company policy as general knowledge; no model of any size was pretrained on your internal document."}]},{"text":[{"text":"That the model can learn the policy from training, since it clearly understood the document when shown it."}],"correct":false,"tempting":[{"text":"Confuses reading a fact in context with storing it in weights; the paste test shows the model can use the fact, not that gradient updates will reliably install it."}]},{"text":[{"text":"That the prompt is too short, and lengthening it with more instructions about refunds will resolve the errors."}],"correct":false,"tempting":[{"text":"Mistakes the mechanism: what helped was the specific fact being present, not the prompt being longer or more emphatic."}]}],"order":[2,1,0,3],"why":null},"prev":{"slug":"what-it-changes","title":"What Fine-Tuning Changes, and What It Cannot Add","minutes":8},"next":{"slug":"try-the-retriever-first","title":"Try the retriever first","minutes":9}}}