guidance

BaFin § Annex

Case study – operating an LLM-based AI assistant

Official source ↗

A financial services entity plans to implement an LLM-based AI assistant to support employees in creating texts, emails and presentations. As the entity works with sensitive financial and customer data, strict security and compliance requirements must be met.

This case study describes typical risks involved in implementing this kind of AI application. Three infrastructure variants are examined: the on-premise solution and two variants with cloud operation – first an AI application in the entity’s own tenant, and second an AI application outside the entity’s own tenant. Figure 2 illustrates the concepts behind these two variants.

Figure 2: Archetypal infrastructure options
Figure 2: Archetypal infrastructure options

The case study presents an illustrative discussion of selected ICT risks that can be observed when AI assistants are used. It does not express any supervisory expectations. All measures presented in the case study are illustrative. By contrast, financial entities must implement the measures that are most appropriate for their specific risk situation.

The specific ICT assets and infrastructure used at financial entities may also represent a combination of elements from the three variants. The following discussion of risks should then be modified accordingly.

Independently of this, there are risks that are significant in every infrastructure variant. Key examples along the AI lifecycle are as follows:

1. Data acquisition and processing: A significant risk is that the AI application will process data that has not been approved for use in the application. This is why it is essential for the data to be comprehensively classified by confidentiality level. Selected measures can be categorised in greater detail as follows.

Data classification and access control:

Data minimisation and masking:

Identification and avoidance of data bias:

2. Model development and training: When training or fine-tuning LLMs, there is a risk that manipulated data will be used, which can lead to unexpected or altered model behaviour. The following measures can be considered here:

Similar to data poisoning, there is also something known as “model poisoning”. This risk occurs particularly with open source models or models obtained from shared repositories. In this case, attackers attempt to modify the behaviour of a trained model or even the structure of the model itself. Best practice measures for risk mitigation include:

In addition, even when a pre-trained model is used, attackers can attempt to implement backdoor attacks or adversarial manipulations. Examples of potential countermeasures include:

3. Model deployment and integration: ICT risks also arise in this phase of the AI lifecycle. In particular, if the AI assistant is not implemented securely, attackers can gain unauthorised access to internal systems or exfiltrate model information. The following measures have proven to be effective here.

Deployment strategy:

Access control and authentication:

API security:

4. Operation and use: Integrating LLMs into business processes entails a wide range of risks. Besides challenges that are not directly related to ICT (such as “hallucinations”, which is when the model makes convincing statements that appear to be correct but are actually wrong), various ICT risks are relevant. These include the following major topics:

First, there is the extraction/disclosure of sensitive business information from fine-tuned, publicly accessible LLMs. In this case, selected confidential information from the training data set can be reproduced using appropriate prompts. There is a risk here that malicious prompts (known as “prompt injection”) could force the LLM to behave in an unintended way, e.g. by linking to websites that contain hidden instructions for the LLM. The following measures, among others, can be taken to counter these risks:

Second, a compromised or malfunctioning AI assistant may disclose confidential information to users who do not actually have access to this data. In this context, processes for monitoring the AI application and detecting anomalies can be used, e.g.

Third, API access to LLMs can give attackers an opportunity to access systems connected to the LLM and thereby extract confidential information. In addition to assigning appropriate access rights, financial entities should also consider isolating LLMs. Other potential measures include:

5. Maintenance, updates and incident response: In particular when using open source LLMs, entities must consider that outdated or incorrectly configured software versions can lead to security vulnerabilities. Selected measures to counter this risk include the following.

Regular security updates:

Governance requirements:

6. End-of-life management: The uncontrolled continued use or unsafe retirement of AI assistants can lead to the misuse of historical data and models or their unintentional public disclosure (leaks). As with all ICT assets, financial entities must therefore also plan for the retirement of LLMs and associated data sources. Potential best practice measures for risk mitigation include the following.

Secure retirement of AI assistants:

The specific features of the selected infrastructure models will now be examined in the following. Investment costs and operating costs are not considered here. Such costs will arise to a greater extent in each variant, as either the establishment and operation of a separate infrastructure will be necessary, or the secure configuration of the model may lead to increased cloud spending.

Variant 1: On-premise solution

In this variant, the financial entity has its own storage and processing capacities and operates AI software developed (partially or completely) internally on its own hardware. This is the case when the entity implements, maintains, trains, and operates an LLM itself. This means that all data flows remain within the entity’s own infrastructure. The financial entity has full control over the ICT assets of the AI application, but bears all the risks associated with the development, operation and, above all, maintenance of the hardware and software: both the strategic risk of the business model and the operational risk of the ICT system are significant here.

The specific risks of this approach are reflected in the AI lifecycle, particularly in model development and operation. In the first instance, implementing and maintaining open source models in particular demands sufficient knowledge and skills, meaning that the availability of suitable employees is a strategic risk.

There is a risk of vulnerability to cyberattacks, particularly when an entity operates models it has implemented itself or open source models. If the AI assistant is not implemented securely and is not continuously updated, attackers can gain unauthorised access to internal systems or exfiltrate model information. A suitable protective measure is closely controlled access management, as the effects of uncontrolled access are much greater when an entity uses AI than without it.

Additionally, capacity management is increasingly important in this infrastructure variant. Unlike cloud variants, the AI application cannot be scaled at will without expanding the hardware. The infrastructure must therefore be tailored to the expected computing power, regularly checked and adapted if necessary.

Variant 2: Cloud with AI application in the entity’s own tenant

In this case, the financial entity has its own tenant in a cloud environment. An AI assistant (such as an internally implemented open source model) is operated inside this tenant. This means that although data flows happen in the cloud, they are still exclusively inside the entity’s tenant.

The main risk in this variant is strategic in nature, as there is a high degree of dependency on the model operator if no open source implementation is used. One mitigating measure could be to use several models from different providers, although this would lead to increased operating and maintenance costs. In addition, employees must have the appropriate skills and knowledge, especially if they are using open source software.

There are also challenges with regard to capacity management, as it is not always possible to scale the AI application inside the tenant. One possible countermeasure is early capacity planning.

Variant 3: Cloud with AI application outside the entity’s own tenant

In this variant, the financial entity has a tenant in a cloud. However, the AI application is located outside this tenant, meaning that data flows extend beyond the boundaries of the tenant. This occurs typically when a large language model from the cloud provider is accessed via an API or called up as an AI assistant from standard software (possibly without the user’s knowledge).

The main risk in this scenario is that data leaves the tenant and flows to the model provider. This should be counteracted by contractual and technical measures. Selected technical measures for this include:

Another potential mitigating measure is to assign the AI application a lower data clearance level, meaning e.g. that it can only process less sensitive data. It should be noted that users cannot exceed these restrictions of their own accord.

Technical control of IT operations, information security, etc. should be carried out in line with the Cloud supervisory statement.