# The Impact of Prompting Techniques on the Security of the LLMs and the Systems to Which They Belong
## 2 Domain Overview
### A Holistic Approach to Undesired Content Detection in the Real World  
So far, most of the papers we discussed were addressing different prompting techniques that were tested mostly on different benchmarks, but there were no mentions of how those models with the respective techniques perform in real-life scenarios. \"A Holistic Approach to Undesired Content Detection in the Real World\" [29] presents a use case for an LLM in which it must solve a practical task robustly and reliably. Even if the authors do not use any prompting techniques that we discussed and choose to fine-tune the model, it is insightful to see the challenges they face and how they manage to overcome them. Another aspect is the fact that this paper is one of the few papers that show the importance of red-teaming the models to ensure the performance of the model on the desired task. The paper explores a holistic approach to developing a robust and effective natural language classification system for real-world content moderation [29]. Its aim is _to identify a wide range of undesirable content categories, such as sexual content, hate speech, violence, self-harm, and harassment_. The authors highlight the following conclusion: _Detailed instructions and quality control are needed to ensure data quality_. It seems that inconsistent labeling can lead to bad performance, because it confuses the model. This shows us the fact that from a methodological point of view, when working with an LLM, we must first define the task in a precise manner, remove any kind of ambiguity, and choose good metrics to measure the performance of our model. Another important observation is _Active learning is a necessity_. We must monitor the LLM's performance and the traffic data that are fed into the model, because there might be a shift between what we expect the model to obtain and what it obtains in a production scenario, and once we identified that shift, we should tweak our data/prompts to fit it. Production traffic data might return us edge cases that we did not think of. The paper notes a 10\(\times\) performance improvement for edge cases. _Imbalanced training data can lead to incorrect generalization_. This applies to in-context learning too; we must be careful with our examples, as deep learning models tend to overfit language patterns. For example, the LM can over-generalize anything structured as \"X is hateful\". This behavior, in particular, could be easily exploited by someone with bad intentions. For example, let us consider the paper's scenario where we would like to identify the users who send hateful messages and ban them. We would not like our model to flag a user as hateful just because another user wrote \"Username is hateful\" and then banned. The overview of the model training framework used is presented in Figure 8.  
Figure 8: Overview of the model training framework from the paper [29].  
We mentioned in previous sections that one of the advantages of prompting techniques is the fact that they are a good alternative to fine tuning. This does not mean that we discard fine tuning completely, and this \"A Holistic Approach to Undesired Content Detection in the Real World\" [29] shows us that a model can obtain very good performances with fine tuning. We could use both methods and define a longer process in which we start with a general purpose LLM together with different prompting techniques, and then we start collecting data to create our own task-specific dataset that later could be used to fine-tune the model. This would allow us to remove parts of prompts that our model learned through fine tuning or replace them with parts based on the observations and cases that we discovered in the meantime.