← Back
to Lessons
Basics of Prompting
What is a Prompt?
A prompt is a set of instructions or a query given to an AI model to elicit a specific response. It's how you communicate with the AI to get the desired output.
Elements of a Good Prompt
- Clarity: Be clear and specific about what you want.
- Context: Provide enough context for the AI to understand the task.
- Constraints: Specify any constraints or rules the AI should follow.
- Examples: Include examples to guide the AI's response.
Examples of Prompts
Here are a few examples of prompts for different tasks:
# Example 1: Summarizing a text
Summarize the following article in three bullet points:
[Article text here]
# Example 2: Writing a poem
Write a short poem about the rain in the style of haiku.
# Example 3: Generating code
Write a Python function that takes a list of numbers and returns the sum of all even numbers in the list.
Hands-on Exercise
Click the link below to try a prompt in the app. The prompt will be pre-filled for you.
Try this prompt