Practice advanced prompt pattern vocabulary: role-playing, step-back prompting, tree of thoughts, self-ask, and program-of-thought.
0 / 5 completed
1 / 5
A prompt starts with 'Act as a senior security engineer and review this code.' What pattern is this?
The role-playing pattern (also called persona prompting) assigns the model a specific role or identity. This can activate relevant knowledge, set the appropriate tone, and constrain the model's perspective to match the desired expertise.
2 / 5
A researcher uses 'step-back prompting' before asking a specific question. What does this technique involve?
Step-back prompting first asks the model a high-level, abstract question (e.g., 'What are the general principles of X?') to activate relevant background knowledge, then follows with the specific task. This improves performance on reasoning-heavy questions.
3 / 5
A team evaluates 'tree of thoughts (ToT) prompting.' What distinguishes ToT from standard chain-of-thought?
Tree of Thoughts extends chain-of-thought by generating multiple reasoning paths (branches), evaluating them, and pursuing the most promising ones — similar to a tree search. This is particularly useful for complex planning and problem-solving tasks.
4 / 5
Your colleague describes using the 'self-ask pattern.' What does this pattern involve?
The self-ask pattern prompts the model to explicitly generate and answer follow-up questions it needs to answer in order to solve the main question. This structured decomposition improves accuracy on multi-hop reasoning tasks.
5 / 5
A prompt guide mentions 'program-of-thought (PoT) prompting.' How does PoT differ from chain-of-thought?
Program-of-Thought prompting has the model generate code (e.g., Python) to solve a problem, then executes the code to get a precise answer. This offloads precise computation to an interpreter, avoiding arithmetic errors common in natural language reasoning.