Quiz: Module 2 - Fundamentals of Prompting
Test your understanding of prompt anatomy, types, and structures with 30 multiple-choice questions.
- 27-30 correct: Expert level!
- 21-26 correct: Proficient
- 15-20 correct: Developing - Review recommended
- Below 15: Please review the module content
Questions 1-10: Anatomy of a Promptβ
Question 1β
What are the four key components of a prompt?
- A) Input, Output, Process, Memory
- B) Instruction, Context, Input, Output Format
- C) Question, Answer, Format, Style
- D) Role, Task, Data, Response
Answer: B - The four key components are Instruction (what task to perform), Context (background information), Input (data to process), and Output Format (desired response structure).
Question 2β
Which prompt component tells the AI what task to perform?
- A) Context
- B) Input
- C) Instruction
- D) Output Format
Answer: C - The Instruction component tells the AI what task to perform. It's the action-oriented part of the prompt.
Question 3β
What is the purpose of the "Context" component?
- A) To specify the output length
- B) To provide background information for more relevant responses
- C) To define the programming language
- D) To set the temperature parameter
Answer: B - Context provides background information (role, audience, purpose, constraints) that helps the AI understand the situation and produce more relevant responses.
Question 4β
Which is a good practice for marking input data in a prompt?
- A) Using no delimiters
- B) Mixing input with instructions
- C) Using clear delimiters like triple quotes or XML tags
- D) Putting input at the very beginning
Answer: C - Using clear delimiters (""", ```, tags) helps separate input data from instructions, making it clear what the AI should process.
Question 5β
What characterizes a strong instruction?
- A) Vague and open-ended
- B) Clear, specific, and action-oriented
- C) Long and detailed with multiple tasks
- D) Written in passive voice
Answer: B - Strong instructions are clear, specific, action-oriented, and unambiguous.
Question 6β
Which is NOT a type of context?
- A) Role/Persona
- B) Token count
- C) Audience
- D) Constraints
Answer: B - Token count is not a type of context. Types of context include Role/Persona, Audience, Purpose, Constraints, and Background information.
Question 7β
When specifying output format, which is a valid option?
- A) "Give me something good"
- B) "Format as a markdown table with columns: Name, Price, Rating"
- C) "Whatever format works"
- D) "I don't care about format"
Answer: B - Specific format instructions like "Format as a markdown table with columns" ensure you get the structure you need.
Question 8β
What is wrong with this prompt: "Dogs"?
- A) It's too long
- B) It's missing an instruction component
- C) It has too many delimiters
- D) It specifies the wrong format
Answer: B - "Dogs" is missing an instruction - it doesn't tell the AI what to do. A better prompt would be "Describe the most popular dog breeds for families."
Question 9β
Does every prompt need all four components?
- A) Yes, always
- B) No, but understanding when to use each is crucial
- C) Only for coding prompts
- D) Only for creative writing
Answer: B - Not every prompt needs all four components, but understanding when and how to use each is crucial for effective prompt engineering.
Question 10β
Which verb category includes "Convert, Translate, Rewrite, Simplify"?
- A) Generate
- B) Analyze
- C) Transform
- D) Organize
Answer: C - Transform is the category that includes verbs for changing content from one form to another: Convert, Translate, Rewrite, Simplify, Expand.
Questions 11-20: Zero-Shot and Few-Shotβ
Question 11β
What is zero-shot prompting?
- A) Prompting with zero creativity
- B) Prompting without providing any examples
- C) Prompting with empty input
- D) Using zero temperature
Answer: B - Zero-shot prompting means asking the AI to perform a task without providing any examples. The AI relies on its pre-trained knowledge.
Question 12β
What is few-shot prompting?
- A) Prompting with a few words
- B) Prompting with a few examples to demonstrate the pattern
- C) Prompting that takes few tokens
- D) Prompting with few constraints
Answer: B - Few-shot prompting provides 2-5+ examples that demonstrate the desired input-output pattern for the AI to learn from.
Question 13β
When should you use zero-shot prompting?
- A) For complex custom formats
- B) For standard, well-defined tasks
- C) When examples are required
- D) Only for coding tasks
Answer: B - Zero-shot works best for straightforward, well-defined tasks where the AI likely has strong pre-trained capabilities.
Question 14β
What is a key advantage of few-shot prompting?
- A) Uses fewer tokens
- B) Requires no setup time
- C) Higher consistency in outputs
- D) Works for any task equally well
Answer: C - Few-shot prompting achieves higher consistency because the AI learns the exact pattern from the examples provided.
Question 15β
How many examples typically constitute "few-shot"?
- A) 0
- B) 1 only
- C) 2-5 or more
- D) At least 100
Answer: C - Few-shot typically uses 2-5+ examples. One example is "one-shot," and zero examples is "zero-shot."
Question 16β
What makes good few-shot examples?
- A) All examples should be very similar
- B) Examples should be diverse, consistent, and representative
- C) More is always better
- D) Examples should be artificially simple
Answer: B - Good examples are diverse (cover different scenarios), consistent (same format), and representative (realistic use cases).
Question 17β
What is a downside of few-shot prompting?
- A) It never works
- B) Higher token usage (examples cost tokens)
- C) AI ignores the examples
- D) Only works with GPT models
Answer: B - Few-shot uses more tokens because the examples are part of the prompt, increasing costs.
Question 18β
What is one-shot prompting?
- A) A single attempt at prompting
- B) Providing exactly one example
- C) A prompt with one word
- D) Using only one AI model
Answer: B - One-shot prompting provides exactly one example to demonstrate the pattern.
Question 19β
Why should few-shot examples use consistent formatting?
- A) To save tokens
- B) So the AI learns the exact pattern to replicate
- C) Because AI can't handle varied formats
- D) It doesn't matter
Answer: B - Consistent formatting across examples helps the AI learn the exact pattern you want it to replicate.
Question 20β
When converting from zero-shot to few-shot, what should you consider?
- A) Always use exactly 10 examples
- B) Find the minimum number of examples that achieves consistent results
- C) Remove all instructions
- D) Only use examples from one category
Answer: B - Find the minimum effective number of examples since more examples = more tokens = higher cost.
Questions 21-30: Basic Prompt Structuresβ
Question 21β
What are the four basic prompt structures?
- A) Simple, Complex, Advanced, Expert
- B) Question, Instruction, Completion, Conversation
- C) Text, Code, Data, Image
- D) Short, Medium, Long, Extended
Answer: B - The four basic structures are Question (ask for information), Instruction (command a task), Completion (finish a sentence), and Conversation (dialogue format).
Question 22β
Which structure is best for information retrieval?
- A) Completion
- B) Conversation
- C) Question
- D) Instruction
Answer: C - Question format is most intuitive for information retrieval and explanations.
Question 23β
Which structure uses imperative sentences with action verbs?
- A) Question
- B) Instruction
- C) Completion
- D) Conversation
Answer: B - Instruction format uses imperative sentences with verbs like write, create, analyze, list.
Question 24β
What is the Completion format?
- A) Asking complete questions
- B) Getting complete answers
- C) Starting a sentence for the AI to finish
- D) Completing a course
Answer: C - Completion format starts a sentence or paragraph and lets the AI complete it, giving precise control over style and direction.
Question 25β
When should you use Conversation format?
- A) For simple factual queries
- B) For simulations, role-play, and tutoring scenarios
- C) Only for customer service
- D) When other formats fail
Answer: B - Conversation format is best for simulations, role-play, tutoring, customer service scenarios, and interactive exchanges.
Question 26β
Which prompt structure gives the most control over tone?
- A) Question
- B) Instruction
- C) Completion
- D) All are equal
Answer: C - Completion format gives the most control because you set the exact tone and direction with your opening text.
Question 27β
"Write a 200-word summary of this article" uses which structure?
- A) Question
- B) Instruction
- C) Completion
- D) Conversation
Answer: B - This uses Instruction format - it's a direct command using the imperative verb "Write."
Question 28β
"You are a patient tutor teaching calculus..." uses which structure?
- A) Question
- B) Instruction
- C) Completion
- D) Conversation
Answer: D - This sets up a Conversation/role-play format by establishing a persona for interactive dialogue.
Question 29β
Can you combine multiple prompt structures?
- A) No, you must choose only one
- B) Yes, advanced prompts often combine structures
- C) Only in Python
- D) Only with GPT-4
Answer: B - Yes, advanced prompts often combine multiple structures for complex tasks.
Question 30β
"The main causes of climate change are:" uses which structure?
- A) Question
- B) Instruction
- C) Completion
- D) Conversation
Answer: C - This is Completion format - it starts a sentence for the AI to finish with the causes.
Score Summaryβ
Count your correct answers:
| Score | Level | Recommendation |
|---|---|---|
| 27-30 | Expert | Proceed to Module 3 |
| 21-26 | Proficient | Proceed, review weak areas |
| 15-20 | Developing | Review before proceeding |
| 0-14 | Beginning | Please review Module 2 thoroughly |