The Database Behind the Art
What Happens After an Image Passes the Audit

By L. M. Hawkes · HawkesAdventures.com
The previous four articles in this series covered the problem, the taxonomy, the pipeline, and the prompts. If you’ve followed along, you know how a historically accurate AI-generated image gets made – the structured generation, the layered audit, the corrective re-prompting loop that turns failures into intelligence.
This article covers what happens next.
Passing the audit is not the end of the process. It is the beginning of a different one. An image that has cleared the historical accuracy bar and earned a four or five star showcase rating still needs to be classified, described, cataloged, and made commercially useful. At catalog scale – hundreds of images across multiple series, historical periods, and use cases – that work cannot be done casually. It requires a system.
This article describes that system: the metadata architecture behind the Vault of Ages catalog. It is the least glamorous part of the workflow and the part most people would never build. It is also the part that makes the catalog a product rather than a folder of images.
Why Metadata Matters at Scale
A single well-labeled image is a convenience. A consistently labeled catalog of several hundred images is an asset.
The difference is findability, usability, and commercial clarity. A buyer licensing images for a tabletop RPG supplement needs to find images by scene type, subject, composition, and mood – not by scrolling through thumbnails. A publisher licensing for interactive fiction needs to know which images are portrait-eligible, which are print-eligible, and which carry commercial use rights. A developer building a configurator interface needs structured data, not filenames.
Without consistent metadata, a large catalog is difficult to search, difficult to license, and difficult to present. With it, the same catalog becomes a structured commercial archive that can be queried, filtered, configured, and delivered programmatically.
The metadata system behind the Vault of Ages was built to serve all of those use cases simultaneously.
The Database Architecture
Every image in the catalog resolves to a record in a central database table – wp\_hawkes\_images – with a unique image ID as the authoritative identifier. The image ID is the anchor for everything else. Filenames, variants, and derivative files all resolve back to the same database record. The database is the source of truth; the filename is just a pointer.
This design decision has a practical consequence that matters at scale: you can rename files, generate new variants, resize for different platforms, and create derivative formats without any of those operations affecting the underlying record. The image remains the same cataloged asset regardless of what happens to the files that represent it.
The image ID itself follows a strict format – alphanumeric only, no hyphens, no underscores. This is not aesthetic preference. It is a data integrity rule that prevents a category of lookup failures that occur when ID formats are inconsistent across a large dataset.
What Gets Recorded
Every image record carries two categories of metadata: scalar fields and child table entries.
Scalar fields describe the image as a single entity – its primary subject, scene type, environment, composition, lighting style, shot distance, view angle, orientation, aspect ratio, and a museum-style factual description. They also carry accessibility data – alt text written to literal accessibility standards, not repurposed from the description field – and a set of commercial eligibility flags covering showcase status, print eligibility, portrait eligibility, marketing eligibility, and art pack inclusion.
The distinction between description and alt text is enforced as a system rule, not a suggestion. A description is factual prose about what the image depicts. Alt text is a literal accessibility statement of what a screen reader needs to convey. They serve different functions, they are written differently, and they are never interchangeable.
Child table entries capture the multi-value attributes that don’t fit cleanly into scalar fields: keywords, moods, historical elements, secondary subjects, notable objects, context tags, audience assignments, and use cases. Each of these lives in its own table, linked to the image ID, and each is validated against a canonical vocabulary of allowed values.
The Validation System
Metadata at catalog scale degrades without enforcement. Fields get left blank. Values get entered inconsistently. Enum fields accumulate variants – “gladiator,” “Gladiator,” “GLADIATOR,” “roman gladiator” – that are semantically identical but structurally incompatible with search and filtering.
The metadata system uses a three-tier validation model to prevent this.
Tier 1 – Direct visual validation. Fields that can be verified against the image itself – subject, composition, lighting style, environment, architecture, scene type – are validated by direct comparison between the metadata record and the actual image content. A record that says the primary subject is a Roman officer when the image clearly shows a gladiator is a proposed update, not an acceptable discrepancy.
Tier 2 – AI-suggested fields requiring human review. Commercial fields – audience assignment, showcase status, print eligibility, marketing eligibility – cannot be verified visually. The system generates proposed values for these fields and marks them explicitly as AI-suggested, requiring human confirmation before they enter the record. The system never auto-applies commercial metadata. It proposes; a human decides.
Tier 3 – Structural and database validation. Image ID format compliance, NULL detection, blank detection, enum validity – these are checked mechanically against schema rules. An image ID containing a hyphen fails format validation regardless of what the image shows. A required field containing NULL is flagged for resolution regardless of how good the image is.
The validation system produces two outputs: a structured JSON report of every field’s status with explicit reasoning, and a set of SQL statements for manual review. Nothing is auto-executed. Every proposed change is human-reviewed before it touches the database.
The Anti-Hallucination Design
The metadata system was built with one failure mode as the primary design constraint: the tendency of AI systems to invent values for fields they cannot assess.
An AI evaluator asked to fill in metadata for an image will produce values for every field – including fields where the image provides no evidence. Footwear not visible in the image becomes “Roman caligae” because that is the most plausible Roman footwear. Architecture partially out of frame becomes a specific architectural type because the evaluator inferred it from context. These inferences are frequently wrong, and at catalog scale, frequently wrong compounds into systematically wrong metadata.
The system prevents this through a strict missing-value protocol. If a value cannot be determined from visible image evidence, the correct entry is “UNSPECIFIED” – not a guess, not an inference, not the most plausible option. UNSPECIFIED is a valid, searchable state. An invented value that is wrong is not.
This same philosophy runs through every layer of the metadata system, just as it runs through the audit prompt. The principle is consistent: visible evidence overrides inference. Inference without visible evidence produces no entry.
Why This Level of Infrastructure
The honest answer is: because the catalog is a commercial product, not a creative project.
A creative project can live in a folder with descriptive filenames. A commercial catalog that needs to support licensing queries, configurator interfaces, search and filtering, audience targeting, and derivative use tracking cannot. The infrastructure is not the interesting part of this work – the images are, the history is, the stories the gamebooks tell are. But without the infrastructure, none of those things are commercially viable at scale.
The Vault of Ages Art Pack Configurator at HawkesAdventures.com is the interface that sits on top of this system. It is what makes the catalog navigable and licensable for the tabletop RPG designers, game developers, interactive fiction writers, and historical content creators who are the catalog’s primary commercial audience. The metadata is what makes the configurator possible.
The Broader Principle
Every creative project that generates assets at scale eventually faces the same problem: the assets outgrow the system used to manage them.
A folder of 50 images is manageable. A catalog of 500 images covering multiple historical periods, dozens of scene types, hundreds of subjects, and multiple licensing tiers is not – not without structured data behind it. The time to build that structure is before the catalog grows past the point where retroactive organization becomes the project itself.
Build the metadata system before you need it. The pipeline article said the same thing about the audit prompt: build it before you generate the first image, not after you’ve generated a thousand. The same principle applies here.
The final article in this series takes the pipeline, the prompts, and the infrastructure described across this series and asks the question that matters for anyone who wants to apply this work to their own historical period: what does AI get wrong about Vikings, feudal Japan, and ancient Greece – and how does the same three-stage approach fix it?
L. M. Hawkes writes cinematic, historically grounded interactive gamebooks drawing from the warrior traditions of Rome, Greece, Japan, the Viking Age, and the great battles of antiquity. The Vault of Ages Art Pack Configurator – a curated catalogue of historically accurate cinematic illustration – is available at HawkesAdventures.com under personal and commercial licenses.
This is Part 5 of a 6-part series.
Previously, Part 4: The Full Prompts
Coming next week, Part 6: The Pipeline Works for Any Historical Period – adapting the workflow for Vikings, feudal Japan, and ancient Greece.
Tags: Artificial Intelligence · Database Design · History · Game Design · Digital Publishing · Workflow · Indie Creator · Historical Fiction
