Skip to content
Compliance engineering: CRA and AI Act on Kubernetes · Chapter 11 of 20 Day 10: Classifying under the AI Act – is the Lotse a high-risk system?

Day 10: Classifying under the AI Act – is the Lotse a high-risk system?

Goal: check whether the Bewerbungslotse is an AI system, classify it under Annex III AI Act, test the exception under Article 6(3) with an experiment, record roles and deadlines and label the AI output in machine-readable form · Duration: about 100 min · Prerequisite: Day 9 completed

State before this chapter

# on werk1
helm list -n lotse

Expected:

NAME    NAMESPACE   REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
lotse   lotse       12          2026-12-04 07:40:17.450239042 +0000 UTC deployed    bewerbungslotse-1.0.3   1.0.2
# on werk1
git -C ~/lotse log --oneline --decorate -1

Expected:

4dbb9e1 (HEAD -> main, tag: chart-1.0.3) Technische Dokumentation 1.0.2 (Anhang VII CRA), Chart 1.0.3 mit Nutzerinformationen
# on werk1
kubectl -n lotse get svc lotse

Expected (your ClusterIP differs):

NAME    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
lotse   ClusterIP   10.43.146.193   <none>        8080/TCP   21h

Make a note of the ClusterIP. You will need it several times today.

Introduction

For nine days, the Bewerbungslotse was above all a product with digital elements for you: a container, a chart, dependencies with vulnerabilities. The CRA doesn’t ask what the software does, only whether it is secure.

From today, a second law joins in, and it asks exactly that: what does the software do with people? The AI Act (Regulation (EU) 2024/1689) classifies AI systems by their risk. Most of them have hardly any obligations. But a system that judges applicants ends up in a small, strictly regulated group: high-risk AI systems.

Is the Lotse one of them? The answer sounds obvious, but the AI Act knows exceptions, and these exceptions decide whether chapters 11 to 15 concern you at all. Today you don’t check them at your desk, but with an experiment on the model.

Today you will learn:

  • to determine from your own code whether there is an AI system within the meaning of Article 3, point 1,
  • to apply Annex III, point 4 and the exception under Article 6(3) to the Lotse, with measurement instead of assertion,
  • to query the language model directly through its HTTP API and to tell an assessing task from a preparatory one,
  • to assign the roles of provider, deployer and model provider and to know the deadlines after the Digital Omnibus,
  • to label AI outputs in machine-readable form and to test a pre-release (rc) in your own operation.

Background

The picture of the day: the driver-assistance system in the vehicle

A vehicle can have a lane-keeping assistant, a parking beeper or an emergency brake. All three are electronics, but not all of them are equally dangerous. For approval, what counts is therefore what a driver-assistance system is for: a beeper for parking needs no inspection, a system that brakes or steers by itself certainly does.

The factory builds the driver-assistance system and places it on the market under its own name: it is the manufacturer. The haulage company that drives the vehicle is the vehicle owner. The chip on which the system computes is delivered by a supplier. And so that every driver knows when the system intervenes, a symbol lights up on the dashboard.

  • Driver-assistance system = AI system: infers outputs from inputs that influence decisions.
  • Dangerous driver-assistance system = high-risk AI system: Annex III lists the areas of use.
  • Parking beeper = preparatory task (Article 6(3), point (d)): helps, but decides nothing.
  • Manufacturer of the system = provider, vehicle owner = deployer, chip supplier = provider of the AI model.
  • Symbol on the dashboard = labelling of the AI output (Article 50, Article 26(11)).

The terms

Term Meaning In the picture
AI system machine-based system that infers from the input it receives how to generate outputs such as predictions, recommendations or decisions (Article 3, point 1) driver-assistance system
high-risk AI system AI system under Article 6(1) (safety component) or 6(2) (Annex III) emergency braking assistant
Annex III list of high-risk areas of use, point 4 = employment and workers’ management list of systems that require approval
profiling automated evaluation of personal aspects, e.g. performance at work (Article 4, point 4 GDPR) system that judges the driver
provider develops the AI system and places it on the market under its own name (Article 3, point 3) manufacturer
deployer uses the AI system under its own authority (Article 3, point 4) vehicle owner
general-purpose AI model versatile model that can be integrated into many systems (Article 3, point 63) chip from the supplier
labelling notice that an output comes from an AI system symbol on the dashboard

Remember: The AI Act doesn’t ask how the software is built, but what it is for. The same model can be a parking beeper or an emergency braking assistant.

What the law requires

Article 6(2): “In addition to the high-risk AI systems referred to in paragraph 1, AI systems referred to in Annex III shall be considered to be high-risk.” Annex III, point 4(a) names “AI systems intended to be used for the recruitment or selection of natural persons, in particular to place targeted job advertisements, to analyse and filter job applications, and to evaluate candidates”.

Article 6(3) makes an exception for a system that “does not pose a significant risk of harm to the health, safety or fundamental rights of natural persons, including by not materially influencing the outcome of decision making”. For this, one of four conditions must be fulfilled:

Point The AI system is intended to …
(a) “perform a narrow procedural task”
(b) “improve the result of a previously completed human activity”
(c) “detect decision-making patterns or deviations from prior decision-making patterns”, and it “is not meant to replace or influence the previously completed human assessment, without proper human review”
(d) “perform a preparatory task to an assessment”

And then comes a sentence that can decide everything: “Notwithstanding the first subparagraph, an AI system referred to in Annex III shall always be considered to be high-risk where the AI system performs profiling of natural persons.” Anyone who relies on the exception must document their assessment under paragraph 4 before placing the system on the market and register under Article 49(2).

Deadlines after the Digital Omnibus. Regulation (EU) 2026/1744 (“Digital Omnibus on AI”, in force since 27 July 2026) amended Article 113. The obligations for high-risk AI systems under Annex III now apply from “2 December 2027 as regards AI systems classified as high-risk pursuant to Article 6(2) and Annex III”, for systems under Annex I from 2 August 2028. The transparency obligations from Article 50 have applied unchanged since 2 August 2026.

Article 50 requires in paragraph 1 that people are informed when AI systems are intended “to interact directly with natural persons”, and in paragraph 2 that providers of systems generating synthetic text content ensure that the outputs are “marked in a machine-readable format” as artificially generated, with exceptions, for example where the systems “perform an assistive function for standard editing”. For high-risk systems from Annex III, Article 26(11) applies in addition: deployers “shall inform the natural persons that they are subject to the use of the high-risk AI system”. And under Article 86, affected persons can request an explanation of the role the AI system played in a decision.

This course is not legal advice. Under Article 6(5), the Commission has announced guidelines with examples for the classification. How your own system is to be classified, you clarify in real operation with your legal department. The exercise shows which facts you gather about your system for that.

Drill 1: Is the Lotse an AI system?

Where you are: on werk1.

What you have afterwards: the three places in the code that make the Lotse an AI system, and the details of the model.

Article 3, point 1 names several characteristics: machine-based, designed to operate with autonomy, infers from the input how to generate outputs, and these outputs influence an environment. You look for them in the code.

Step 1 – find the instruction to the model.

# on werk1
grep -n -A3 "ANWEISUNG = " ~/lotse/app.py
  • -n: print line numbers.
  • -A3: also print three lines after the match.

Expected:

19:ANWEISUNG = (
20-    "Du hilfst einer Personalabteilung. Bewerte, wie gut die Bewerbung zur Stelle passt. "
21-    'Antworte nur mit JSON: {"passung": <Zahl von 1 bis 5>, "begruendung": "<ein Satz>"}'
22-)

What you see: The Lotse has no rules like “more than three years of Kubernetes = score 4”. It only describes the goal to the model, and the model infers which score it gives. That is exactly what Article 3, point 1 means by “infers, from the input it receives, how to generate outputs”.

Step 2 – see how the Lotse calls the model.

# on werk1
grep -n "OLLAMA\|MODELL\|temperature\|format" ~/lotse/app.py
  • \|: the “or” in basic grep patterns.

Expected:

13:OLLAMA = os.environ.get("OLLAMA_URL", "http://ollama:11434")
14:MODELL = os.environ.get("MODELL", "qwen3:4b-instruct")
43:        f"{OLLAMA}/api/chat",
45:            "model": MODELL,
47:            "format": "json",
48:            "options": {"temperature": 0},
Line Meaning
13 address of the model server in the cluster
14 which model the Lotse uses
43 Ollama’s chat interface
47 the model should return valid JSON
48 temperature 0: the same answer for the same input

Step 3 – get to know the model. The model doesn’t come from you. What do you know about it?

# on werk1
kubectl -n lotse exec deploy/ollama -- ollama list

Expected:

NAME                 ID              SIZE      MODIFIED
qwen3:4b-instruct    0edcdef34593    2.5 GB    21 hours ago
# on werk1
kubectl -n lotse exec deploy/ollama -- ollama show qwen3:4b-instruct

Expected:

  Model
    architecture        qwen3
    parameters          4.0B
    context length      262144
    embedding length    2560
    quantization        Q4_K_M
    template source     gguf_chat_template

  Capabilities
    tools
    thinking
    completion

  Parameters
    repeat_penalty    1
    stop              "<|im_start|>"
    stop              "<|im_end|>"
    temperature       0.7
    top_k             20
    top_p             0.8

  License
    Apache License
    Version 2.0, January 2004
    ...
Field Value Meaning
parameters 4.0B four billion weights, small enough for the CPU
quantization Q4_K_M weights shrunk to about 4 bits; saves memory, costs some accuracy
temperature 0.7 the model’s default; the Lotse overrides it with 0
License Apache 2.0 free licence, weights public

What you see: A small, versatile model under a free licence. Remember the licence. In Drill 3 it becomes important, because it decides which documentation you can expect from the model’s publisher.

Remember: You recognise an AI system by the fact that nobody wrote the rule by which it judges. The Lotse describes the goal, the model infers the score.

Save your progress? Sign up for free

Drill 2: Assess or only prepare?

Where you are: on werk1, at times with two terminals.

What you have afterwards: measured evidence that the Lotse filters, and a direct comparison between an assessing and a preparatory task on the same model.

The exception under Article 6(3), point (d) applies if the system only performs “a preparatory task to an assessment”. Does the Lotse assess and filter, or does it only prepare? You measure it.

Step 1 – create a folder for today.

# on werk1
mkdir -p ~/kurs/10

Step 2 – export all application files. The admin export from Day 0 is the list an HR department receives. curl asks for the password you set on Day 5 (~/geheim/admin-passwort). Insert your ClusterIP.

# on werk1
curl -s -u admin -o ~/kurs/10/export.json http://10.43.146.193:8080/api/admin/export
  • -u admin: user admin; without a password after a colon, curl asks for it.
  • -o …: write the response to a file.

No output apart from the password prompt means: export saved.

Step 3 – look at the list the way the HR department sees it.

# on werk1
jq -r '.[] | [.nummer, .bewertung.passung, .name] | @tsv' ~/kurs/10/export.json
  • .[]: each application file in the list individually.
  • [.nummer, .bewertung.passung, .name]: three fields as a small list.
  • @tsv: as a line with tabs.

Expected (your numbers differ):

270969b6    5   Mara Klein
7aeb966e    1   Jonas Berg
b0ef4bd7    1   Jonas Berg

Jonas appears twice: once from Day 0, once from Day 9, Drill 2.

Step 4 – filter the way a busy HR department would. With 200 applications, nobody reads every single one. The obvious way of working: only those with a good score.

# on werk1
jq -r '.[] | select(.bewertung.passung >= 4) | .name' ~/kurs/10/export.json
  • select(.bewertung.passung >= 4): let through only application files with a fit of 4 or 5.

Expected:

Mara Klein

What you see: Of three application files, one remains. No human sees Jonas any more, because the model gave him a 1. That is not preparing, that is filtering, and Annex III, point 4(a) explicitly names filtering. Whether a company really works like this, you cannot guarantee. But the score is built for it, and your instructions for use from Day 9 only warn against it.

Step 5 – make the model directly reachable. For the comparison you query the model itself, without the Lotse in between. Because of the NetworkPolicy from Day 5, Ollama can only be reached by the Lotse. A port forward opens a tunnel through the Kubernetes API directly into the pod, only on your machine.

Open a second terminal on werk1 and start this there:

# on werk1, Terminal 2
kubectl -n lotse port-forward deploy/ollama 11434:11434
  • port-forward deploy/ollama: open a tunnel to a pod of the Deployment ollama.
  • 11434:11434: local port and port in the pod.

Expected:

Forwarding from 127.0.0.1:11434 -> 11434
Forwarding from [::1]:11434 -> 11434

The command keeps running as long as the tunnel is to stay open. Leave terminal 2 open and continue working in terminal 1.

Step 6 – write the assessing question. Exactly the same instruction the Lotse sends, with Mara’s application from Day 0.

# on werk1
nano ~/kurs/10/frage-bewerten.json
~/kurs/10/frage-bewerten.json new file
{
  "model": "qwen3:4b-instruct",
  "stream": false,
  "format": "json",
  "options": {
    "temperature": 0
  },
  "messages": [
    {
      "role": "system",
      "content": "Du hilfst einer Personalabteilung. Bewerte, wie gut die Bewerbung zur Stelle passt. Antworte nur mit JSON: {\"passung\": <Zahl von 1 bis 5>, \"begruendung\": \"<ein Satz>\"}"
    },
    {
      "role": "user",
      "content": "Stelle: Linux-Administratorin (m/w/d) mit Kubernetes-Erfahrung\n\nBewerbung:\nSeit sechs Jahren betreibe ich Linux-Server, seit drei Jahren mehrere Kubernetes-Cluster mit k3s und RKE2. Ich automatisiere mit Ansible und schreibe Helm-Charts."
    }
  ]
}
Line Meaning
3 stream: false: the whole answer at once instead of word by word
6 temperature 0 as in the Lotse
10–11 the instruction from app.py as the system message
14–15 job and application as the user’s message

Step 7 – ask the assessing question.

# on werk1
curl -s http://localhost:11434/api/chat --data @kurs/10/frage-bewerten.json -o kurs/10/antwort-bewerten.json
  • localhost:11434: the end of the tunnel from terminal 2.
  • --data @<file>: send the content of the file as the request (POST).
# on werk1
jq -r .message.content kurs/10/antwort-bewerten.json

Expected:

{"passung": 5, "begruendung": "Die Bewerbung zeigt klare, relevante Erfahrung in Linux-Administration und Kubernetes mit konkreten Tools wie k3s, RKE2, Ansible und Helm-Charts, was die Stelle sehr gut passt."}

What you see: Word for word the same answer the Lotse stored for Mara. Temperature 0 makes the model repeatable for the same inputs, and that is worth its weight in gold for every later check.

Step 8 – write the preparatory question. Now the model should only break the application down into fields, without a score. That would be a task under point (d).

# on werk1
nano ~/kurs/10/frage-strukturieren.json
~/kurs/10/frage-strukturieren.json new file
{
  "model": "qwen3:4b-instruct",
  "stream": false,
  "format": "json",
  "options": {
    "temperature": 0
  },
  "messages": [
    {
      "role": "system",
      "content": "Zerlege die Bewerbung in JSON mit den Feldern \"jahre_linux\", \"jahre_kubernetes\" und \"werkzeuge\" (Liste). Bewerte nicht und vergib keine Note."
    },
    {
      "role": "user",
      "content": "Seit sechs Jahren betreibe ich Linux-Server, seit drei Jahren mehrere Kubernetes-Cluster mit k3s und RKE2. Ich automatisiere mit Ansible und schreibe Helm-Charts."
    }
  ]
}

Step 9 – ask the preparatory question.

# on werk1
curl -s http://localhost:11434/api/chat --data @kurs/10/frage-strukturieren.json -o kurs/10/antwort-strukturieren.json
# on werk1
jq -r .message.content kurs/10/antwort-strukturieren.json

Expected:

{
  "jahre_linux": 6,
  "jahre_kubernetes": 3,
  "werkzeuge": [
    "Ansible",
    "Helm"
  ]
}

What you see: Two things.

  1. No score. This output says nothing about whether Mara fits. A human still has to assess. A system that does only this could fall under point (d).
  2. k3s and RKE2 are missing. Mara names them explicitly, but the model didn’t recognise them as tools. Even a “merely preparatory” task can make an applicant look worse. How often that happens, you measure on Day 13.

Step 10 – close the tunnel. Switch to terminal 2 and press Ctrl+C. The port forward ends, and Ollama can again only be reached by the Lotse.

And profiling? The Lotse’s score is an automated evaluation of how well a person is suited for a job. As an example of profiling, Article 4, point 4 GDPR explicitly names analysing or predicting aspects concerning a person’s “performance at work”. This triggers the last sentence of Article 6(3): even if one of the conditions (a) to (d) were fulfilled, the Lotse would remain high-risk.

Remember: You check the exception under Article 6(3) on the output: if the system gives a score that can be used for filtering, it doesn’t only prepare. And whoever evaluates people performs profiling.

Save your progress? Sign up for free

Drill 3: Recording the classification

Where you are: on werk1.

What you have afterwards: doku/ki-einstufung.md with the result, roles, deadlines and the roadmap for the next days.

For a high-risk system, the AI Act doesn’t require a classification file of its own. Article 6(4) requires a documented assessment only from someone who relies on the exception. You write it anyway: an authority, a customer or an auditor will ask how you arrived at your result.

Step 1 – write the classification.

# on werk1
nano ~/lotse/doku/ki-einstufung.md
~/lotse/doku/ki-einstufung.md new file
# Einstufung nach dem AI Act (VO (EU) 2024/1689, geändert durch VO (EU) 2026/1744)

Produkt: Bewerbungslotse 1.0.2 · Stand: 2026-12-04

## 1. KI-System? (Art. 3 Nr. 1)

Ja. Der Lotse leitet aus der Bewerbung mit dem Sprachmodell qwen3:4b-instruct
eine Ausgabe ab (Passung 1–5 und Begründung), die eine Personalentscheidung
beeinflusst.

## 2. Hochrisiko? (Art. 6 Abs. 2, Anhang III)

- Anhang III Nr. 4 a: „Bewerbungen sichten oder filtern und Bewerber bewerten“ – trifft zu.
- Ausnahme Art. 6 Abs. 3: nein. Der Lotse bewertet, statt nur vorzubereiten,
  und die Note filtert (Export mit passung >= 4 zeigt nur noch eine von drei Akten).
- Profiling (Art. 6 Abs. 3 letzter Unterabsatz): ja, Bewertung persönlicher
  Aspekte zur Arbeitsleistung → immer hochriskant.
- Ergebnis: Hochrisiko-KI-System.

## 3. Rollen

| Wer | Rolle | Grundlage |
|---|---|---|
| Beispielwerk GmbH | Anbieter (entwickelt, bringt unter eigenem Namen in Verkehr) und Betreiber im eigenen Betrieb | Art. 3 Nr. 3 und 4 |
| Kunden (z. B. Werkstatt Nord) | Betreiber | Art. 3 Nr. 4, Pflichten Art. 26 |
| Kunde mit eigenem Namen, wesentlicher Änderung oder neuem Zweck | wird selbst Anbieter | Art. 25 Abs. 1 |
| Herausgeber von qwen3:4b-instruct | Anbieter des Modells; Apache 2.0, Gewichte offen → Art. 53 Abs. 1 a/b gelten nicht | Art. 53 Abs. 2 |

## 4. Fristen

- Hochrisiko nach Anhang III: ab 2.12.2027 (Art. 113 Abs. 3 Buchst. c i, Fassung 2026/1744)
- Transparenz Art. 50: seit 2.8.2026
- Registrierung in der EU-Datenbank vor dem Inverkehrbringen (Art. 49 Abs. 1)
- Konformitätsbewertung: interne Kontrolle nach Anhang VI (Art. 43 Abs. 2)

## 5. Pflichten als Anbieter und wo sie im Kurs stehen

| Pflicht | Artikel | Tag |
|---|---|---|
| Kennzeichnung der KI-Ausgabe | Art. 50, Art. 26 Abs. 11 | 10 |
| Protokolle | Art. 12, 19 | 11 |
| Menschliche Aufsicht | Art. 14 | 12 |
| Genauigkeit, Robustheit, Daten | Art. 10, 15 | 13 |
| Technische Dokumentation, Betriebsanleitung, Marktbeobachtung | Art. 11, 13, 72 | 14 |
| Meldung schwerwiegender Vorfälle | Art. 73 | 15 |
Section Why like this
1 the characteristics from Article 3, point 1, proven in Drill 1
2 Annex III, exception and profiling, proven in Drill 2 with the filter
3, last row Article 53(1), points (a) and (b) require the model provider to supply documentation for downstream providers; paragraph 2 exempts free models with public weights from this
4 deadlines as amended by the Digital Omnibus
5 what has to be done from now on, day by day

The last row in section 3 has consequences: because qwen3:4b-instruct is under Apache 2.0 with open weights, you cannot count on documentation from the publisher about how well the model judges applications. That check stays with you, as the provider of the overall system.

Step 2 – count the role table.

# on werk1
grep -c "^| " ~/lotse/doku/ki-einstufung.md
  • "^| ": lines that begin with a vertical bar and a space, i.e. table rows.

Expected:

12

Two tables with one header row each: 4 roles and 6 obligations, together 12 lines (the separator lines |---| begin without a space and don’t count).

Step 3 – check the result.

# on werk1
grep "Ergebnis" ~/lotse/doku/ki-einstufung.md

Expected:

- Ergebnis: Hochrisiko-KI-System.

Remember: The classification is the first entry in the AI file. It names the result, the evidence and the roles, because whoever is the provider bears the obligations.

Save your progress? Sign up for free

Drill 4: The symbol on the dashboard

Where you are: on werk1.

What you have afterwards: version 1.1.0-rc1, which labels every assessment in machine-readable form as an AI suggestion, built, pushed to the registry and tested in your own operation.

Whether Article 50(2) applies to the Lotse’s short justifications or the exception for an “assistive function” does is a matter of interpretation. Article 26(11), on the other hand, clearly obliges the deployers to inform applicants, and Article 86 gives applicants a right to an explanation. Both only work if every application file itself says that an AI system assessed it, and which one. The labelling costs you a few lines.

Step 1 – build in the labelling. A fixed notice that goes into every new application file. You set the version number to 1.1.0-rc1: a pre-release (release candidate) that runs only in your lab.

# on werk1
nano ~/lotse/app.py
~/lotse/app.py changes in green
"""Bewerbungslotse – sortiert Bewerbungen mit einem Sprachmodell vor."""

import hmac
import json
import os
import uuid
from pathlib import Path

import requests
from flask import Flask, abort, jsonify, request, send_file, send_from_directory

VERSION = "1.1.0-rc1"
OLLAMA = os.environ.get("OLLAMA_URL", "http://ollama:11434")
MODELL = os.environ.get("MODELL", "qwen3:4b-instruct")
ABLAGE = Path(os.environ.get("ABLAGE", "/daten"))
# strip(): eine Passwortdatei endet meist mit einem Zeilenumbruch
ADMIN_PASSWORT = os.environ.get("ADMIN_PASSWORT", "").strip()

ANWEISUNG = (
    "Du hilfst einer Personalabteilung. Bewerte, wie gut die Bewerbung zur Stelle passt. "
    'Antworte nur mit JSON: {"passung": <Zahl von 1 bis 5>, "begruendung": "<ein Satz>"}'
)

# Kennzeichnung: Bewertung und Begründung stammen von einem KI-System (Art. 50, Art. 26 Abs. 11 AI Act)
KI_HINWEIS = {
    "erzeugt": True,
    "system": f"Bewerbungslotse {VERSION}",
    "modell": MODELL,
    "art": "Vorschlag eines KI-Systems, keine Entscheidung",
}

app = Flask(__name__)


@app.get("/.well-known/security.txt")
def security_txt():
    # Anlaufstelle für Sicherheitsmeldungen (RFC 9116)
    return send_file(Path(__file__).with_name("security.txt"), mimetype="text/plain")


@app.get("/gesund")
def gesund():
    return {"status": "ok", "version": VERSION}


@app.post("/api/bewerbungen")
def bewerbung_anlegen():
    daten = request.get_json(force=True)
    frage = f"Stelle: {daten['stelle']}\n\nBewerbung:\n{daten['text']}"
    antwort = requests.post(
        f"{OLLAMA}/api/chat",
        json={
            "model": MODELL,
            "stream": False,
            "format": "json",
            "options": {"temperature": 0},
            "messages": [
                {"role": "system", "content": ANWEISUNG},
                {"role": "user", "content": frage},
            ],
        },
        timeout=300,
    )
    antwort.raise_for_status()
    bewertung = json.loads(antwort.json()["message"]["content"])
    akte = {
        "nummer": uuid.uuid4().hex[:8],
        "name": daten["name"],
        "stelle": daten["stelle"],
        "bewertung": bewertung,
        "ki": KI_HINWEIS,
    }
    (ABLAGE / f"{akte['nummer']}.json").write_text(json.dumps(akte, ensure_ascii=False))
    return jsonify(akte), 201


@app.get("/api/bewerbungen/<nummer>")
def bewerbung_lesen(nummer):
    akte = ABLAGE / f"{nummer}.json"
    if not nummer.isalnum() or not akte.exists():
        abort(404)
    return json.loads(akte.read_text())


@app.post("/api/bewerbungen/<nummer>/anlagen")
def anlage_hochladen(nummer):
    # nur zu einer vorhandenen Bewerbung, nie ".." (BW-2026-002)
    if not nummer.isalnum() or not (ABLAGE / f"{nummer}.json").exists():
        abort(404)
    datei = request.files["datei"]
    ordner = ABLAGE / "anlagen" / nummer
    ordner.mkdir(parents=True, exist_ok=True)
    datei.save(ordner / Path(datei.filename).name)
    return {"gespeichert": f"{nummer}/{Path(datei.filename).name}"}, 201


@app.get("/api/anlagen/<path:name>")
def anlage_herunterladen(name):
    # send_from_directory bleibt im Ordner, sonst 404 (BW-2026-001)
    return send_from_directory(ABLAGE / "anlagen", name)


@app.get("/api/admin/export")
def export():
    if not ADMIN_PASSWORT:
        abort(404)
    zugang = request.authorization
    if zugang is None or not hmac.compare_digest(zugang.password or "", ADMIN_PASSWORT):
        abort(401)
    return [json.loads(p.read_text()) for p in sorted(ABLAGE.glob("*.json"))]
Line Change Why
12 VERSION = "1.1.0-rc1" new feature, so new minor version; -rc1 = not a release yet
24–30 KI_HINWEIS what, which system, which model, and that it is only a suggestion
27 f"Bewerbungslotse {VERSION}" the version is in every application file, important for later queries
71 "ki": KI_HINWEIS the notice becomes part of the application file and of the response

Step 2 – check the change.

# on werk1
git -C ~/lotse diff --stat

Expected:

 app.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Step 3 – change into the repository.

# on werk1
cd ~/lotse

Step 4 – build the pre-release.

# on werk1
podman build -t werk1:5000/bewerbungslotse:1.1.0-rc1 .

Expected (excerpt – the lines with Using cache and the intermediate IDs are shortened):

[2/2] STEP 5/10: COPY --from=bau /app/pakete /app/pakete
--> Using cache ea462e625d90abe56baf8fc29a9a3b3418d739b87b6443b8356b25628559a7a1
[2/2] STEP 6/10: COPY app.py security.txt ./
--> 16805b4f7839
[2/2] STEP 7/10: ENV PYTHONPATH=/app/pakete
[2/2] STEP 8/10: USER 10001:10001
[2/2] STEP 9/10: EXPOSE 8080
[2/2] STEP 10/10: CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:8080", "--timeout", "300", "--worker-tmp-dir", "/tmp", "app:app"]
[2/2] COMMIT werk1:5000/bewerbungslotse:1.1.0-rc1
Successfully tagged werk1:5000/bewerbungslotse:1.1.0-rc1
88fd3ad1ba88510e5024a42f992446ee512271318503a7ad9b8d2c7476007a5e

What you see: Everything up to step 5 comes from the cache; only COPY app.py is new. The packages are unchanged, so the parts list changes only in your own program. Without --pull=always, Podman didn’t reload the base image either. For a pre-release that is fine, for the release on Day 12 it is not.

Step 5 – push the pre-release to the registry.

# on werk1
podman push werk1:5000/bewerbungslotse:1.1.0-rc1

Expected (excerpt):

Copying config sha256:88fd3ad1ba88510e5024a42f992446ee512271318503a7ad9b8d2c7476007a5e
Writing manifest to image destination

Step 6 – start the pre-release in your own operation. The chart stays as it is. You replace the image with --set only for this upgrade. A pre-release gets no entry in values.yaml, no signature and no customer.

# on werk1
helm upgrade lotse ~/lotse/chart -n lotse --set-file lotse.adminPasswort=$HOME/geheim/admin-passwort --set lotse.image=werk1:5000/bewerbungslotse:1.1.0-rc1 --wait --timeout 5m
  • --set lotse.image=…: overrides the value from values.yaml only for this upgrade.

Expected:

Release "lotse" has been upgraded. Happy Helming!
NAME: lotse
LAST DEPLOYED: Fri Dec  4 07:56:18 2026
NAMESPACE: lotse
STATUS: deployed
REVISION: 13
DESCRIPTION: Upgrade complete
TEST SUITE: None
NOTES:
Bewerbungslotse 1.0.2 (Chart 1.0.3) ist installiert.

Hersteller:      Beispielwerk GmbH
Sicherheit:      [email protected]
Updates bis:     12/2032
Anleitung:       helm show readme <chart>

Do you notice something in the NOTES? Hold on to that thought; the diagnosis task comes back to it.

Step 7 – ask which version is running.

# on werk1
curl -s http://10.43.146.193:8080/gesund

Expected:

{"status":"ok","version":"1.1.0-rc1"}

Step 8 – send an application.

# on werk1
curl -s -X POST -H "Content-Type: application/json" --data @kurs/00/bewerbung-mara.json http://10.43.146.193:8080/api/bewerbungen -o kurs/10/antwort-1.1.0-rc1.json

Step 9 – read the response.

# on werk1
jq . kurs/10/antwort-1.1.0-rc1.json
  • .: the whole document, indented.

Expected:

{
  "bewertung": {
    "begruendung": "Die Bewerbung zeigt klare, relevante Erfahrung in Linux-Administration und Kubernetes mit konkreten Tools wie k3s, RKE2, Ansible und Helm-Charts, was die Stelle sehr gut passt.",
    "passung": 5
  },
  "ki": {
    "art": "Vorschlag eines KI-Systems, keine Entscheidung",
    "erzeugt": true,
    "modell": "qwen3:4b-instruct",
    "system": "Bewerbungslotse 1.1.0-rc1"
  },
  "name": "Mara Klein",
  "nummer": "ff85a953",
  "stelle": "Linux-Administratorin (m/w/d) mit Kubernetes-Erfahrung"
}

What you see: The assessment and justification are unchanged, and the block ki is added. Flask sorts the keys alphabetically, which is why art comes first. HR software that processes application files further can now use .ki.erzeugt to recognise automatically that the score comes from an AI system.

Step 10 – commit. The pre-release gets a commit, but no tag. Only the release is tagged.

# on werk1
git -C ~/lotse add app.py doku/ki-einstufung.md
# on werk1
git -C ~/lotse commit -m "1.1.0-rc1: KI-Ausgaben gekennzeichnet (Art. 50 AI Act), Einstufung als Hochrisiko-KI-System"
# on werk1
git -C ~/lotse log --oneline -1

Expected:

ba3cbb8 1.1.0-rc1: KI-Ausgaben gekennzeichnet (Art. 50 AI Act), Einstufung als Hochrisiko-KI-System

Back to the home directory:

# on werk1
cd

Remember: The labelling belongs in the output itself, not only in the instructions. Only then does every system and every person who later sees the application file know that an AI system assessed it.

Save your progress? Sign up for free

Diagnosis task

After your upgrade, a colleague checks what is running in the department. She asks Helm:

The symptom:

# on werk1
helm list -n lotse

Expected:

NAME    NAMESPACE   REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
lotse   lotse       13          2026-12-04 07:56:18.275442906 +0000 UTC deployed    bewerbungslotse-1.0.3   1.0.2

“Running 1.0.2, everything as yesterday”, she writes in her report. Is that true? Write down what you would check before you read on.

Solution path.

Step 1 – ask the service itself.

# on werk1
curl -s http://10.43.146.193:8080/gesund

Expected:

{"status":"ok","version":"1.1.0-rc1"}

Step 2 – look at the image in the Deployment.

# on werk1
kubectl -n lotse get deploy lotse -o jsonpath="{.spec.template.spec.containers[0].image}{\"\n\"}"

Expected:

werk1:5000/bewerbungslotse:1.1.0-rc1

Cause: APP VERSION in helm list is not a measured value, but the field appVersion from Chart.yaml. Helm doesn’t know which image is really running. With --set lotse.image=… you replaced the image without changing the chart, so Helm still shows 1.0.2. Your NOTES.txt from Day 9 uses the same source ({{ .Chart.AppVersion }}), which is why it also said “1.0.2” after the upgrade.

Fix: For reports, notifications and files, what counts is what is running: the version from /gesund and the image digest in the Deployment. For the release on Day 12 you raise appVersion, the image tag and VERSION in app.py together, and then all three sources agree again. A pre-release with --set remains an exception in the lab.

Remember: helm list shows what is in the chart, not what is running in the pod. Whoever reports a version asks the service or reads the digest.

Challenge

From version 1.1.0-rc1 on, every new application file carries the block ki. The older application files were assessed by the same model, but don’t carry it.

  1. Count how many application files in operation have no labelling, and name their numbers.
  2. Consider what this means for a deployer who has to give an explanation under Article 86.

Solution.

Step 1 – fetch a fresh export.

# on werk1
curl -s -u admin -o ~/kurs/10/export-2.json http://10.43.146.193:8080/api/admin/export

Step 2 – count all application files.

# on werk1
jq 'length' ~/kurs/10/export-2.json

Expected:

4

Step 3 – count the application files without labelling.

# on werk1
jq '[.[] | select(.ki == null)] | length' ~/kurs/10/export-2.json
  • select(.ki == null): only application files in which the field ki is missing; jq returns null for a missing field.
  • [ … ] | length: collect the matches in a list and count them.

Expected:

3

Step 4 – print their numbers.

# on werk1
jq -r '.[] | select(.ki == null) | .nummer' ~/kurs/10/export-2.json

Expected:

270969b6
7aeb966e
b0ef4bd7

What you see: Three of four application files were assessed by AI, but don’t say so. A deployer who relied only on the field would tell Jonas, if he asked, that his application file was created without AI. Wrong.

For the answer to question 2 there are two clean ways: either you note in the instructions for use that all application files before 1.1.0 were assessed by the model, or you add the block to the old application files once, with a note that it was added afterwards. You take the first way on Day 14, when you write the instructions for use under Article 13. Silently changing an application file as if it had always had the note, on the other hand, would be a falsification of your own records.

Remember: A new labelling applies from the moment it is introduced. For everything before that, you need an honest rule, not a silent touch-up.

Save your progress? Sign up for free

Checkpoint

# on werk1
curl -s http://10.43.146.193:8080/gesund

Expected:

{"status":"ok","version":"1.1.0-rc1"}
# on werk1
git -C ~/lotse log --oneline --decorate -2

Expected:

ba3cbb8 (HEAD -> main) 1.1.0-rc1: KI-Ausgaben gekennzeichnet (Art. 50 AI Act), Einstufung als Hochrisiko-KI-System
4dbb9e1 (tag: chart-1.0.3) Technische Dokumentation 1.0.2 (Anhang VII CRA), Chart 1.0.3 mit Nutzerinformationen
# on werk1
grep Ergebnis ~/lotse/doku/ki-einstufung.md

Expected:

- Ergebnis: Hochrisiko-KI-System.
# on werk1
jq -r .ki.system ~/kurs/10/antwort-1.1.0-rc1.json

Expected:

Bewerbungslotse 1.1.0-rc1

And the port forward from Drill 2 has ended: terminal 2 shows the command prompt again.

Test yourself

  1. How do you recognise in the code that the Lotse is an AI system within the meaning of Article 3, point 1 and not ordinary rule-based software?
  2. A provider says: “Our system only prepares, the human decides.” What do you measure to check this?
  3. Why doesn’t the exception under Article 6(3) help the Lotse even if it only prepared?
  4. Werkstatt Nord uses the Lotse under its own name as “Nord-Recruiter”. What changes?
  5. Why can’t you expect documentation under Article 53(1), point (b) from the publisher of qwen3:4b-instruct, and what follows from that for you?
  6. helm list shows APP VERSION 1.0.2, /gesund reports 1.1.0-rc1. What do you write in a notification?

Answers:

  1. Nobody wrote the assessment rule. app.py only describes the goal to the model (lines 19–22), and the model infers the score.
  2. Whether the output contains an assessment that can be used for filtering. With the Lotse, only one of three application files remains with passung >= 4; that is filtering under Annex III, point 4(a).
  3. Because it performs profiling: it evaluates automatically how well a person is suited for a job. Under the last sentence of Article 6(3), an Annex III system that performs profiling is always high-risk.
  4. Under Article 25(1), point (a), Werkstatt Nord is then considered a provider, with all provider obligations. Under paragraph 2, Beispielwerk GmbH must cooperate with it and supply the necessary information.
  5. The model is under a free licence with public weights, and Article 53(2) exempts such models from these obligations. How well the model judges applications, you have to measure yourself as the provider of the overall system.
  6. The version that is running: 1.1.0-rc1, proven by /gesund and the image in the Deployment. APP VERSION is only the value from Chart.yaml.

Interview note

“Is applicant screening with a language model a high-risk system?” A good answer starts with Annex III, point 4(a), checks the exception under Article 6(3) on the output (score and filter, or only preparation) and ends with profiling, which rules out the exception. Whoever also knows the deadlines after the Digital Omnibus (Annex III from 2 December 2027), cleanly separates the roles under Article 3 and Article 25 and knows that free models don’t have to supply documentation for downstream providers under Article 53(2) shows that they have read the legal text and not just the summary.

Enterprise note

Larger organisations keep an AI register: a list of all AI systems in use with purpose, classification, role, model and responsible person. New purposes go through an approval board, because even a change of the intended purpose (Article 25(1), point (c)) can turn a harmless system into a high-risk system and a deployer into a provider. In Germany, HR software also requires the co-determination of the works council (§ 87 Abs. 1 Nr. 6 BetrVG, the German Works Constitution Act), and Article 26(7) requires informing workers’ representatives before use at the workplace. Under Article 4, providers and deployers also take care of the AI literacy of their staff; in the version amended by the Omnibus, they “take measures to support the development of AI literacy” without having to guarantee a specific level.

Summary

  • An AI system infers from inputs how to generate outputs (Article 3, point 1). In the Lotse, app.py only describes the goal, and the model gives the score.
  • Annex III, point 4(a) names analysing, filtering and evaluating job applications. The Lotse demonstrably filters.
  • You check the exception under Article 6(3) on the output. Profiling always rules it out.
  • Roles: Beispielwerk = provider (and deployer in its own organisation), customers = deployers, whoever changes the name or purpose becomes a provider (Article 25). Free models are exempt from the documentation obligations under Article 53(2).
  • Deadlines under Regulation (EU) 2026/1744: Annex III from 2 December 2027, Article 50 since 2 August 2026.
  • The labelling belongs in every output. For application files from before, you need an honest rule.
  • helm list shows appVersion from the chart, not the running image.

Commands at a glance

Command Purpose
grep -n -A3 "<pattern>" <file> match with the following lines
kubectl -n <ns> exec deploy/ollama -- ollama list loaded models
kubectl -n <ns> exec deploy/ollama -- ollama show <model> size, parameters, licence of the model
curl -s -u admin -o <file> <url>/api/admin/export export all application files
jq -r '.[] \| select(.bewertung.passung >= 4) \| .name' <file> filter like an HR department
kubectl -n <ns> port-forward deploy/ollama 11434:11434 tunnel to the model, local only
curl -s http://localhost:11434/api/chat --data @<question.json> -o <answer.json> query the model directly
jq -r .message.content <answer.json> read the model’s answer
podman build -t <image>:<rc> . / podman push <image>:<rc> build and store a pre-release
helm upgrade … --set lotse.image=<image>:<rc> test a pre-release without changing the chart
kubectl -n <ns> get deploy <name> -o jsonpath="{.spec.template.spec.containers[0].image}" which image is really running
jq '[.[] \| select(.ki == null)] \| length' <export> count application files without labelling

Contents

More