What is Prompt Engineering?
Defining the Discipline
Prompt engineering is the practice of designing, crafting, and optimizing inputs to AI language models to achieve desired outputs. It sits at the intersection of linguistics, psychology, and software engineering — requiring you to understand how models interpret language, what patterns they respond to, and how to communicate intent precisely.
As AI becomes ubiquitous, prompt engineering has emerged as one of the most valuable skills in tech — a "programming language" for language models.
Why It Matters
The same question asked differently can produce radically different results:
Weak prompt: "Tell me about climate change."
→ Produces a generic Wikipedia-style overview
Strong prompt: "Explain the three most economically significant impacts of climate change on coastal real estate markets over the next 20 years. Focus on quantitative projections where available. Assume your audience is a real estate investor with no climate science background."
→ Produces a focused, relevant, actionable analysis
The difference is prompt engineering.
The Prompt Engineering Mindset
Think of yourself as communicating with an extremely knowledgeable but literal entity that:
- Has no context about who you are or what you need
- Takes instructions at face value
- Will fill in gaps with its best guess (which may not match your intent)
- Can follow complex instructions if given clearly
Your job is to eliminate ambiguity and provide just enough context.
Core Components of a Prompt
Every effective prompt addresses some combination of:
- Role: Who is the AI in this context?
- Task: What specifically should it do?
- Context: What background information is relevant?
- Format: How should the output be structured?
- Constraints: What should it avoid?
- Examples: What does success look like?
The Iterative Process
Prompt engineering is iterative, not one-shot:
- Write an initial prompt
- Evaluate the output against your goal
- Identify what's missing or wrong
- Refine the prompt
- Repeat until quality is consistent
The best prompt engineers maintain a prompt library — a tested, versioned collection of prompts for common tasks.
Prompt Engineering vs Fine-Tuning
Prompt engineering works within the model's existing capabilities. Fine-tuning adjusts the model's weights for new behaviors. For most use cases, prompt engineering is faster, cheaper, and sufficient. Reserve fine-tuning for cases where prompting consistently fails.
This foundation underpins everything else you'll learn in this course.