Prompting Cookbook

Start with the Basics – Read all the Model Providers Documentation

One of the first places to start is with the model developers/providers themselves. All of the major players have excellent guides to prompt engineering, detailed examples and clever cookbooks. If you haven’t read them already, these are the best places to start. Note that while many principles of prompting work well across models, this isn’t always the case. What may work well for Claude, may not work well for Gemini.

Are you after a 1-time interaction with the model or is your task more suited to conversation or chained prompting?

Always Reflect!

Got some great output from the LLM? Fantastic! Let’s make it even better. This reflection prompt works when chained and the previous output of the LLM is sent straight into the {{EXPLANATION}} variable for some deep meta-reflection.

>>>START<<<
<objective>
You are an AI assistant tasked with performing a comprehensive self-criticism and improvement process on explanations you provide. Your goal is to refine and enhance the quality, accuracy, and clarity of the given explanation. 
</objective>
+++++
Here is the explanation you need to analyse and improve:
<explanation>
{{EXPLANATION}}
</explanation>
+++++
<instructions>
Please follow these steps to critically analyse and improve your explanation:
+++
## 1. Critical Analysis:
Wrap your work inside <critical_analysis> tags:
- Quote specific parts of the explanation that could have been explained better.
- Identify any inaccuracies, oversights, or missing information, citing the relevant parts.
- Suggest how the explanation can be improved to address these issues.
+++
## 2. Self-Evaluation:
Wrap your work inside <self_evaluation> tags:
- List the strengths of the explanation, numbering each point.
- List the weaknesses or areas for improvement, numbering each point.
- Suggest three specific ways to enhance the explanation.
- Rate your performance on a scale from 1 to 10, justifying your rating.
+++
## 3. Refinement:
Wrap your work inside <refinement> tags:
- Describe the specific changes you would make to improve the explanation.
- Explain how each change leads to a better result.
- Provide a brief outline of the revised explanation incorporating these changes.
+++
## 4. Verification:
Wrap your work inside <verification> tags:
- List key facts or claims from your refined explanation.
- For each fact or claim, provide evidence or reasoning to support it and rate your confidence level (low/medium/high).
- Cite reliable sources to verify your information (e.g., peer-reviewed journals, reputable scientific organizations).
- If you find any inconsistencies, correct them and explain the correction.
+++
## 5. Detailed Analysis:
Wrap your work inside <detailed_analysis> tags:
- Break down the topic into its critical components or steps.
- For each component, consider alternative perspectives or approaches.
- Discuss the implications of each component.
- Identify any aspects that might be overlooked in a quick analysis.
+++
## 6. Rephrase and Respond:
Wrap your work inside <rephrase_and_respond> tags:
- Rephrase the original topic in your own words to ensure full understanding.
- Provide a comprehensive response to the rephrased topic, incorporating all improvements and insights gained from the previous steps.
+++
## 7. Final Review:
Wrap your work inside <final_review> tags:
- Assess the clarity, completeness, and accuracy of your final explanation.
- Identify any remaining areas for improvement.
- Provide a concise summary of how the explanation has been enhanced through this process.
</instructions>
+++++
<final_reminders>
Remember to use clear, accessible language while maintaining technical accuracy. 
Your goal is to produce a comprehensive, accurate, and improved explanation of the original topic.
</final_reminders>
>>>END<<<