Source

When to Fine-Tune — and When Not To: Many teams that fine-tune their models would be better off prompting or using agentic workflows. Here's how to decide.

Open the source

Andrew Ng argues that most teams using fine-tuning could get good results with simpler approaches like prompting, few-shot prompting, or simple agentic workflows, because fine-tuning adds complexity in training and deployment. He identifies cases where fine-tuning is valuable: squeezing out the last bit of accuracy in critical applications, learning a hard-to-specify communication style, and reducing latency or cost by bringing a smaller model up to a larger one's performance. For adding new knowledge, he recommends RAG instead.

- He estimates that perhaps 75% of teams using fine-tuning could get good results with prompting or agentic workflows. - Fine-tuning adds complexity: collecting data, finding a provider, and deploying the tuned model. - LoRA and related methods make fine-tuning affordable for small models, and 100 or fewer examples can be enough to start. - Fine-tuning helps when a rule can't be stated unambiguously in language, so even humans need many examples to learn it. - To teach a model new knowledge outside its training data, he finds RAG much simpler than fine-tuning. - He prefers fine-tuning open-weights models whose weights can be downloaded, for portability and protection against deprecation.

Based on Andrew Ng's public content. Not affiliated with or endorsed by Andrew Ng.

Supports these rules

Quotes from this video

“usually I resort to this technique only after I find that prompting and simple agentic workflows are not up to a task.”

“before fine-tuning, consider if you should be trying just a bit harder with prompting or agentic workflows, which can lead to simpler solutions that are easier to maintain.”

“if it is hard to specify an unambiguous SOP, so even humans need to see numerous examples before they can learn what to do, fine-tuning can be a good approach.”

“if the goal is to get an LLM to better understand a body of knowledge that is not in its training data, I find that using RAG (retrieval augmented generation) is a much simpler approach,”

“fine-tuning it can help bring it up to the performance of the larger one for that narrow application.”

“the larger one for that narrow application. Further, the larger model (or perhaps an agentic workflow) can also be used to generate data to help with fine-tuning the small model for that task.”

“To get a system to communicate in a certain style, fine-tuning is often a superior solution to prompting alone.”

“the former has obvious advantages of portability and not having to worry that the provider will stop serving a particular model,”