> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feature values

> Learn how to use the feature values test

## Definition

The feature values test allows you to define the expected range of values for a feature. For categorical features,
you can define the expected categories.

## Taxonomy

* **Task types**: Tabular classification, tabular regression.
* **Availability**: <Tooltip tip="Continuously evaluate your models and datasets as you iterate on their versions.">development</Tooltip>
  and <Tooltip tip="Monitor a model in production, measure its health, check for drifts and set up alerts.">monitoring</Tooltip>.

## Why it matters

* Ensuring that the values of a feature are always within a defined range is important to validate the hypotheses around the data. For example, for a feature such as `Age`, negative values would be invalid and signal an issue with the data collection/ingestion process.
* Values outside the expected range can also be a sign of data drift.
* For some categorical features, it is important to ensure that the values are always within the expected categories.

## Test configuration examples

If you are writing a `tests.json`, here are a few valid configurations for the character length test:

<CodeGroup>
  ```json Development theme={null}
  [
    {
      "name": "Feature 'Year' less than 2026",
      "description": "Asserts that the values of the feature 'Year' are within the specified range",
      "type": "integrity",
      "subtype": "featureValueValidation",
      "thresholds": [
        {
          "insightName": "featureProfile",
          "insightParameters": [
            { "name": "name", "value": "Year" }, // Selects feature `Year`
          ],
          "measurement": "max", // Must be one of `max` or `min`
          "operator": "<=",
          "value": 2026
        }
      ],
      "subpopulationFilters": null,
      "mode": "development",
      "usesValidationDataset": true, // Apply test to the validation set
      "usesTrainingDataset": false,
      "usesMlModel": false,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689" // Some unique id
    }
  ]
  ```

  ```json Monitoring theme={null}
  [
    {
      "name": "Feature 'Year' less than 2026",
      "description": "Asserts that the values of the feature 'Year' are within the specified range",
      "type": "integrity",
      "subtype": "featureValueValidation",
      "thresholds": [
        {
          "insightName": "featureProfile",
          "insightParameters": [
            { "name": "name", "value": "Year" } // Selects feature `Year`
          ],
          "measurement": "max", // Must be one of `max` or `min`
          "operator": "<=",
          "value": 2026
        }
      ],
      "subpopulationFilters": null,
      "mode": "monitoring",
      "usesProductionData": true,
      "evaluationWindow": 3600, // 1 hour
      "delayWindow": 0,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689" // Some unique id
    }
  ]
  ```
</CodeGroup>

## Related

* [Feature drift test](/tests/consistency/feature-drift-count).
