The optimization loop
Optimizing is a repeatable cycle:
Write -> test on cases -> score -> edit -> repeat
Track each version's score so you can see progress. Over time you learn which phrasings actually move the needle.
Balancing cost and quality
Bigger models cost more. A well-tuned prompt on a small model often beats a vague one on a big model.
Cost = tokens x model size
Quality = prompt quality x model size
Aim for the cheapest model that still hits your quality bar. That is the sweet spot of prompt engineering.