A very interesting life hack for ChatGPT (and for Gemma, too).
It significantly improves LLM responses, especially in mathematics and coding. Sometimes, it even surpasses ChatGPT o1.
This method initiates a chain of thoughts consisting of 20-50 steps before providing the answer.
Add it after describing your task.
Start by framing all your thoughts within the tags
<thinking>
, exploring various approaches to solving the task. Break the solution into clear steps using<step>
tags. Begin with 20 steps, and if the task is complex, request additional steps as needed. Use<count>
tags after each step to show the remaining number of steps. Stop when the count reaches zero. Constantly adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress. Regularly evaluate your progress using<reflection>
tags. Be critical and honest about your thought process. Assign a qualitative score between 0.0 and 1.0 using<reward>
tags after each reflection. Use this score to adjust your approach:
- 0.8 or higher: Continue with the current approach.
- 0.5 to 0.7: Consider minor adjustments.
- Below 0.5: Seriously consider going back and trying another approach.
If you are unsure or if the score is low, go back and attempt a different approach, explaining your decision in
<thinking>
tags. For mathematical tasks, explicitly show all calculations using LaTeX for formal notation, providing detailed proofs. Whenever possible, explore multiple solutions separately, comparing approaches in the reflections. Use thoughts as drafts, writing all calculations and reasoning explicitly. Synthesize the final answer in<answer>
tags, providing a clear and concise summary. Conclude with a final reflection on the overall solution, discussing its efficiency, challenges, and potential improvements. Assign a final score.
Thanks Oleg for sharing