Learn the core components of a good AI prompt. Understand the roles of instruction, context, input data, and output indicators in prompt engineering. Lecture 02
What Makes a Good Prompt?
In our last lecture, we learned that a prompt is an instruction for an AI. But great prompts aren’t just one sentence. They are often made of a few key ingredients that work together.
Today, we’ll break down a prompt into its most important parts. While not every prompt needs all these components, understanding them will help you write much better instructions.
The 4 Core Components
Think of a prompt as having up to four main parts:
- Instruction: The specific task you want the AI to perform.
- Context: Background information the AI needs to know.
- Input Data: The specific information you want the AI to work with.
- Output Indicator: How you want the AI to format its answer.
Example: Putting the Components Together
Let’s look at a prompt that uses all four components.
Prompt:
[Instruction] Summarize the following text into a single sentence.
[Context] The text is from a science report about the planet Mars.
[Input Data] “Mars is the fourth planet from the Sun and the second-smallest planet in the Solar System, being larger than only Mercury. In English, Mars carries the name of the Roman god of war and is often referred to as the ‘Red Planet’.”
[Output Indicator] The summary should be easy for a 10-year-old to understand.
Possible AI Response:
Often called the “Red Planet,” Mars is the fourth planet from the sun and is named after the Roman god of war.
Breaking It Down
1. The Instruction
This is the most important part! It’s a clear, direct command. It tells the AI what to do.
Examples: "Write"
, "Translate"
, "Summarize"
, "List"
, "Explain"
.
2. The Context
This gives the AI background information to help it understand the task better. It tells the AI what it needs to know before it starts.
Example: "You are a helpful assistant for a 5th-grade history class."
This context helps the AI adjust its tone and complexity.
3. The Input Data
This is the specific text, question, or information you want the AI to process. It’s the “what” of your prompt.
Example: The paragraph about Mars in our example above is the input data.
4. The Output Indicator
This tells the AI how to present the answer. Do you want a list? A paragraph? A table? A specific language?
Examples: "Provide the answer in a bulleted list."
, "Format the output as a JSON object."
, "Write in a friendly and encouraging tone."

Key Takeaways from Lecture 02
- A good prompt can have four parts: Instruction, Context, Input Data, and Output Indicator.
- You don’t always need all four, but using them can make your prompts much more powerful.
- The Instruction is the core action you want the AI to take.
- Always think: What does the AI need to know (Context)? What should it work with (Input Data)? How should it answer (Output Indicator)?
End of Lecture 02. In our next lecture, we will focus on the most important rule of prompting: being clear and specific.