Structured Output for Plant Systems
At a stamping plant outside Columbus, a process engineer named Maria did everything right. She used AI to draft a clean preventive-maintenance work order from a tech's shorthand notes, verified every line against the machine's model book, and produced a paragraph that read like a senior reliability engineer wrote it. Then she spent eleven minutes retyping it into the CMMS (Computerized Maintenance Management System, the software that holds every maintenance work order and repair note), because the AI handed her flowing prose and the CMMS wanted an asset ID in one box, a priority code in another, a task list in a third, and an estimated labor time in a fourth. She did this fourteen times that week. That is roughly two and a half hours of a 40 dollar-an-hour engineer spent transcribing good work from one shape into another, about 100 dollars a week, 5,200 dollars a year, on one engineer, for nothing. The AI was not the bottleneck. The shape of its output was. This lesson is about the difference between an answer that is correct and an answer your plant systems will actually accept without a human retyping it.
Why Prose Is the Wrong Shape for a Plant
A general chatbot is built to talk. Left to its defaults, it answers in paragraphs, because paragraphs are how it was trained to be helpful to a human reader. That default is exactly wrong for a plant, because almost nothing on a plant floor consumes a paragraph. The MES (Manufacturing Execution System, the software that tracks production orders, run data, and quality results) wants fields. The CMMS wants fields. The quality system wants a record with a part number, a defect code, a quantity, and a disposition, each in its own column. A SCADA historian (the system that logs time-stamped tag values from the line) wants a tag name and a value. Your morning production report wants a table. The line does not read essays.
The cost of the mismatch is not abstract, and it is not only Maria's retyping time. Every manual transcription from prose into a field is a chance to introduce a transcription error: a transposed digit in a torque value, a wrong asset ID, a defect quantity off by a factor of ten. In a quality record that a customer audits, a transcription error is not an annoyance, it is a finding. The whole point of using AI to draft a record faster collapses if the human then has to slow down and carefully retype it, and re-verify the retyped version, to avoid introducing the very errors the speed was supposed to buy back.
There is a deeper reason structured output matters that goes beyond convenience. A field is checkable in a way a sentence is not. If the AI returns a torque value in a labeled field called torque_nm, you can write a rule that says this field must be a number between 8 and 12, and the rule catches a hallucinated 45 before it ever reaches the operator. You cannot write that rule against a paragraph that says, somewhere in the middle, that the fastener should be torqued appropriately. Structure is not just the shape the system wants. Structure is what makes verification automatic instead of manual, and on a thinning crew, automatic verification is the only kind that survives a busy shift.
An answer that is correct but shaped wrong still costs a human the time and the error risk of retyping it. On the floor, the right shape is part of being right.
The Three Shapes a Plant Actually Uses
You do not need to learn a data-science vocabulary to ask for structured output. You need to know the three shapes your plant already uses every day and how to ask for each by name.
The table. Rows and columns. This is the shape for anything that repeats: a downtime log, a Pareto of defects, a shift production summary, a list of parts and their measurements. When you ask the AI for a table, you tell it the exact columns you want and the order, because a table whose columns do not match your spreadsheet is just prose with lines in it. A worked example: instead of asking for a summary of last week's downtime, you ask for a table with columns Asset, Date, Duration_Minutes, Reason_Code, and Description, in that order, one row per event. Now it pastes straight into the downtime tracker, and the Duration_Minutes column sums itself.
The form, or key-value record. One labeled value per item. This is the shape for a single record that has to land in a system: one work order, one nonconformance report, one inspection result. You name each field and the AI returns each field labeled. A work order becomes asset_id, priority, task_description, estimated_labor_hours, required_parts, safety_notes, each on its own line with its label, so the person entering it (or the integration that enters it) maps one field to one box with no interpretation.
The machine-readable record, usually JSON. JSON (JavaScript Object Notation, a simple text format of labeled fields that software reads directly) is the shape you ask for when a computer, not a human, will consume the output. If your CMMS or MES has an import function or an integration, it almost certainly speaks JSON or CSV (Comma-Separated Values, the plain table format every spreadsheet opens). You do not need to write code to benefit from this. You need to know that when you say return this as JSON with these exact field names, you get output that an integration can ingest without a human in the middle at all. That is the shape that finally killed Maria's eleven minutes: the AI returns the work order as JSON whose field names match the CMMS import template, and the record loads itself.
The honest payback math on Maria's case: at fourteen work orders a week, moving from retyped prose to a JSON record that matches the import template removed roughly two and a half hours of weekly transcription. Over a year, that is about 130 hours, roughly 5,200 dollars of engineering time on one person, redirected from retyping to actual reliability work, with the transcription-error risk removed as a bonus. Multiply by a plant with six engineers doing similar drafting and the structured-output discipline alone is worth more than 30,000 dollars a year before counting the avoided quality findings.
How to Ask, and Make It Stick
Getting structured output is mostly a matter of being specific and refusing to accept drift. There are four moves, each of which a working engineer can do without any technical background.
Name the schema, do not describe it. A schema is just the list of fields and what each one holds. Vague requests get vague shapes. Do not say give me the work order in a structured format. Say return exactly these fields: asset_id (string), priority (one of Low, Medium, High, Critical), task_description (string), estimated_labor_hours (number), required_parts (list of strings). When you spell out the field names, the allowed values, and the type of each, the AI has nothing to improvise, and two different runs produce the same shape, which is what makes the output reliable enough to build a workflow on.
Constrain the values, not just the fields. The shape is half the battle; the allowed contents are the other half. If priority can only be one of four words, say so, because a free-text priority field that sometimes says High and sometimes says urgent and sometimes says ASAP cannot be sorted, filtered, or imported. Enumerations (a fixed list of allowed values) are your friend. The same goes for units: specify torque_nm, not torque, so the model cannot quietly hand you inch-pounds. A field that names its unit is a field that cannot drift between unit systems, which is one of the classic ways a spec gets corrupted between the drawing and the floor.
Give it the empty template to fill. The single most reliable trick is to paste the blank structure and tell the AI to fill it in without changing the field names or adding fields. If your CMMS export has a header row, paste that header row and say populate one row per event using exactly these columns. The model is far better at filling a template you provide than at inventing a structure that happens to match yours. This also future-proofs you: when the CMMS template changes, you change the pasted template, not a paragraph of instructions.
Demand it say I do not know in the schema. Structured output has a specific failure mode that is more dangerous than messy prose: the model fills every field because the shape has a slot for it, even when it does not have the value. An empty required_parts list is honest. A required_parts list with an invented part number because the field looked lonely is a hallucination wearing the costume of a clean record. Tell the model explicitly that if it does not have a value, the field must be empty or marked unknown, never guessed. A blank field is a question for a human. An invented field is a trap for an auditor.
The Hallucination Hides Better in a Clean Record
Here is the counterintuitive risk that makes this lesson more than a formatting tip. A well-formatted record is more dangerous than messy prose, because it looks more trustworthy. When the AI hands you a paragraph, your skepticism is already engaged: prose feels like a draft. When it hands you a crisp JSON record with every field neatly populated and the right units, it looks like it came out of a validated system, and a tired engineer on the back half of a double is far more likely to wave it through. The shape that makes the output easy to import is the same shape that makes a wrong value easy to miss.
This is the program's cardinal rule, restated for structured output: the customer audits you, not the model, and a defect code or a torque spec that is wrong is wrong no matter how clean the box it sits in. Consider a worked example. The AI returns a nonconformance record as a tidy form: part_number 4471-A, defect_code POR (porosity), quantity 40, disposition rework. It looks perfect. But the disposition field says rework, and on a safety-critical casting your quality plan requires scrap, not rework, for porosity above a threshold. The clean form did not catch that, because the form has no judgment. The form just held the value the model guessed. A human who trusts the formatting and skips the disposition check has just let the model make a disposition decision, which is exactly the decision the customer audits and the human must own.
The defense is to put the verification where the structure makes it cheap. Because the output is fielded, you verify field by field against the source of truth: asset_id against the asset register, torque_nm against the drawing, defect_code against the defect list, disposition against the quality plan. Structured output does not remove the verification step. It makes the verification step a fast, mechanical checklist instead of a hunt through prose, which is the whole reason it is safer when used with discipline and more dangerous when used without it.
A second worked example shows how a generic automated rule can pass a value that human judgment still has to catch. Suppose the import tool enforces a rule that torque_nm must fall between 8 and 12, and the AI returns 10 for a fastener. The rule passes it, the field is green, and a hurried engineer moves on. But the controlling drawing for this specific part calls for 8 to 9, not the family-wide 8 to 12, because this variant uses a softer gasket. The generic range rule cannot know that; only verification against the specific drawing catches it. This is the line the lesson keeps drawing: the structure and the rules catch the dumb errors fast, and that is real value on a thin crew, but the spec-specific, part-specific, safety-specific judgment still belongs to a human reading the actual drawing. Structure shrinks the verification work; it never abolishes the part that requires a person.
A Checkable Record Is a Verifiable Record
The payoff of fielded output is that verification can be partly automated. Once the AI returns torque_nm as a labeled number, a simple rule (the field must be between 8 and 12) runs in the spreadsheet or the import tool and flags anything out of range before a human even looks. The human still owns the judgment calls the rules cannot make, the disposition, the root cause, the safety note, but the dumb errors, the out-of-range number, the missing required field, the priority that is not one of the four allowed words, get caught by the structure itself. On a crew short three techs, the difference between a record you have to read carefully and a record that pre-flags its own problems is the difference between a verification step that happens and one that gets skipped.
Building It into a Repeatable Workflow
One well-formatted record is a parlor trick. The value shows up when the shape becomes a standing part of how the plant works, which connects this lesson directly to the system-prompt and verification-checklist lessons around it.
Put the schema in the system prompt. A system prompt is the standing instruction the model gets before every conversation. Instead of re-typing the work-order schema every time, you bake it in once: this assistant always returns work orders as JSON with exactly these fields, these enumerations, and these units, and marks any unknown field as unknown rather than guessing. Now every engineer on every shift gets the same shape, the shape the CMMS accepts, without anyone having to remember the format. The structure stops depending on whether a busy person remembered to ask for it.
Match the schema to the real import template, exactly. The fields you ask the model for must be the fields your CMMS, MES, or quality system actually imports, by name and by allowed value. This is a half-day of unglamorous work: pull the import template, list its columns and their valid entries, and make the AI schema mirror it. Skipping this step is the most common reason a structured-output project still ends in retyping, because almost-matching fields still need a human to reconcile them. Exactly-matching fields load themselves.
Keep the human signature on the record, not on the formatting. The goal is to move the human's scarce attention off the mechanical work (the shape, the retyping, the dumb errors) and onto the judgment that actually requires a person: is the disposition right, is the root cause sound, is the safety note complete and correct. When the structure handles the shape and the rules catch the dumb errors, the engineer's verification time concentrates where the customer's auditor will concentrate. That is the trade the whole program is built on: AI and structure handle the throughput, the human handles the judgment, and the named human still signs the record that goes to the customer.
Maria's plant made exactly this move. The work-order schema went into a shared system prompt that matched the CMMS import template field for field, with enumerated priorities, named units, and an explicit instruction to leave unknown fields blank. Her eleven minutes of retyping per work order went to zero, the transcription errors went to zero, and her verification time dropped because the import tool pre-flagged out-of-range values. The 5,200 dollars a year she had been spending on transcription turned into reliability work. The AI did not get smarter. The output got the right shape, and the right shape is what a plant can actually use.
Key Takeaways
- A correct answer in the wrong shape still costs a human the time and error risk of retyping it. On the floor, the right shape (a field, a table, a record) is part of being right, not a nicety.
- Prose is the wrong default for a plant: the MES, CMMS, quality system, and historian all consume fields and tables, and every manual transcription from prose into a field is a chance to introduce an audit finding.
- Learn the three shapes by name: the table (rows and columns for anything that repeats), the form or key-value record (one labeled value per field for a single record), and the machine-readable record like JSON or CSV (for when software, not a human, consumes the output).
- Ask precisely: name the schema and its field names, constrain values with enumerations and named units (torque_nm, not torque), paste the blank template for the model to fill, and require unknown fields to be left blank rather than guessed.
- A clean record hides a hallucination better than messy prose does, because neat formatting looks validated; an invented part number in a tidy field is more likely to be waved through than the same guess in a paragraph.
- Structure makes verification cheap and partly automatic: a labeled torque_nm field can be range-checked by a rule, while a sentence cannot, so the human's attention concentrates on judgment calls like disposition and root cause.
- Matching the schema exactly to the real CMMS or MES import template, field for field and value for value, is the half-day of unglamorous work that separates a project that loads itself from one that still ends in retyping.
- The payback is concrete: Maria's plant turned roughly 5,200 dollars a year of one engineer's transcription into reliability work and removed the transcription-error risk, simply by giving good output the right shape and putting the schema in a shared system prompt.
Skill.re