Key takeaways
- ✓An AI inventory is a company's ingredient list: each system is a dish, and the models inside it are the ingredients. When a provider retires a model, the list tells you which systems to fix. Governing AI takes four things (a list, a launch gate, an incident procedure, a review of every provider), and the list comes first.
- ✓The documentation, read by gpt-5.4-mini, found 51 of 55 (93%). It missed models only the code names (the embedding model in three systems, a reranker in one) and listed 3 models that two READMEs mention from side tests the code doesn't run by default.
- ✓A code scanner that looks for text starting like a model name found 54 of 55 (98%), plus 6 look-alikes: three timing-test labels that start with tts, and gpt-5 and gpt-4o, names the code only compares against. It missed CLIP, whose name fits none of its patterns.
- ✓Records of what ran (saved answers and run logs) were never wrong, but found 13 of 55 (24%): only 6 of 16 systems save the model's name, and none records its embedding calls. My own first answer key missed tts-1, a backup voice; the scanner found it. No source is the truth: check them against each other.
- ✓A plain name like gpt-5.4-nano can point to a newer model tomorrow; a dated name like gpt-5.4-nano-2026-03-17 never changes. 6 of 16 systems save which model answered; only 1, the HR documents assistant, saves the dated version.
- ✓An AI drafted one registry card per system from the READMEs and filled 7 of 12 fields for all 16. On "does it act" and "does it affect a person" it agreed with our labels 27 of 32 times, and called the email assistant, which sends email, a system that takes no actions. Owner, business unit, risk level and review dates are left for people.
A provider tells you one of your models shuts down next month. Which of your systems would break? This chapter builds the list that answers that: an inventory of every AI system a company runs, and the models inside each one. It tries three ways to build it, scores each against a hand check of the code, and then drafts the registry that turns the list into one record card per system.
The source is Lab 17 (Governance), script 01_inventory.py, recorded in October 2026; the video uses the recorded results, no new calls. The company, Lantern Outfitters, is made up. Its 16 AI systems are real code: the earlier labs in this course, like the refund agent and the email assistant from earlier chapters. The README readings and registry drafts are recorded calls to gpt-5.4-mini. This is the first of four chapters on governance: next come risk levels, a launch checklist, and incident response.
What an inventory is
Think of a restaurant. It keeps a list of every ingredient in every dish, so when a supplier recalls an ingredient, the kitchen knows which dishes to pull. An AI inventory is that list: each system is a dish, and the AI models inside it are the ingredients.
Governing AI takes four things kept up to date: a list of every system, a gate before launch, a procedure for incidents, and a review of every outside provider. The list comes first, because the other three work from it.
The answer key
To grade each source you need the right answer first. The lab read every system's code by hand and wrote down each model it calls with its default settings: 55 entries, counting a model once for each system that uses it. The voice assistant alone uses 10.
Each source then gets three scores:
- Found: models it listed, and got right.
- Wrong: things it listed that the system doesn't use.
- Missed: models it never listed.
Three sources
| Source | Found (of 55) | Wrong | Missed |
|---|---|---|---|
The documentation (READMEs read by gpt-5.4-mini) |
51 (93%, 83–97%) | 3 | 4 |
| A code scanner | 54 (98%, 90–100%) | 6 | 1 |
| Records of what actually ran | 13 (24%, 14–36%) | 0 | 42 |
The documentation. Every system has a README. An AI read all sixteen and listed the models each one uses. It missed the embedding model (the model that turns text into numbers, so search can find similar text) in three systems, and a reranker in one: the READMEs don't name them, only the code does. It also listed three models by mistake: two READMEs mention extra runs on other models that the code doesn't call by default. Documentation only holds what someone remembered to write down.
A code scanner. A search of the code for quoted text that starts like a model name, such as gpt or tts, or a Hugging Face name with a known model family:
# inventory.py
MODEL_LITERAL = re.compile(
r"""["']((?:gpt|o[134]|chatgpt|text-embedding|whisper|tts|claude|gemini)[-\w.]*"""
r"""|[\w.-]+/[\w.-]*(?:Qwen|Llama|llama|Mistral|mistral|gemma|Gemma|Phi|phi|deberta|bge|MiniLM|e5|SmolLM)[\w.-]*)["']""")
It found almost everything, and six things it shouldn't have. Three are labels from a timing test in the voice assistant, like "tts_whole_file": they start with tts, so they look like a model. Three more are gpt-5 (twice) and gpt-4o, names the code only compares against to check which model it has. It never calls them. And it missed CLIP (openai/clip-vit-base-patch32), an image model whose name fits none of its patterns.
What actually ran. Saved answers and run logs that name the model. Not one entry was wrong: they show what really happened. But only 6 of the 16 systems save the model's name when they run, and none records its embedding calls. Accurate, but rare.
Switch between the sources and see what each got wrong, system by system:
gpt-5.4-mini read each system's README and listed the models it uses.
It missed the models only the code names (the embedding model in three systems, the reranker in one) and listed models two READMEs mention from side tests the code doesn't run by default.
| System | Models, by this source |
|---|---|
| Help assistant + SQL tool | gpt-5.4-minigpt-5.4-nanotext-embedding-3-small− cross-encoder/ms-marco-MiniLM-L-6-v2 |
| Answer grader | gpt-5.4-minigpt-5.4-nano− text-embedding-3-small |
| Chat with memory | gpt-5.4-nanotext-embedding-3-small+ gpt-4o-mini+ gpt-5.4-mini |
| Employee assistant | gpt-5.4-nano+ gpt-5.4-mini |
| Self-hosted models | Qwen/Qwen3-0.6BQwen/Qwen3-1.7BQwen/Qwen3-4BQwen/Qwen3-8Bgpt-5.4-minigpt-5.4-nano− text-embedding-3-small |
| Hardened refund agent | gpt-5.4-minigpt-5.4-nano− text-embedding-3-small |
The answer key is a hand check of each system's code. Its first version missed tts-1 in the voice assistant; the scanner found it, and these scores use the fixed key.
My own list had a hole too
The voice assistant uses ten models. By the author's notes, the first answer key had only nine: it missed tts-1, a backup voice the assistant also asks when the main one (gpt-4o-mini-tts) is slow. The scanner found it, and so did the AI reading the READMEs. The key was fixed, and every score here uses the fixed one.
So no source is the truth, not even a person checking by hand. You check them against each other.
A model shuts down next month
Back to the question. Say the model being retired is gpt-4o-mini. The scanner and the records both point to the same two systems: the email assistant and the HR documents assistant. The README reading adds a third, the chat assistant with memory, whose README only mentions the model. Try other models:
The provider is retiring a model. Which of our systems would break?
| Source | Says these systems use it |
|---|---|
| Answer key (by hand) | Email assistantHR documents assistant |
| The documentation | Email assistantHR documents assistant+ Chat with memory |
| A code scanner | Email assistantHR documents assistant |
| What actually ran | Email assistantHR documents assistant |
The scanner and the records agree on the same two systems. The README reading adds a third that only mentions the model.
The pattern holds across them: the scanner gives coverage, the records confirm what really ran where they exist, and the README reading is the one that knows about CLIP.
Which version answered?
For a recall, a label that just says "flour" isn't enough; you need the batch number. Model names work the same way. A name like gpt-5.4-nano can point to a newer model tomorrow. A dated name, like gpt-5.4-nano-2026-03-17, never changes: that's the batch number. The code asks for the name; only the reply says which dated version answered.
| Systems (of 16) | |
|---|---|
| Save which model answered | 6 |
| Save the dated version | 1, the HR documents assistant (gpt-4o-mini-2024-07-18, gpt-5.4-mini-2026-03-17, gpt-5.4-nano-2026-03-17) |
The other 15 can say "gpt-5.4-nano" at best, which is the name of whatever the provider serves today. Chapter 52 showed why the reply's dated name is the one to log.
An AI-drafted registry
The last step turns the list into a registry: one record card per system, with its purpose, its data, who uses it, and who owns it. The lab's card has 12 fields. Writing sixteen by hand is slow, so gpt-5.4-mini drafted them from the READMEs:
- It filled 7 of the 12 fields for every system: purpose, users, data it reads, data sensitivity, whether it affects a specific person, whether it takes actions, and known weaknesses.
- The other 5 were left for people on purpose, by the prompt: owner, business unit, risk level, and the last and next review dates. An AI can't decide those.
- Filled isn't the same as right. On the two fields that decide risk most, "does it take actions?" and "does it affect a specific person?", the draft agreed with our labels on 27 of 32 judgments (84%, 68–93%).
The clearest miss is the email assistant. The draft says it takes no actions; at work, it sends emails for an employee. Its README describes how it was tested (guardrails against attacks), not what it does at work, so the draft reads like a test report. The draft registry is about 2,100 words, roughly 10 minutes to read.
One record card per system, drafted from its README. The two fields that matter most for risk are “does it take actions?” and “does it affect a specific person?”. The draft and our labels disagreed on 5 of 32. Pick one:
What it does at work (the owner's line)
An email assistant that reads an employee's mail, calendar and files and sends emails on their behalf.
| Field | AI draft, from the README | Our label |
|---|---|---|
| Purpose | Measures what guardrails actually stop and what they cost against public attacks on PII, prompt injection, secret leakage, lethal-trifecta email agents, and MCP tool supply-chain changes. | · |
| Users | Lab users / practitioners running the scripts in this lab | · |
| Data sensitivity | personal | · |
| Takes actions | no | yes |
| Affects a person | no | no |
| Owner | left for a person | |
| Business unit | left for a person | |
| Risk level | left for a person | |
| Last review | left for a person | |
| Next review | left for a person | |
Our reason: an email agent that sends email for its user. The README describes the lab's experiments, not what the system does at work, so the draft reads like a test report.
Not shown: data read and known weaknesses, also drafted for all 16. The card has 12 fields; the AI filled 7 for every system, and the prompt left the 5 people fields empty on purpose.
Also in the lab
- Where to start with 200 repositories. The lab's answer: the code scanner, for coverage, checked against runtime records from an API gateway or the provider's usage reports. Those also catch AI no repository mentions: a spreadsheet plugin, a feature someone switched on in a software-as-a-service tool, staff using public chatbots (visible in expense reports, sign-in logs and network traffic, not code).
- The registry the lab ships. Script 06 writes
deliverables/ai_system_registry.mdfrom the data: models from the code (not the draft), the dated version where one was recorded, the risk levels from the next chapter, and "owner" in every field a person has to fill. A system with a blank owner field fails the launch gate (chapter 55).
What to do
- Build the list from the code, with a scanner, and read its matches: some will be look-alikes.
- Check it against records of what ran. Turn them on where they're off, or read your provider's usage logs.
- Use the documentation for what code can't say: why the system exists and who it's for.
- Save the dated model version with every answer.
- Let an AI draft the registry, then have each owner correct it, starting with "does it act?" and "does it affect a person?".
- Fill the people fields: an owner, a business unit, a risk level, review dates.
Caveats
- The company is a course. Its 16 systems are labs; their READMEs describe experiments, which is part of why the drafts read like test reports. A real company's documentation may be closer to use, or further.
- The answer key is a judgment. It lists models called with default settings; a side test run with another model doesn't count. Its first version was wrong once.
- The scanner is a quick one. A better pattern list would catch CLIP and skip the timing labels; the point is that every scanner has a pattern list, and its misses are names that don't fit.
- Runtime evidence depends on what was run. The records come from the labs' data folders, which exist only where a lab was run and saved its answers.
- Small numbers. 55 pairs and 32 judgments: the ranges in brackets are wide.
The checklist
- Run a scanner over every repository and review each match.
- Collect what ran: gateway logs, provider usage reports, saved answers with the model's name.
- Compare the two lists and chase every difference.
- Record the dated model version on every call.
- Draft one registry card per system, and have its owner confirm "acts" and "affects people".
- Fill owner, business unit, risk level and review dates, by people.
- When a provider retires a model, query the list, and keep it up to date as systems change.
Practice: score the inventory
Write the scanner, score a source against the answer key, find the systems that use a retiring model, tell a dated version from a plain name, and list the registry fields left for people. The tests use the lab's answer key and what each source listed, and expect its numbers: 51, 3 and 4; 54, 6 and 1; 13, 0 and 42; and the same two systems for gpt-4o-mini.
Quiz
1.What is an AI inventory for, in the restaurant picture?
2.The documentation, read by an AI, found 51 of 55. What did it miss, and why?
3.The code scanner found 54 of 55. What were its 6 wrong entries?
4.Records of what ran were never wrong. Why not use only them?
5.Why does the inventory need the dated model version, not just the name?
6.An AI drafted the registry from the READMEs. What should you trust it for?
Check your understanding
Try each question before opening its answer.
What is an AI inventory, and why does it come first?
A list of every AI system the company runs and the models inside each one, like a restaurant's ingredient list. The launch gate, the incident procedure and the provider reviews all start from knowing what you run.
What does each of the three sources miss?
The documentation misses what nobody wrote down (the embedding model in three systems) and adds models from side tests. The scanner adds look-alikes (timing labels, names used only in checks) and misses names that fit no pattern (CLIP). Records of what ran are accurate but exist for only 6 of 16 systems.
Your hand-checked answer key disagrees with the scanner. Who's right?
Look at the code. In the lab the first key missed tts-1, and the scanner was right. No source is the truth; differences between them are where to look.
Why save gpt-5.4-nano-2026-03-17 and not just gpt-5.4-nano?
The plain name can point to a newer model tomorrow; the dated one never changes. It's the batch number in a recall. Only 1 of the 16 systems saved it.
An AI drafted every registry card. What do you still do?
Have each owner check it, especially "does it take actions?" and "does it affect a person?" (the draft missed that the email assistant sends email), and fill the five fields only people can: owner, business unit, risk level, last and next review.
A provider retires gpt-4o-mini. How do you answer "which systems use it?"
Query the inventory: the scanner and the records both point to the email assistant and the HR documents assistant. Where a system keeps no records, turn them on or read the provider's usage logs to confirm.
Next up: Chapter 54 sorts the list by risk: risk levels under the EU AI Act, and which of these systems Europe's AI law would call high-risk.