Step-wise sampling-and-voting initially prompts the LLM to decompose the task into multiple steps. It then proceeds with multi-round iterations to produce the final result. In each round, the process begins by selecting a current unprocessed step and using sampling-and-voting to determine the result of that step. Subsequently, it uses the result to update the task. This iterative process is repeated multiple times until the last step is processed. To evaluate the performance of step-wise sampling-and-voting, we fix \(S=8\) and \(K=4\), and tune \(I\) from \(100\) to \(400\). Figure 7 (middle) shows that compared to simple sampling-and-voting, step-wise sampling-and-voting yields greater improvements. e.g., we see \(15\%\)-\(42\%\) gains, which increase with inherent difficulty.