Fig. 3

Comparison of different prompt engineering strategies. (a) Input-output prompting: The simplest form, providing a direct instruction and expecting an immediate answer. (b) Chain of thought (CoT) prompting: The model is instructed to generate intermediate reasoning steps before providing a final answer. (c) Self-consistency with CoT: Multiple CoT reasoning paths are generated, and the final answer is determined by a majority vote, improving robustness. (d) Tree of thought (ToT) prompting: The model explores multiple reasoning paths in a tree-like structure, evaluating intermediate steps to make more deliberate decisions.