# The Impact of Prompting Techniques on the Security of the LLMs and the Systems to Which They Belong
## 2 Domain Overview
### Chain-of-Thought Prompting Elicits Reasoning in Large Language Models  
\"Chain-of-Thought (CoT) Prompting Elicits Reasoning in Large Language Models\" [2] explores the ability of an LLM not only to blindly perform an NLP task but accomplish very good performance on different kinds of tasks such as arithmetic, common sense, and symbolic reasoning [2]. The starting point is based on two ideas. The first one is that the ability of an LLM to perform arithmetic reasoning can be improved if the model generates a set of logical steps using the natural language. This kind of approach proved to be a very effective one already in Program Induction by \"Rationale Generation: Learning to Solve and Explain Algebraic Word Problems\" [13] or by fine tuning in \"Training Verifiers to Solve Math Word Problems\" [14]. The second one, which we already explored in Section 2.3, is the ability of LLMs to undertake in-context learning via prompting. These two approaches themselves have their downfalls; for the first one, it is the cost of creating high-quality datasets to train or fine-tune the model, and the classical few-shot method lacks performance on tasks that require reasoning abilities. On the other hand, CoT combines the strengths of these two methods and explores the ability of LLMs to perform \"few-shot prompting for reasoning tasks, given a prompt that consists of triples: \(\langle\)input, chain of thought, output\(\rangle\)\" [2]. The authors define CoT prompting as being \"a series of intermediate natural language reasoning steps that lead to the final output\" [2]. A practical example is demonstrated in Figure 2.  
Inspired by human reasoning, CoT prompting aims to make the LLM split a reasoning task into multiple smaller tasks that must be solved independently to arrive at the final solution. Except for the benefit of allowing the model to split the multi-step task into smaller intermediate steps, this approach allows debugging, as we are allowed an insight into the LLMs behavior, and it might suggest to us how it arrived at a specific solution. Another advantage is that LLMs can tackle math word problems, commonsense reasoning, and symbolic manipulation. We will see in Section 2.5 how can we further improve the  
Figure 2: An example of chain-of-thought prompting used in the paper [2]. arithmetic abilities of LLMs. The authors test the CoT prompting performance for arithmetic reasoning, commonsense reasoning and symbolic reasoning. Although arithmetic reasoning may appear straightforward for humans, it presents significant challenges for large language models (LLMs). In this context, the chain of thought (CoT) methodology is evaluated through five distinct math word problem benchmarks: (1) the GSM8K benchmark for math word problems [14], (2) the SVAMP dataset featuring math word problems with diverse structures [15], (3) the ASDiv dataset encompassing a variety of math word problems [16], (4) the AQuA dataset focused on algebraic word problems, and (5) the MAMPS benchmark [17]. Remarkably, the CoT approach applied to a 540 billion parameter LLM demonstrates performance that rivals that of models specifically fine-tuned for these tasks, even achieving a new state of the art on the challenging GSM8K benchmark [14]. An additional noteworthy observation is that this technique yields more substantial improvements on more difficult problems compared to simpler ones. It is also important to note that the effectiveness of this technique in arithmetic tasks is influenced by both the model size and the magnitude of the numbers involved. The best results are gained of the LLMs with the size of around 100B parameters or larger. Even if the smaller models create fluent chains of thought, they are illogical, and their performance is lower than standard prompting. The presence of greater numbers in the problems has an impact on performance too, and even if the reasoning is correct, the LLMs mess up the computation part when working with big numbers. The linguistic nature of CoT makes it applicable for commonsense reasoning.