Responsible AI architecture
Generally speaking, there are many levels at which we can intervene to make a whole LLM-powered application safer and more robust: the model level, the metaprompt level, and the user interface level. This architecture can be illustrated as follows:
Figure 12.1: Illustration of different mitigation layers for LLM-powered applications
Of course, it is not always possible to work at all levels. For example, in the case of ChatGPT, we consume a pre-built application with a black-box model and a fixed UX, so we have little room for intervention only at the metaprompt level. On the other hand, if we leverage open-source models via an API, we can act up to the model level to incorporate Responsible AI principles. Let’s now see a description of each layer of mitigation.
Model level
The very first level is the model itself, which is impacted by the training dataset we train it with. In fact, if the training data is biased, the model will...