detect_anomalies
Run three anomaly checks on a NetSuite GL export: detect month gaps, ratio anomalies, and document count variances. Outputs findings with severity and supporting rows.
Instructions
Run three anomaly checks against a NetSuite GL-style export and return Findings: (1) zero_activity_period — month gaps inside the observed period range (HIGH); (2) ratio_anomaly — (account, period) total greater than 2x the account's median total across periods (MEDIUM); (3) document_count_variance — period row count more than 2 stdev from the mean across periods (MEDIUM). Each Finding includes severity, description, up to 10 supporting_rows, and total_supporting_count for the true un-truncated count. The period column should contain labels like 'Jan 2024', 'January 2024', or '2024-01'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| account_column | Yes | ||
| amount_column | Yes | ||
| period_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| findings | Yes |