Prompt Engineering Exercises
Fill in the blanks to complete the code.
1
Name the technique of assigning a persona to the model
// "You are an expert Python developer..."
// Called prompting
2
Identify the prompting method that shows reasoning steps
// "Let's think step by step..."
// Called prompting
3
Name the technique of providing examples inside the prompt
// Prompt includes input/output examples
// Called -shot prompting
4
Name the prompting strategy that provides no examples
// No examples given, model relies on training
// Called -shot prompting
5
Identify the parameter that makes output more focused/deterministic
// Lower value = less random output
= 0.1 # nearly deterministic
6
Name the technique of breaking a task into sub-problems
// Solve complex tasks by decomposing them
// Called task
7
Identify the role that contains the model behavior instructions
messages = [
{ "role": "", "content": "Always respond in JSON." }
]
8
Name the technique where the model checks its own output
// Ask the model to review and correct itself
// Called refinement