What is prompt engineering?
Prompt engineering is the art of communicating effectively with AI. How you ask a question determines the quality of the answer. In this article you learn the principles and techniques.
What is a prompt?
A prompt is the instruction or question you give to an AI model. Prompt engineering is the field that deals with systematically designing those instructions.
Why does the wording matter?
Large language models generate text based on probability calculations. A vague question leads to a vague answer. A specific, structured prompt produces a specific, structured answer.
Important techniques
- Assigning a role — "You are an experienced marketer"
- Giving context
- Providing examples (few-shot)
- Step-by-step thinking (chain of thought) — "Think step by step"
- Specifying output format
Zero-shot, one-shot, and few-shot
- Zero-shot: no example, only the instruction
- One-shot: one example for illustration
- Few-shot: two or more examples
Prompt engineering as a skill
Prompt engineering is becoming a basic skill — comparable to knowing how to search on Google.
Author: Claude claude-sonnet-4-6