# Missing Pattern for human-like information gathering processes

**Cognigy Support**  
May 4, 2023

In most conversations, any kind of information needs to be collected. There, it does not matter if the user talks to a real human or artificial intelligence. However, when one listens to a human dialog, it may be noticed that questions are answered in a variety of ways -- for example answers can be changed. In order to provide such a dynamic, open, and human-like dialog structure, Cognigy introduced [Slot Fillers](https://docs.cognigy.com/v3.6/docs/slot-question).

_Questions can be combined with Slot Fillers to create a so-called "Missing Pattern". This mechanism keeps asking the user for the missing information in a very natural way until all questions have been answered._

* * *

In the end, the user can choose between two different ways of answering the questions:

**Answer questions in one sentence:**

**Answer questions in multiple sentences:**

****

In order to provide a human-like experience, the user can change any of the asked values at any time:

# In Cognigy

In general, three Cognigy features are needed to get the **Missing Pattern** running:

1. Question Node  
2. Slot Filler  
3. Lexicon (optional)

The [question](https://docs.cognigy.com/v4.0/docs/slot-question) node is used to ask for a specific value, while this could be a date, number, slot, et cetera. The slot filler then checks if the missing value is already filled, thus answered. Finally, a lexicon can be used to use custom domain-specific slots such as cities or product names.

## Question Node

The question node needs to ask the right question and store the result into the context so that the slot filler can check if it is provided already:

The interesting part in this configuration is the **Skip if Answer exists in Context** toggle. Because of that, the question will not be asked if this number if already stored in the context.

## Slot Filler

Now, the slot filler needs to **check if the number of travelling people** is given or not:

- In the Flow, navigate to **NLU** and then to **Slot Fillers**

## Lexicon

Since asking for general information may not be enough, one can add a [lexicon](https://docs.cognigy.com/docs/lexicons) to the agent and expose this database to the missing pattern.

### Create a Lexicon

In your agent, navigate to **Build -> Lexicon** and create a new one. This could look like the following:

All included keyphrases will be possible answers for the user. The slot is required to ask a so-called slot question.

### Attach the Lexicon

However, before the lexicon can be used, it needs to be attached to the related Flow -- in this case, the missing pattern one:

### Custom Slot Filler

In contrast to the general, built-in, slots such as NUMBER of DATE, one needs create a custom slot filler in order to use the new slots and keyphrases:

# The Final Flow

After configuring all necessary slots and lexicons, the final Flow for this example looks like this:

In this case, the last Say Node is used as confirmation so that the user can change their decisions and then submit them. In the best practice, the virtual agent should provide a summary at this point in time:

> [Watch Cognigy Sessions Episode "Cognigy NLU" for a technical deep dive](https://support.cognigy.com/hc/en-us/articles/360019857220-Cognigy-Sessions-Cognigy-NLU)

### Best Practices

- [Cognigy.AI Bot Building Checklist](https://support.cognigy.com/hc/en-us/articles/360018496419-Cognigy-AI-Bot-Building-Checklist)  
- [Cognigy’s NLU Execution Order Explained](https://support.cognigy.com/hc/en-us/articles/16558780569884-Cognigy-s-NLU-Execution-Order-Explained)  
- [Difference Between Go To and Execute Node](https://support.cognigy.com/hc/en-us/articles/16221971132444-Difference-Between-Go-To-and-Execute-Node)  
- [Explaining No-Translation Markers](https://support.cognigy.com/hc/en-us/articles/16221389567900-Explaining-No-Translation-Markers)  
- [Best Practices: Testing your Virtual Agents with Playbooks](https://support.cognigy.com/hc/en-us/articles/9585431937948-Best-Practices-Testing-your-Virtual-Agents-with-Playbooks)  
- [Voice: Strategies for Hard to Understand Phrases](https://support.cognigy.com/hc/en-us/articles/7456424115612-Voice-Strategies-for-Hard-to-Understand-Phrases)  
- [Universal skills for Chat and Voice](https://support.cognigy.com/hc/en-us/articles/7138355918876-Universal-skills-for-Chat-and-Voice)  
- [Avoid customer frustration](https://support.cognigy.com/hc/en-us/articles/5949294556572-Avoid-customer-frustration)  
- [Get the conversation going](https://support.cognigy.com/hc/en-us/articles/5937352099484-Get-the-conversation-going)  
- [Best Practices: Building a Deployment Pipeline for Cognigy AI Agents](https://support.cognigy.com/hc/en-us/articles/4798756787740-Best-Practices-Building-a-Deployment-Pipeline-for-Cognigy-AI-Agents)
