The Decision Framework: Journey for Choosing LLM Models
Summary
A decision framework outlines a five-step journey for selecting and implementing Large Language Models (LLMs) in AI applications, prioritizing non-training solutions before considering fine-tuning. The process begins by utilizing a base model such as GPT-4, Claude, Gemini, or an open-source alternative without immediate customization. Subsequently, prompt and context engineering are introduced to refine system prompts and structure inputs effectively. For scenarios requiring fresh or proprietary knowledge, Retrieval Augmented Generation (RAG) is recommended to inject relevant data at query time. If procedural know-how is lacking, agent skills are developed to guide the model through specific workflows or tool usage. Fine-tuning, potentially with LoRA, is reserved as a final consideration, only when specific bottlenecks like latency, consistency, or task failure persist. This framework advocates exhausting all no-training options before engaging in fine-tuning.
Key takeaway
For AI Engineers or ML Architects designing LLM-powered applications, you should systematically explore non-training optimization techniques before committing to fine-tuning. Start with robust base models and refine performance through prompt engineering, RAG for dynamic data, and agent skills for complex workflows. This approach minimizes development overhead and resource expenditure, reserving fine-tuning (like LoRA) only for critical bottlenecks such as latency or consistency that cannot be resolved otherwise.
Key insights
Exhaust non-training LLM optimization methods like RAG and prompt engineering before considering fine-tuning.
Principles
- Prioritize base models and prompt engineering.
- Defer fine-tuning until other options fail.
- Address knowledge gaps with RAG or agents.
Method
The framework proposes a sequential approach: start with a base LLM, then add prompt engineering, RAG, agent skills, and finally consider fine-tuning (e.g., LoRA) for specific bottlenecks.
In practice
- Use GPT-4, Claude, or Gemini first.
- Implement RAG for internal documents.
- Apply LoRA for latency issues.
Topics
- LLM Models
- Decision Framework
- Prompt Engineering
- Retrieval-Augmented Generation
- Agent Skills
- Fine-tuning
- LoRA
Best for: AI Engineer, Machine Learning Engineer, AI Architect
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by LLM on Medium.