compare_values
Compare a claimed value with actual data to calculate deviation and assess the accuracy of the claim.
Instructions
Compare a claimed value to actual data and qualify the deviation.
Args: claimed_value: The value asserted in the claim. actual_value: The value from the data source. claimed_period: The period referenced in the claim. actual_period: The period of the actual data.
Returns: ComparisonResult with deviation metrics and qualification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actual_value | Yes | ||
| actual_period | Yes | ||
| claimed_value | Yes | ||
| claimed_period | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actual_value | Yes | ||
| actual_period | Yes | ||
| claimed_value | Yes | ||
| periods_match | Yes | Whether claimed and actual periods align | |
| claimed_period | Yes | ||
| absolute_deviation | Yes | actual - claimed | |
| deviation_qualifier | Yes | Indicative qualification | |
| relative_deviation_percent | Yes | (actual - claimed) / claimed * 100 |