๐ฟ Fundamentals of Prompting
See also Claude prompting protocol
Core Principles
- Clarity โ Reduces ambiguity and improves interpretation.
- Context โ Adds background and improves relevance.
- Constraint โ Focuses tone, length, or structure.
Best practice
- Place the most important information first.
- Be specific about what's required (see framework below)
Prompt Patterns and Techniques
Five-Step Prompt Design Framework (T-C-R-E-I)
- A complete prompt framework based on Googleโs model: Task, Context, References, Evaluate, Iterate.
- Why use it: Improves prompt clarity, completeness, and relevance.
- Example:
- Task: โSummarise this report.โ
- Context: โAudience is the executive board.โ
- References: โMatch the tone of last quarter's briefing.โ
- Evaluate: โDoes it highlight risks and outcomes?โ
- Iterate: โAdd bullet points for each key insight.โ
Role
- Assigns the AI a specific role to adopt in generating the response.
- Why use it: Aligns tone, terminology, and assumptions with the userโs needs.
- Example: โAct as a senior legal advisor assessing risk in this contract.โ
Audience
- Defines the target audience for the AIโs output.
- Why use it: Tailors complexity and tone for specific stakeholders.
- Example: โExplain this IT architecture to a non-technical CEO.โ
Question Refinement
- Prompts the AI to revise or optimise an existing prompt.
- Why use it: Improves unclear or poorly scoped prompts.
- Example: โImprove this prompt: โWrite something about our productโ.โ
Chain of Thought
- Instructs AI to explain its thinking step-by-step before answering.
- Why use it: Increases transparency and reduces reasoning errors.
- Example: โExplain each step of your logic before recommending a hiring decision.โ
Tree of Thought
- Explores multiple reasoning paths or solution options in parallel.
- Why use it: Enables comparison between approaches.
- Example: โSuggest three pricing strategies and explain the pros and cons of each.โ
ReACT Prompting (Reason + Action)
- Combines logical reasoning with specific actions like calculations or data lookup.
- Why use it: Improves realism and precision in decision-making tasks.
- Example: โCalculate ROI for these investments and then suggest which to pursue.โ
Cognitive Verifier Pattern
- Asks the AI to assess the accuracy and coherence of its response.
- Why use it: Reduces errors and hallucinations.
- Example: โReview your answer for consistency with these three sources.โ
Flipped Interaction Pattern
- Turns the AI into the questioner or evaluator of the user.
- Why use it: Builds user understanding through challenge or testing.
- Example: โQuiz me on stakeholder management techniques using case examples.โ
Ask for Input Pattern
- Encourages AI to seek missing details before responding.
- Why use it: Prevents low-quality outputs caused by lack of information.
- Example: โWhat else do you need to create a detailed training plan?
Fact Check List Pattern
- Guides the AI to validate all factual claims against known sources.
- Why use it: Reduces misinformation or invented content.
- Example: โIdentify every factual claim and confirm it against the report provided.โ
Filter Pattern
- Restricts the AIโs output to specific themes or meanings.
- Why use it: Improves focus and avoids off-topic content.
- Example: โOnly include insights relevant to supply chain optimisation.โ
Meta Prompting
- Uses AI to help create more effective prompts.
- Why use it: Helps users who are unsure how to phrase a request.
- Example: โSuggest a well-structured prompt to extract insights from meeting transcripts.โ
See also
๐ฑ Preventing AI Hallucinations
Sources:
https://youtu.be/p09yRj47kNM?si=Jki8bF2wAr3SNc3T
https://www.coursera.org/learn/prompt-engineering?specialization=prompt-engineering