Unlock 10x Better AI Responses with This Simple Prompt Technique
TL;DR
Add think step by step. no yapping to the end of your prompts.
Details
OpenAI o1-preview is very good at answering complex logic questions, but it’s expensive and rate limited to ~20 requests per day in ChatGPT.
Claude 3.5 Sonnet, on the other hand, is far cheaper, and with the new update as of October 23rd, it’s quite capable. However, it does not have the Chain-of-Thought training that o1-preview has, which can sometimes cause it to get tripped up on complex logic questions. In many cases, simply adding think step by step is enough to prompt both GPT-4o and Claude 3.5 Sonnet into correctly answering problems that require more than one reasoning step.
The new Claude 3.5 Sonnet is smart enough to count the r’s in strawberry, so here is a simple demo on ChatGPT with GPT-4o instead:
As you can see, it counts wrong. But if we add think step by step to the prompt, it gets it right:
Additionally, some of these models can be quite verbose in their output. GPT-4 was especially bad here, but even GPT-4o and Claude 3.5 Sonnet can sometimes be too loquacious. no yapping is a simple prompt addition to reduce the verbosity of the output and increase the signal-to-noise ratio.
Further reading
- The Prompt Report: A Systematic Survey of Prompting Techniques: This is a great and surprisingly accessible taxonomy of prompt techniques. There are some creative ideas in here.
- The Prompt Report on the Latent Space Podcast: The author of The Prompt Report discusses the paper in a long podcast episode.
- The Reddit Prompt: This is a complex prompt using both Chain-of-Thought and reflection, and it can be quite good at logic and coding problems.
Here is the full text of “the reddit prompt” for reference. It’s overkill for a lot of problems, but if you’re having trouble with Claude 3.5 Sonnet getting stuck on the wrong answer to a problem, this prompt can help get the model out of a local minimum.
I added the suggestions from the top comment on the original post, and made some minor edits to the reward scoring.
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0 and 100 using <reward> tags after each reflection. Use this to guide your approach:
90+: Continue current approach
50-90: Consider adjusting your approach
Below 50: Backtrack and trying a different approach
If unsure or if reward score is low, backtrack and try a different approach, explaining your decision within <thinking> tags.
For mathematical problems, show all work explicitly using LaTeX for formal notation and provide detailed proofs.
Explore multiple solutions individually if possible, comparing approaches in reflections.
Use thoughts as a scratchpad, writing out all calculations and reasoning explicitly.
After completing your initial analysis, implement a thorough verification step. Double-check your work by approaching the problem from a different angle or using an alternative method.
For counting or enumeration tasks, employ a careful, methodical approach. Count elements individually and consider marking or highlighting them as you proceed to ensure accuracy.
Be aware of common pitfalls such as overlooking adjacent repeated elements or making assumptions based on initial impressions. Actively look for these potential errors in your work.
Always question your initial results. Ask yourself, "What if this is incorrect?" and attempt to disprove your first conclusion.
When appropriate, use visual aids or alternative representations of the problem. This could include diagrams, tables, or rewriting the problem in a different format to gain new insights.
After implementing these additional steps, reflect on how they influenced your analysis and whether they led to any changes in your results.
Synthesize the final answer within <answer> tags, providing a clear, concise summary.
Conclude with a final reflection on the overall solution, discussing effectiveness, challenges, and solutions. Assign a final reward score.