Expert diagnostic workflow for investigating inventory discrepancies: shrinkage, counting errors, sensor data quality issues. Use when analyzing unexplained stock losses, mismatches between expected and observed inventory, counting accuracy problems, or questions like 'Why is my inventory count wrong?' or 'How can I trace inventory discrepancies?'
Activate this skill when the user asks about:
Inventory discrepancies stem from one of three root causes:
Use observation tools to isolate problematic SKUs:
Tools: get_observed_inventory_snapshot
Parameters: {quality_threshold: 0.7, include_anomalies: true}
Decision Point: If multiple products show discrepancies, prioritize by value (ABC analysis).
Check devices contributing to inventory observations:
Tools: list_sensor_devices, get_device_health_summary
Focus: anomaly_count, last_calibration, signal_quality
Known Patterns:
anomaly_count > 5 in 24 hours → Likely hardware issuesignal_quality < 0.8 → Check calibration or positioningAudit recent transactions for the affected product:
Tools: list_inventory_moves, get_inventory_move_audit_trace
Parameters: {product_id: "<SKU>", start_date: "<T-7days>"}
Red Flags:
Verify expected quantities against purchase orders:
Tools: list_purchase_orders, get_purchase_order
Filter: status="received", product_id="<SKU>"
Check: received_quantity vs. ordered_quantity — partial deliveries can cause count mismatches.
Apply statistical reasoning to quantify the issue:
Shrinkage Rate Formula:
shrinkage_rate = (expected_qty - observed_qty) / expected_qty * 100
Confidence Interval (95%):
import numpy as np
from scipy.stats import norm
expected = 1000
observed = 950
std_dev = 15 # historical variance
z_score = (expected - observed) / std_dev
p_value = norm.sf(abs(z_score)) * 2
if p_value < 0.05:
conclusion = "Statistically significant discrepancy — investigate further"