# The Impact of Prompting Techniques on the Security of the LLMs and the Systems to Which They Belong
## 2 Domain Overview
### Language Models Are Few-Shot Learners  
The general-purpose ability to generate text or perform different kinds of NLP tasks makes the LLMs a perfect starting point for a lot of use cases we might be interested in. But once we have our task defined, we would like perhaps to increase the performance of the model on that specific job. The traditional way of doing so is usually to fine tune the model for our use case. We adapt our general-purpose model to a specific task by updating the parameters on a new dataset specific to our task. Most of the time, this approach yields the best results, but there are a few problems with it. One of these problems is the fact that the amount of NLP tasks and different variations for these jobs are too big to have for everyone of them a dataset that fits them, especially if we want something custom-made for our system.  
The \"Language Models are Few-Shot Learners\" [1] paper presents a different method of tweaking an LLM to increase its performance on an NLP job. This paper explores the ability of the LLMs to conduct in-context learning and to adapt to new kinds of NLP tasks more or less on the fly. Inspired by human behavior, the authors observe that most of the time, humans need a few examples or instructions to understand how to perform an NLP task. This type of approach was not very effective on the smaller language models, but as the size of the model scales, they notice that this method \"improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches\" [1]. The model used to test this hypothesis is GPT-3, which is an auto-regressive language model with 175 billion parameters without any kind of fine tuning or gradient updates. They test three different settings for it--zero-shot (the model is only given a natural language instruction describing the task, but no demonstration is provided), one-shot (the model is given a natural language instruction describing the task alongside a single demonstration of how should the task be performed) and few-shot (the model is given a few demonstrations of the task at inference time as conditioning together with the natural language instruction describing the task)--and compare them with the traditional fine-tuned models specific for each task. Figure 1 shows examples of how every one of these settings would look in practice.  
It is important to note the fact that this paper does not militate against fine tuning but rather presents an alternative method that could be used even alongside fine tuning. More than that, this highlights the incredible ability of the LLMs to adapt to new kinds of tasks as well. The results of the paper show the performance of this method on different NLP benchmarks in all three settings compared to the traditional fine-tuning approach. The  
Figure 1: Zero-shot, one-shot and few-shot, contrasted with traditional fine tuning.  
few-shot setting in some cases outperforms the previous fine-tuned state of the art, or it is close enough to at least take into consideration if we have to choose between the two.  
From a security point of view, this technique could be especially helpful if we would like to teach our LLM to respond in a specific way to prompts that we consider undesirable or malicious. We also have to consider the fact that this method of teaching the LLM to behave in a certain way could be as well used by an attacker who could perhaps try to overload the existing context of our model with examples of how he would want the task to be performed and try in this way to change the initially defined behavior of our LLM.