DDP rompt: Differential Diversity Prompting in Large Language Models (2024)

Abstract: Large Language Models (LLMs) have shown that their reasoning ability could be enhanced through approaches like Chain-of-Thought (CoT) prompting. However, these methods use single prompts for different types of questions and do not design appropriate prompts for questions with different characteristics. In this paper, we aim to explore a methodology that generates differentially diverse reasoning paths for different types of questions. To achieve this, we propose a novel prompting strategy called Differential Diversity Prompting (DDPrompt). Firstly, we generate the optimal prompts collection based on question characteristics. Then, we use this optimal prompts collection to generate multiple answers for a question and choose the final answer by voting. We evaluated DDPrompt on twelve reasoning benchmarks and significant improvement in the performance of LLMs on complex reasoning tasks (e.g., GSM8K 75%->84%, Tracking Shuffled Objects (68.8%->83.9%))

## introduction large language models (llms) @xcite have shown remarkable abilities by learning from demonstrations while keeping their parameters frozen, which is called prompting. the design of prompting is crucial as it can significantly impact the performance of the llms on complex reasoning tasks @xcite , such as arithmetic reasoning @xcite , commonsense reasoning @xcite , symbolic reasoning @xcite . recent studies @xcite have explored various prompting strategies. for instance, chainof-thought (cot) prompting @xcite * corresponding author provided step-by-step reasoning examples to facilitate llms decomposing complex reasoning tasks into intermediate steps. however, this method required careful manual design of demonstrations, which is time-consuming and labor-intensive. zero-shot-cot @xcite discovered that by adding a single trigger sentence, such as "let's think step by step", after the question to induce the llms in generating the reasoning paths, they could achieve competitive performance to standard cot. some research @xcite have found that utilizing diverse prompts could effectively improve the reasoning ability of llms. for example, @xcite introduced a self-consistency technique involving generating multiple reasoning paths using a decoding strategy different from standard cot. @xcite leveraged llms to automatically generate diverse prompts, which were then ensemble across multiple inference calls for each question. in this paper, we aim to improve the performance of the llms by designing a prompting strategy that decreases manual labor and increases the diversity of prompts. one method we were considering is to utilize diversity trigger sentences, such as "let's think step by step", "let's think about this logically" mentioned in zero-shot-cot, to facilitate llms generate diversity reasoning paths for each question. however, this naive approach is inefficient. as per human experience, choosing the appropriate methods for a question based on its characteristics is crucial. inspired by this mind, we assume that different trigger sentences have varying effects on different types of questions. we choose appropriate trigger sentences to generate reasoning paths for a question. as shown in figure 1 , we conducted a preliminary experiment on the gsm8k @xcite . we noticed that the accuracy of different trigger sentences varied across different clusters. therefore, we explore an approach to generate differentially diverse reasoning paths for different types of questions. to achieve this, we propose a novel prompting strategy called the differential diversity prompting (ddprompt). this approach involves two stages. in the first stage, we generate an optimal trigger sentence set for each type of question. in the second stage, we utilize the optimal trigger sentence set to obtain the final answer for a question. by using this approach, we can provide differentially diverse reasoning paths for different types of questions and ensure an analysis from various perspectives. we evaluate ddprompt on twelve reasoning benchmarks from four categories of reasoning tasks, including arithmetic, commonsense, symbolic, and logical reasoning tasks. the result shows that ddprompt could significantly improve the performance of llms compared to zero-shot-cot. for instance, gsm8k (75% → 84%), aqua-rat (50% → 63%), last latter (64% → 89.8%), tracking shuffled objects (68.8% → 83.9%). ## method in this section, we provide a detailed explanation of the techniques used in ddprompt. this method is distinct from the zero-shot-cot @xcite , which uses a uniform trigger for different questions, e.g., let's think step by step. figure 2 shows the difference between zero-shot-cot and ddprompt. ddprompt involves two stages: generating optimal trigger sentence set(gotss) and inference. ## related works chain-of-thought (cot) @xcite generated intermediate thought steps for problemsolving and significantly improved the reasoning ability of llms. different from the cot approach, least-to-most @xcite suggested solving complex problems by decomposing them into a series of simpler subproblems. these methods are tedious to manually construct the appropriate rationales for the different questions in the demonstration. zero-shot-cot @xcite in-volved adding a simple trigger sentence like "let's think step by step" after the question to facilitate llms generating a step-by-step reasoning path. auto-cot @xcite proposed selecting demonstrations from different cluster methods and exploiting the benefits of diversity in demonstrations. @xcite proposed a selfconsistency method that replaced the greedy decoding method used in cot with a temperature sample to obtain a set of diverse reasoning paths. li et al. @xcite proposed sampling from varying prompts and then employed a verifier to verify the quality of each reasoning path. ## conclusion in this paper, we introduce ddprompt, which is designed to generate differentially diverse reasoning paths for different types of questions. ddprompt consists of two stages: the gotss stage, which generates the optimal trigger sentence set for each type of question; the inference stage, which uses this optimal trigger sentence set to generate multiple answers for a question and choose the final answer by majority voting. we evaluated ddprompt's performance on twelve reasoning benchmarks and observed a significant improvement in the performance of llms.