learning-it by example

#214 Data governance 5.8 min

Build an AI Model Register and Risk Score

We listed seven AI systems. A short script found two more nobody had listed. Here is the register.

1. In the AI register example, why is the CV screener rated HIGH when its points total is only 6?
2. What did the scan of the nine repositories find that the register of seven systems had missed?
3. Which kinds of AI use does the video say the package scan would miss?
4. What makes risk.py exit with code 1, so a build pipeline can use it?
5. Why does the video read the register with safe load rather than plain load?

Practice only: nothing is saved and no score counts towards anything. Each answer comes with the reason.

  1. Clear the overdue review

    Copy the code folder first. In register.yaml, change the next_review date of web-chat from 2026-09-15 to 2027-06-01, then run python risk.py register.yaml. Predict first what happens to the score and the band of web-chat. When I ran it, web-chat still showed high 7, but the overdue note was gone.

    A hint

    The review date is checked against the as_of date in the file. It does not feed into the points.

  2. Take away the invoice reader's freedom

    In register.yaml, change the autonomy of invoice-reader from acts to approves, then run python risk.py register.yaml. Work out the new points first from the scoring table in risk.py. When I ran it, invoice-reader scored 2 and was low, and the web chat and CV screener lines did not change.

    A hint

    In risk.py, POINTS has the numbers for data, autonomy and audience. Add the three together.

  3. Register the marketing site

    Add a new system at the end of the systems list in register.yaml, copying the layout of the others. Give it an id, a purpose, repo: marketing-site, an owner that contains an at sign, data: none, autonomy: suggests, audience: staff and a next_review date in the future. Run python risk.py register.yaml and then python scan.py. When I did this, the register had 8 systems with 0 errors and the scan listed only data-lab: 1 repository without an entry.

    A hint

    The scan compares the repo field of each register entry with the repository names in repos.yaml.

  4. Break a register on purpose

    In broken.yaml, change the owner of tagger from sam@example.com to just sam. Run python risk.py broken.yaml and then print the exit code with echo %errorlevel% in cmd, or echo $LASTEXITCODE in PowerShell. When I ran it, both systems had errors, tagger showed owner is not an email address, and the exit code was 1.

    A hint

    Look at the check for the at sign in the problems function.

These tasks are for you to try on your own machine. Nothing is checked or saved.

What this does not show

Made-up company and files. The scan only matches seven package names in a hand-typed list of requirements. The score is a teaching model, not a legal assessment under the EU AI Act.

Up next in Data governance

More in Data governance

All Data governance videos

Related videos