The Decision Framework: Journey for Choosing LLM Models

· Source: LLM on Medium · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Intermediate, quick

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

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

Topics

Best for: AI Engineer, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by LLM on Medium.