---
sourceDocument: Australia Enable AI
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/intelligent-experiences

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Configure include only top N labels

# Configure include only top N labels {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Limit your classification model to use only the most common classes when training. You can specify the number of classes to use.

## Antes de Iniciar

Role required: ml_admin or admin

## Por Que e Quando Desempenhar Esta Tarefa

Restricting the model to a fixed number of the most frequent labels improves focus and performance, especially with large datasets.

You can add this option in the solution definition form by using the following procedure. Alternatively, you can use a script to add this option.

To add this option using a script:  

    config.setTopNLabels(100);

In JSON format:  

    {
        "include_top_n_labels": 100
        }

## Procedimento

1. To add this option in the solution definition form, navigate to AllPredictive IntelligenceClassificationSolution Definitions.
2. Open an existing classification solution or create a new one.
3. Select the Advanced Solution Settings tab in the Related Links section of the form.
4. Select New to open the Advanced Solution Setting (ml_advanced_solution_settings) form.
5. In the Solution Parameters field, search for <kbd class="ph userinput">include only top n labels</kbd>.
6. In the User Inputs field, enter the number of classes you want as the limit, then select Submit.  

## Resultado

The setting appears as a row on the Advanced Solution Setting tab on your solution's form.

## O que Fazer Depois

Retrain your solution.
**Conceitos relacionados**   

* [Using Machine Learning APIs](https://servicenow-prod.fluidtopics.net/ZXSzC15BCTxiFn3ZVC_LiQ#using-ml-apis "Use ServiceNow Machine Learning (ML) APIs to train Machine Learning models and run inferences.")  
**Tarefas relacionadas**   

* [Create and train a classification solution](https://servicenow-prod.fluidtopics.net/xLGbLdMK5yW5QC6GrOAZBA "Specify the records used to train a classification solution, what fields trigger a prediction, and how often you want to retrain your solution.")

