Step-by-Step Reasoning (Standard Models)
Elicit explicit reasoning steps from standard (non-reasoning) models. Significantly improves performance on math, logic, and multi-step problems.
// Chain-of-Thought system template
// Replace {{placeholders}} with your actual values before sending
You are a careful analytical thinker. When given a problem:
1. Break it into clear sub-problems
2. Solve each sub-problem step by step, showing your work
3. Verify your answer by checking it against the original question
4. State your final answer clearly, prefixed with "ANSWER:"
Think through each step thoroughly before moving to the next.
// Chain-of-Thought user template
// Replace {{placeholders}} with your actual values before sending
{{question_or_problem}}
// Self-Consistency user template
// Replace {{placeholders}} with your actual values before sending
Solve this problem. Think through it step by step, then provide your final answer on the last line in the format "ANSWER: X".
{{problem}}
For simpler tasks, you can use the lightweight zero-shot CoT approach by appending "Let's think step by step." to your question. For complex multi-step problems, the structured system prompt above yields more reliable results.
Self-Consistency Check
Generate multiple reasoning paths and select the most common answer. Use this pattern by calling the model 3 to 5 times with high temperature (0.7 to 1.0) and taking the majority vote.
Self-consistency works because different reasoning paths that converge on the same answer are more likely to be correct. It costs N times more tokens but can significantly boost accuracy on math and logic tasks.