bmel:threshold¶
Category: Math · Returns: bmel:boolean
Signature
bmel:threshold(value: bmel:number, min: bmel:number, max: bmel:number)
Description¶
Returns true if the value falls within the inclusive range [min, max]. A readable range-check for confidence scores, risk scores, and quality metrics. Equivalent to value >= min AND value <= max.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
value | bmel:number | The value to check. | |
min | bmel:number | Minimum acceptable value (inclusive). | |
max | bmel:number | Maximum acceptable value (inclusive). |
Examples¶
Confidence within the accepted range
bmel:threshold({invokeAgent:Response Payload}.$.confidence, 0.7, 1)
Risk score in the medium band
bmel:threshold({invokeAgent:Response Payload}.$.risk_score, 0.2, 0.5)