# Desambiguação

Para os assistentes híbridos, que utilizam NLU e um fluxo guiado,  existem situações em que o NLU não retorna um nível de confiança parametrizado como *high,* mas a intenção que possui o nível mais alto está dentro da medida *medium* juntamente com algumas outra&#x73;*.* Isso caracteriza uma ambiguidade.&#x20;

Com o input de desambiguação, é possível criar uma lista de opções que trará automaticamente as **labels** das **três intenções** com o **maior nível de confiança** identificado pelo cognitivo para aquele input.

## Estrutura

{% tabs %}
{% tab title="Exemplo" %}

```json
{
    "default": {
        "type": "disambiguation",
        "payload": {
            "pick": "Desculpe, não consegui entender o que deseja. Você quer falar sobre algum desses assuntos?",
            "hideArrows": false,
            "bold_numbers": true,
            "showTextInput": true,
            "additional_options": []
        }
    }
}
```

{% endtab %}

{% tab title="Preview no wiget" %}
![](/files/-MUE6vuP9oHh5l1F9Ui_)
{% endtab %}
{% endtabs %}

## Parâmetros

* **type:** disambiguation
* **payload:**
  * **pick:** mensagem que será exibida no cabeçalho do componente
  * **showTextInput (opcional):** se true, será exibido o input de texto junto com a lista de opções, permitindo ao usuário escolher um item listado ou digitar o que desejar
  * **hideArrows (opcional):** se passado o valor true, esconde as setas de scroll (rolagem) para cima e para baixo
  * **additional\_options (opcional):** opções de intenções extras que podem ser acrescentadas para serem exibidas ao usuário\\

    * **title:** título (label) da opção que estará visível ao usuário

Se você tiver acesso ao memberkit, veja essa dica sobre desambiguação:

{% embed url="<https://d1.skore.io/pt/contents/926846-usando-score-e-desambiguacao-no-bot-cognitivo?ref=admin>" %}

#### Modelo com valores fixos

{% tabs %}
{% tab title="Second Tab" %}

```json
{
    "default": {
        "type": "disambiguation",
        "payload": {
            "pick": "Hmm 🤔, não tenho certeza se entendi...<br>Veja se você gostaria de saber sobre algum desses assuntos 👇",
            "hideArrows": false,
            "bold_numbers": true,
            "showTextInput": true,
            "additional_options": [
                {
                    "title": "Voltar ao menu principal",
                    "value": "voltar_menu_principal"
                },
                {
                    "title": "Encerrar Chat",
                    "value": "encerrar_chat"
                },
                {
                    "title": "Avaliar atendimento",
                    "value": "avaliar_atendimento"
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="" %}
![](/files/-McLNkeSnsxsfbfVhtbe)
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Lembre-se de deixar o atributo `hideArrows` como **`false`**, caso contrario o scroll e as opções adicionais serão ocultadas.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.altu.d1.cx/build/assistentes/builder/componentes/input/disambiguation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
