Prompt Lab
✍️ Prompt Engineering 6 min read

Prompt Engineering Basics

The essential principles behind writing prompts that get great AI responses — every time.

A prompt is the instruction you give an AI. Prompt engineering is the skill of making that instruction as clear and effective as possible.

The five elements of a strong prompt

🎭

Role

Tell the AI who to be. "Act as a biology tutor…" gives the response a consistent voice and expertise level.

🎯

Task

State exactly what you want done. "Explain… / Summarise… / List… / Compare…" — a clear verb is your best friend.

🖼️

Context

Provide relevant background. Who is the audience? What's the situation? The more the AI knows, the better it can help.

📐

Format

Specify how the answer should look. "…in 3 bullet points", "…as a table", "…in under 100 words".

🔒

Constraints

Add limits and guardrails. "…avoid technical jargon", "…for a 12-year-old", "…cite sources".

Before → After examples

❌ Weak

Tell me about climate change.

✅ Strong

Act as a science teacher. Explain the top 3 causes of climate change to a 14-year-old student in simple language, using one real-world example for each. Keep it under 200 words.

❌ Weak

Write an email.

✅ Strong

Write a professional but friendly email to a client explaining that their project will be delayed by 2 weeks due to supplier issues. Keep the tone apologetic, offer a revised timeline, and end with a next step. Max 150 words.

Common mistakes

  • Too vague — "Tell me about AI" gives the model no direction.
  • No audience — Without specifying who it's for, the level and tone will be unpredictable.
  • No format — "Explain it" could produce a paragraph, a list, or an essay.
  • Too long — Burying the key request in 10 sentences of context confuses the model.
  • Asking for everything at once — Break complex tasks into smaller prompts.
Was this article helpful?
📚 All articles Start learning →