> ## 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.

# New categories

> Learn how to use the new categories test to detect new categories in your data

## Definition

The new categories test checks if there are new categories in the validation set which are not present in the training set for the categorical features.

## Taxonomy

* **Task types**: Tabular classification, tabular regression.
* **Availability**: <Tooltip tip="Continuously evaluate your models and datasets as you iterate on their versions.">development</Tooltip>.

## Why it matters

* If the validation set contains new categories, the model is not prepared to make good predictions for them.

## 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": "No new categories",
      "description": "Asserts that there are no new categories in the current dataset if compared to the reference dataset",
      "type": "consistency",
      "subtype": "newCategoryCount",
      "thresholds": [
        {
          "insightName": "newCategories",
          "insightParameters": null,
          "measurement": "newCategoryCount",
          "operator": "<=",
          "value": 0
        }
      ],
      "subpopulationFilters": null,
      "mode": "development",
      "usesValidationDataset": true,
      "usesTrainingDataset": true,
      "usesMlModel": false,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689" // Some unique id
    }
  ]
  ```

  ```json Monitoring theme={null}
  [
    {
      "name": "No new categories",
      "description": "Asserts that there are no new categories in the current dataset if compared to the reference dataset",
      "type": "consistency",
      "subtype": "newCategoryCount",
      "thresholds": [
        {
          "insightName": "newCategories",
          "insightParameters": null,
          "measurement": "newCategoryCount",
          "operator": "<=",
          "value": 0
        }
      ],
      "subpopulationFilters": null,
      "mode": "monitoring",
      "usesProductionData": true,
      "evaluationWindow": 3600, // 1 hour
      "delayWindow": 0,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689" // Some unique id
    }
  ]
  ```
</CodeGroup>

## Related

* [New labels test](/tests/consistency/new-label-count).
