Fine-tuning decision sequence
Prefer simpler approaches before fine-tuning.
Based on Andrew Ng's public content. Not affiliated with or endorsed by Andrew Ng.
Steps
- Try prompting and few-shot prompting
- Try agentic workflows
- Use RAG to add knowledge
- Fine-tune for style, the last few points of accuracy, or a cheaper smaller model
Covered in
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.
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.
Agentic AI (Full Course Recording)
Andrew Ng teaches how to build agentic AI workflows, where an LLM-based app executes multiple steps to complete a task, and argues that the key differentiator between effective and less effective builders is a disciplined process of evals and error analysis. He covers task decomposition, four design patterns (reflection, tool use, planning, multi-agent collaboration), how to build and iterate evals, how to use traces to find which component to improve, and how to optimize cost and latency later.