A prompt can ask for a heading outline and meaningful lists, but semantic structure exists in the rendered document. The generation contract should specify the content hierarchy, allowed elements, and fields that must keep their relationships. A heading styled with bold text is not a heading; a row of spaces is not a data table. For an operational notice, request a concise heading, paragraphs for context, a list for route changes, and a structured data source for a schedule. The renderer, not the model, owns final markup. Inspect its document tree and keyboard order. If the publishing surface cannot express required table headers or media alternatives, change the template or attach a suitable equivalent before release.
Semantic output prompts: verify structure after generation
Operational case
The Line K assistant produces a timetable as columns padded with spaces. It looks aligned in a desktop preview, but its stop and time values lose their relationship when read linearly. The editor instead sends typed stop and departure records to the site renderer, which builds row and column headers. The assistant drafts a heading outline and a short route-change list. A reviewer checks that the bulletin has one clear topic heading, that nested sections match the content, and that a keyboard user reaches the schedule after the disruption summary rather than through an unrelated control.
Content contract: title; diversion summary; affected stops list; schedule rows.
Typed row: stop=Cedar; departure=08:47; service=shuttle.
Renderer: heading hierarchy + real list + header-associated schedule.
Gate: inspect document tree and keyboard reading order.Performance and operating cost
For N content nodes, a structural tree walk is O(N) time and O(H) stack space for nesting depth H; checking human meaning still requires editorial review. Typed schedule rows prevent the model from inventing spacing as a presentation format. Automated checks can detect missing heading elements or header associations, but they cannot decide whether 'Service update' is descriptive enough for this particular page. Keep a small template test with empty, one-row, and long schedules. Recheck the rendered page after CSS changes because visual order and reading order can drift apart.
Common Mistakes
- Do not call bold text a semantic heading.
- Do not serialize a schedule as space-padded prose.
- Do not assume the prompt alone determines the final document tree.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Generated output: validate again at the destination boundary
- HTML headings and paragraphs: expose a readable outline without styling tricks
- HTML data tables: name row and column relationships explicitly
- HTML complex tables: connect each value to all applicable headers
- Image alternatives: prompt for purpose, then check the image
- Caption and transcript prompts: keep timing, speakers, and sound evidence
- Plain-language prompts: simplify without losing conditions
- Accessible output evaluations: measure failures by artifact and user task
- Project: release an accessible transit disruption alert
- Accessible prompt output decisions
Continue with: Screenshot prompts: separate pixels from behavior.
Continue with: Editable report prompts: inspect structure and rendered pages.
Continue with: Accessibility prompts: check semantics and control names.
