Solutions – Prompt Engineering Exercises¶
Below are example approaches to the practice tasks from Lesson 02. Your answers may vary; the goal is to demonstrate iterative thinking and clarity.
1. Iterative Rewrite¶
Initial Prompt¶
Explain AI to me.
Iteration 1¶
Explain artificial intelligence in two short paragraphs that a teenager could understand.
Iteration 2¶
You are a friendly science teacher. Briefly explain what artificial intelligence is in two short paragraphs suitable for a high‑school student.
Final Version¶
You are a friendly science teacher. In two short paragraphs, explain what artificial intelligence is for a high‑school student. Use a casual tone and everyday examples.
2. Clarify a Request¶
Vague Instruction¶
tell the computer to clean up files
Improved Prompt¶
Provide a bash command that removes all `.tmp` files from the current directory and then prints how many files were deleted.
Example Answer¶
find . -name "*.tmp" -print -delete | wc -l
This version transforms the vague request into a clear, actionable command.