FAQ

How do I create labels for near-miss events from MES records?

Usually, you do not create trustworthy near-miss labels from MES data alone.

MES records can help you identify candidate events, but a true near-miss label normally requires context that MES often does not capture well: what almost happened, who noticed it, whether controls prevented impact, whether the condition was safety-, quality-, or production-related, and whether the event was already handled in another system such as QMS, EHS, maintenance, or shift logs.

What MES can do reliably

Use MES to generate a pool of candidate records for review, not final labels by itself. Depending on your configuration, useful MES signals may include:

  • equipment alarms and interlocks
  • operator overrides or bypass events
  • recipe or parameter excursions that were corrected before release
  • holds, quarantine states, and temporary disposition actions
  • rework loops, aborted operations, and restart patterns
  • scrap entered and then reversed after investigation
  • manual data edits, backfilled entries, or out-of-sequence transactions
  • exception comments in electronic travelers or work instructions
  • abnormal cycle time or downtime sequences around a lot, serial number, or work order

These are proxies. Some will be true near-misses, many will not. If you treat them as labels without review, you will introduce noise and bias.

Practical labeling approach

  1. Define near-miss criteria first. Be explicit about scope, severity threshold, and exclusion rules. If operations, quality, EHS, and engineering use different definitions, your labels will not be stable.
  2. Map the event sources. MES is usually one source among several. Add QMS/NCR, CAPA, maintenance, historian, SCADA, alarm logs, shift handoff notes, and operator-entered comments where available.
  3. Create candidate-event rules. Start with transparent logic such as alarm plus operator override plus hold within 30 minutes, or parameter excursion corrected before completion.
  4. Review and adjudicate samples with subject matter experts. This step matters. Near-miss labels are often judgment-based, especially in brownfield plants with inconsistent data capture.
  5. Record label provenance. Store who labeled it, when, from which records, and under which rule version. Without that, retraining and auditability become difficult.
  6. Measure label quality. Check agreement between reviewers, false positive rate, class imbalance, and drift after process or system changes.

Common constraints

The biggest constraint is that MES is designed for execution and traceability, not complete incident semantics. A near-miss may exist only in free text, a supervisor log, a maintenance call, or an informal escalation that never became a formal record.

Other common limitations include:

  • incomplete event timestamps across systems
  • weak master data alignment between equipment, work centers, part numbers, and routing steps
  • alarm floods that hide meaningful precursor events
  • free-text comments that need normalization
  • changes in routings, recipes, reason codes, or operator behavior over time
  • historical data gaps from migrations, paper records, or phased MES rollout

If your site has inconsistent reason codes or poor comment discipline, labeling effort will shift from analytics to data cleanup.

Brownfield reality

In most plants, the practical answer is to layer labeling on top of existing systems rather than replace them. Full replacement of MES, QMS, or adjacent systems just to improve event labeling usually fails the business case in regulated environments. The qualification burden, validation effort, downtime risk, integration complexity, and long equipment lifecycles are too high for most sites.

A safer pattern is to keep the MES as system of record for execution, pull candidate signals from it, and link them to evidence from QMS, historians, maintenance, and operator workflows. That preserves traceability while reducing disruption.

For machine learning use

If your goal is model training, distinguish carefully between:

  • candidate-event detection
  • human-reviewed labels
  • confirmed outcomes

Do not train a model on proxy rules and then claim it predicts true near-misses. That only teaches the model to reproduce your rule set and any bias inside it.

Also expect retraining after major process changes, equipment upgrades, new routing logic, or revised work instructions. In regulated operations, changes to label definitions, source mappings, and decision logic should be version-controlled and reviewed under normal change control.

Bottom line

Create near-miss labels from MES records by using MES as one evidence source, not the only source. Start with explicit definitions, generate candidate events from auditable MES signals, validate labels with human review, and maintain traceable versioning of rules and decisions. If you skip the review and data-quality work, the labels will look precise but may not be trustworthy.

Related Blog Articles

Get Started

Built for Speed, Trusted by Experts

Whether you're managing 1 site or 100, Connect 981 adapts to your environment and scales with your needs—without the complexity of traditional systems.

Get Started

Built for Speed, Trusted by Experts

Whether you're managing 1 site or 100, C-981 adapts to your environment and scales with your needs—without the complexity of traditional systems.