Session 6: Prompt Engineering — Talking to AI Like a Pro

The difference between a mediocre AI answer and a mind-blowing one is rarely the model — it's the prompt.

Reading time: ~10 min Prerequisites: Session 5 Keywords: prompt engineering, zero-shot, few-shot, chain-of-thought, role prompting

What Is Prompt Engineering?

Prompt engineering is the art and science of crafting instructions that get the best possible output from an AI model. It's less "engineering" and more "clear communication" — think of it like being a great manager who gives crystal-clear directions.

Why it matters: The same LLM given a vague prompt versus a well-crafted prompt will produce dramatically different results. The model hasn't changed — only your instructions did.

Analogy: Prompt engineering is like giving directions. "Go that way" will get someone lost. "Turn left on Oak Street, drive 3 blocks, turn right at the blue building" gets them exactly where they need to be.

The 5 Building Blocks of a Great Prompt

  1. Role — Tell AI who to be. ("You are an experienced copywriter specializing in SaaS landing pages...")
  2. Context — Provide the background information the AI needs to give a relevant answer.
  3. Task — State clearly and specifically what you want. The more precise, the better.
  4. Constraints — Set boundaries: length, format, tone, what to include or exclude.
  5. Examples — Show what good output looks like. Nothing communicates expectations like a concrete example.

Prompting Techniques

Zero-Shot Prompting

Just ask directly with no examples provided. Works well for simple, well-defined tasks where the AI already understands what you need.

Example: "Summarize this article in 3 bullet points."

Few-Shot Prompting

Provide 2–3 examples of the input-output pattern you want, then give the AI a new input to complete.

Example:

Chain-of-Thought Prompting

Ask the AI to think step by step before giving its final answer. This dramatically improves accuracy on reasoning tasks, math problems, and complex analysis.

Key phrase: "Think through this step by step before giving your final answer."

By forcing the model to show its work, you reduce errors and get more reliable outputs — especially for multi-step problems.

Role Prompting

Assign the AI a specific identity, profession, or perspective. This changes its tone, vocabulary, depth, and overall approach.

Example: "You are a senior data scientist explaining to a marketing team why the latest A/B test results are statistically significant."

Common Prompt Mistakes

Mistake Fix
Too vague: "Write something about dogs" Be specific: "Write a 200-word blog intro about the benefits of adopting senior dogs, warm conversational tone"
No format guidance Specify: "Use bullet points," "Format as a table," "Use H2 headings"
Information overload in a single prompt Break into steps: first outline, then draft, then refine
Accepting first output Iterate: "Make it shorter," "Add humor," "Focus more on cost savings"
Not providing context Include background: "The audience is tech-savvy professionals aged 25–35"

Advanced Tips

Real-Life Examples

🎯 Try It Yourself: Prompt Makeover Challenge

Take these weak prompts and rewrite them using the 5 building blocks. Then test both versions in ChatGPT or Claude to see the difference.

Weak Prompt 1: "Help me write a resume."

Improved: "You are an experienced career coach. I'm a project manager with 5 years of experience applying for a senior PM role at a tech startup. Write a professional summary (3–4 sentences) highlighting leadership skills, agile methodology experience, and measurable results."

Weak Prompt 2: "Explain blockchain."

Your turn: Add audience, format, and length constraints. Who is reading this? How long should it be? What format works best?

Weak Prompt 3: "Write a story."

Your turn: Add genre, length, tone, characters, and perspective. Give the AI enough to craft something specific and compelling.

Bonus: Take any prompt and add "Think step by step before giving your final answer" to see how chain-of-thought changes the quality and depth of the response.

💡 Why This Matters

📋 Quick Recap

🍽️ Fun Analogy

Prompting an AI is like ordering at a restaurant where the chef can make literally anything — but there's no menu. If you say "food please," you'll get... something. Probably edible. If you say "a medium-rare ribeye, grilled not pan-seared, with roasted garlic mashed potatoes, light on the salt, extra parsley, on a warm plate," you'll get exactly what you want. The AI can make the perfect dish — you just have to know how to order.