Chain-of-thought prompting (Wei et al., 2022) shows the model worked examples in which the answer is preceded by its reasoning. The model then reasons step by step on the new question, which improves accuracy on arithmetic and logic tasks.
Implement build_cot_prompt(examples, question), formatting the demonstrations and the new question.
Format each example as Q, A with reasoning and 'The answer is', then add the new question with an empty answer.
No results yet
Run your code to check it against the examples, or submit to run every test.