🎯 Lecture Goal

Learn that great prompts aren't written in one shot, they are developed through an iterative process of trying, evaluating, and refining.


📝 Key Concepts

🔄 The Iterative Prompting Process

Just like training a ML model, prompt engineering follows a loop:

Idea → Write Prompt → Run & Get Result → Evaluate → Refine → Repeat

✅ The goal isn't to find a "perfect prompt" — it's to build a good process for improving prompts.


🪑 Example — Product Description from a Fact Sheet

Step 1 — First attempt (too long)

prompt = """
Your task is to help a marketing team create a description
for a retail website based on a technical fact sheet.

Write a product description based on the info below:
{fact_sheet}
"""

❌ Result was too long


Step 2 — Add length constraint

prompt = """...Write a product description based on the info below.
Use at most 50 words.
{fact_sheet}
"""

✅ Much better — concise and readable

💡 LLMs are okay (not perfect) at exact word/character counts. 50 words works better than 280 characters.


Step 3 — Change audience & focus