# Chapter 6 — Prompt Engineering

# ── TECHNIQUE 1: Role + Context + Task + Format ─────────────────
You are a senior data analyst at a B2B technology company.
Context: You are reviewing Q3 2024 sales data showing €455,000 in revenue
across 4 regions, with a 70% delivery rate and 5% cancellation rate.
Task: Write 3 actionable recommendations to improve the cancellation rate
to below 3% in Q4.
Format: Number each recommendation. Include: the action, the expected impact,
and one metric to track success.

# ── TECHNIQUE 2: Few-shot examples ─────────────────────────────
Classify each order as HIGH-PRIORITY, STANDARD, or FLAG based on these rules:
- HIGH-PRIORITY: Delivered AND total >= €2,000
- FLAG: Cancelled OR total < €0
- STANDARD: everything else

Examples:
Order: Delivered, €2,450 → HIGH-PRIORITY
Order: Cancelled, €890 → FLAG
Order: Shipped, €1,200 → STANDARD

Now classify these:
1. Delivered, €3,100
2. Pending, €750
3. Cancelled, €2,800
4. Delivered, €1,950

# ── TECHNIQUE 3: Chain of thought ───────────────────────────────
Think step by step.

I have 2,150 sales orders. 1,509 are Delivered, 323 are Shipped,
215 are Pending, and 103 are Cancelled. The total revenue for
Delivered orders is €892,450.

Question: If I could convert half of the Pending orders to Delivered,
and the average Pending order value is €1,240, what would the new
total Delivered revenue be? What percentage increase is that?

Show each calculation step before giving the final answer.

# ── TECHNIQUE 4: Constraint-setting ─────────────────────────────
Summarise this sales performance data in exactly 50 words.
No bullet points. No headings. One paragraph. Plain language only.
Do not start with "In" or "This". End with a forward-looking sentence.

Data: €892K revenue, 2,150 orders, North region leading at 25%,
ProDesk X1 top product, 70% delivery rate, Q4 target €300K.
