A ligned C o T : Prompting Large Language Models via Native-Speaking Demonstrations (2024)

Abstract: Large Language Models prompting, such as using in-context demonstrations, is a mainstream technique for invoking LLMs to perform high-performance and solid complex reasoning (e.g., mathematical reasoning, commonsense reasoning), and has the potential for further human-machine collaborative scientific findings. However, current LLMs are delicate and elusive in prompt words and styles. And there is an unseen gap between LLM understanding and human-written prompts. This paper introduces AlignedCoT, an LLM-acquainted prompting technique that includes proficient “native-speaking” in in-context learning for the LLMs. Specifically, it achieves consistent and correct step-wise prompts in zero-shot scenarios by progressively probing, refining, and formatting the LLM chain of thoughts so that free from handcrafted few-shot demonstrations while maintaining the prompt quality. We conduct experiments on mathematical reasoning and commonsense reasoning. We find that LLMs with AlignedCoT perform significantly superior to them with human-crafted demonstrations. We further apply AlignedCoT for rewriting the GSM8k training set, resulting in a GSM8k-Align dataset. We observe its benefits for retrieval augmented generation.

## introduction rapidly increasing capabilities of large language models (llms) lead to remarkable advances in various nlp tasks @xcite @xcite . however, as llms scale up, the computational load of fine-tuning llms becomes generally unaffordable. meanwhile, in-context learning (icl) methods exhibit competing performance with fine-tuning @xcite ; kojima et al., 2022). icl saves the high costs of training llms and enjoys high interpretability from the produced reasoning steps. these advantages make icl emerge as a new popular paradigm for nlp, where llms make predictions based on in-context demonstrations. a core question in icl is the selection of effective demonstrations. @xcite proposes chain-of-thought (cot) prompting with a sequence of short sentences describing intermediate reasoning steps toward final answers. originating from cot, a line of icl research @xcite @xcite @xcite compose few-shot prompts by selecting examples that are relevant to the input question. the other line of work @xcite improves llms by increasing prompt diversity by sampling reasoning paths multiple times. furthermore, another works @xcite @xcite propose to mimic human cognitive processes. however, cot's text style, specifically llms' familiarity and proficiency in language use while thinking, and its effect on llm complex reasoning performances, remain underexplored. an intuition is that it is more natural for humans to speak in their own style than to imitate others. as illustrated in figure 1 , a similar situa-he eats 32 from the largest pizzas because 2 * 16 = 32 he eats 16 from the small pizza because 2 * 8 = 16 he eats 48 pieces because 32 + 16 = 48 so, the answer is 48. ## alignedcot prompting figure 2 shows the proposed alignedcot. the main purpose of alignedcot is to achieve llm's native-style cots without following human-written few-shot demonstrations. specifically, the nativestyle cots are preferred to be zero-shot cots and at the same time have consistent formats and correct steps as stronger substitutions to the few-shot handcrafts. to achieve this, alignedcot builds an effective alignment between the two with the following steps: probing llm's native style in zero-shot scenarios ( §3.1), refining the generated cot to correct errors in the first step ( §3.2), and unifying the format of the generated cots in the first two steps ( §3.3). the obtained alignedcot is then applied by replacing the cot demonstrations in the original few-shot prompt to query llms. ## experiments in this section, we first discuss our experimental setting in §4.1. in §4.2 and §4.6, we not only show alignedcot's superior performance in multi-step reasoning but also demonstrate that alignedcot helps llm find logical paradoxes better. furthermore, we conduct ablation study, case study, and more in-depth analysis in §4.4 and §4.7. ## conclusion this paper proposes a new zero-shot prompting approach aligned chain-of-thought (alignedcot), which elicits llms' "native style" thinking process for leveraging their profound embedded knowledge for effective multi-step reasoning. alignedcot operates in proving, refining, and formatting to obtain competing "native-style" cots with handcrafted demonstrations. experiments suggest multiple advantages of alignedcot: 1) alignedcot is demonstrated effective for multi-step reason-ing tasks. moreover, it can be easily combined with cot, complex cot, and self-consistency and achieve further improvements. 2) alignedcot enhances llms' capability of detecting logical errors in reasoning questions. 3) alignedcot benefits generalized cot scenarios including retrievalaugmentated generation.