Skip to main content
Challenge

Build an OPC UA SCADA Anomaly Detector with Pydantic AI and Claude 4 Sonnet

Industrial control systems are evolving into software-defined architectures where continuous sensor telemetry must be analyzed in real time to prevent critical machinery failures. In this challenge, you will build an automated anomaly detection and root-cause analysis agent for OPC UA SCADA telemetry streams using Pydantic AI and Claude 4 Sonnet. Your system will validate incoming high-frequency time-series data (vibration, motor temperature, pressure, current draw), isolate anomalous operational patterns, and produce strongly typed diagnostic reports. By leveraging Pydantic AI's dependency injection and structured validation, you will construct a pipeline that guarantees valid schema outputs suitable for immediate ingestion by plant maintenance management systems.

EngineeringHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a type-safe telemetry anomaly detector and root-cause analysis agent using Pydantic AI and Claude 4 Sonnet.

Delivery guide

How work is evaluated

Evaluation

Evaluates the agent's ability to ingest telemetry, detect motor anomalies, and output valid structured JSON root-cause diagnostics.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
3 scoring checks
Binary
3 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

schema_validation_test

Ensures output strictly adheres to the TelemetryDiagnostic Pydantic model.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

anomaly_detection_precision

Ensures anomalous readings are accurately flagged as anomalous.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 3

f1_score

F1 score for correctly identifying anomalous SCADA frames • target: 0.92 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Parse and process multi-channel OPC UA time-series telemetry data.

  • Implement structured output validation for industrial diagnostics using Pydantic AI.

  • Integrate Claude 4 Sonnet via Pydantic AI dependencies for context-aware root-cause analysis.

  • Generate automated work orders formatted for modern Computerized Maintenance Management Systems (CMMS).

Resources and assets

Reference links and supporting material

Dataset notes

Simulated OPC UA sensor readings for 3-phase industrial motors including vibration, surface temperature, line current, and operational speed baselines.

Challenge setup

Evaluates the agent's ability to ingest telemetry, detect motor anomalies, and output valid structured JSON root-cause diagnostics.

Challenge input

JSON containing sensor time-series data points

Pydantic AI

Provides type-safe structured output parsing and dynamic dependencies.

Claude 4 Sonnet

Offers strong reasoning over high-frequency industrial telemetry signals.

Evaluated output

Validated Pydantic AI JSON schema with severity, root_cause, and recommended_action

Evaluation checks
  • Ensures output strictly adheres to the TelemetryDiagnostic Pydantic model.
  • Ensures anomalous readings are accurately flagged as anomalous.
  • F1 score for correctly identifying anomalous SCADA frames • target: 0.92 • range: 0-1
Configured evaluation evidence
  • Benchmark: Industrial AI Diagnostics Benchmark
  • F1 Score target: 0.92
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Claude Code · Optional
Observation
  • Claude Code · Optional
Policy Serving
  • Claude 4 Sonnet · Required
  • Claude 4.1 Opus · Optional

Evaluation contract

  • schema_validation_test · Weight 1
  • anomaly_detection_precision · Weight 1
  • f1_score · Weight 1

Metrics

  • f1_score · Target 0.92

Benchmarks

  • Industrial AI Diagnostics Benchmark
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing sensor time-series data points

    Output: Validated Pydantic AI JSON schema with severity, root_cause, and recommended_action

    Execution harness: Python

Evaluation tools

  • Pydantic AI · agent_framework
  • Claude 4 Sonnet · llm

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build an OPC UA SCADA Anomaly Detector with Pydantic AI and Claude 4 Sonnet