Optimization is the iterative adjustment of a language-model setup until it meets acceptance criteria and continues delivering value as users, data, and expectations change. The sequence is flexible: a low-stakes consumer application may need fewer cycles than a medical application. section 5.4
A practical optimization loop combines:
- Detailed error analysis that identifies weaknesses and guides incremental improvements. section 5.4.5
- Representative, current custom data, including corrected examples from past failures, few-shot examples, retrieval databases, or fine-tuning data. section 5.4.5
- Selective advanced customization, such as refined prompting, improved retrieval search, or parameter-efficient fine-tuning, rather than adopting every fashionable technique. section 5.4.5
- Automated monitoring, error tracking, evaluation, and model updates through MLOps or LLMOps to shorten iteration cycles. section 5.4.5
Different stakes, different optimization depth
A consumer application might move toward production after an initial customization round, while an application for medical professionals may require repeated optimization cycles before reaching its performance and ethical standards. User feedback also refines data, experience, and system performance. section 5.4 section 12.3
Figure 5.12 The iterative process of developing with LMs
Use the lifecycle diagram to trace model selection, customization, and continuing optimization as an iterative process. section 5.4





























