compare_states
Compare two screenshots to detect visual differences and anomalies. Returns similarity metrics and flags mismatches, enabling UI change detection and visual state validation.
Instructions
Compare two screenshots in embedding space. Useful for 'does this screen match what I expected?' Returns cosine similarity, MSE, surprise score, and match/anomaly flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actual | Yes | File path or base64 of the actual/current state. | |
| expected | Yes | File path or base64 of the expected/reference state. | |
| anomaly_threshold | No | Surprise score above which to flag as anomaly (default 0.1). Lower = stricter. |