# Flow settings

### What are flow settings?

Each flow created in your NLX workspace has crucial settings for workflow construction, customer intent recognition, and MCP-enablement before building and deploying an application or using agentic features that will access the flow.&#x20;

A flow's <i class="fa-gear">:gear:</i> *Settings* setup provides options for proper intent recognition and flow invocation, MCP-enablement, using slot variables, and assigning languages for translation.

<figure><img src="https://2737319166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHCxYxhIU0Bqkjj942mGk%2Fuploads%2FoGfwc8HYu2uq6fJGGRNN%2Fimage.png?alt=media&#x26;token=b1ea88ef-cfef-4957-a70b-ffd5a213d236" alt=""><figcaption></figcaption></figure>

### Add/duplicate flow

{% @arcade/embed flowId="kX5tRvPN4ENGupnClXKN" url="<https://app.arcade.software/share/kX5tRvPN4ENGupnClXKN>" %}

1. Select *Resources* from workspace menu > Choose *Flows* > Click *New flow*
2. Provide a name (no spaces or special characters) > Click *Create flow*

To duplicate an existing flow, choose the *Settings* icon within the flow's Canvas toolbar > Click the *Advanced* tab > Choose *Duplicate flow*. As flows cannot be renamed, you may duplicate an existing flow and provide the clone the desired name.

{% hint style="info" %}
To delete a flow, select the gear icon (*Settings*) within your flow's Canvas. Choose the *Advanced* tab > Select *Delete flow* option and confirm. If the intent flow is attached to an application(s), create a [new build and re-deploy](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#deployment) to experience the change.
{% endhint %}

### Routing

*Routing* in a flow's settings defines how a flow can be invoked. It provides the information LLMs and NLP engines need to recognize when a user’s intent matches the flow. Routing includes two key fields: *AI description* and *Training phrases*.

{% hint style="info" %}
If the flow is being assigned to one of the application’s [default behaviors](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#default-behavior), or if it will only be triggered by redirect nodes in other flows (rather than a user’s utterance), you can leave *Routing* blank.
{% endhint %}

#### AI description

The *AI description* field is required for LLMs to recognize when to call a flow. This is useful when assigning the flow as a tool for [agentic applications](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/async-worker), the [agentic *Generative Journey* node](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#agentic-mode), or for an [MCP Client](#model-context-protocol-mcp). You may also enter an AI description along with training phrases for improved performance with the [NLX AI engine](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#ai-engine).

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's toolbar
2. From the *Routing* tab, enter a concise description explaining the purpose of the flow `Updates an existing hotel reservation`      &#x20;
3. Be sure to turn ON the MCP toggle in the MCP tab, if making your flow available as an LLM tool

#### NLP training

*NLP training* is required for NLP engines to recognize when to call a flow. They comprise samples of what users might say to indicate their intent. Your NLP engine learns from these examples to recognize real-world variations. For instance, in an `OrderRoomService` flow, phrases like *“Order something to eat,”* *“I want room service,”* or *“Can I order food to my room?”* train the NLP to match similar requests to this flow.

You may also enter an *AI description* along with training phrases for improved performance with the [NLX AI engine](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#ai-engine).

{% tabs %}
{% tab title="Instructions" %}
The minimum number of training phrases recommended is 5, but providing a strong variety of user expressions results in better performance.&#x20;

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's toolbar
2. Click *AI settings* tab > Enable *Training phrases* toggle
3. Select *+ Add new training phrase*
4. When done adding phrases, click *Save* on the Canvas

{% hint style="info" %}
Saved changes do not take effect with applications that are already deployed. To experience changes to training data with applications in production, create a [new build and redeploy](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#deployment).
{% endhint %}

> Optional:
>
> * *Skip translation* (expand a phrase to view setting): Toggled OFF by default. Enable this in multi-language situations where the phrase would not make sense when translated into another language.
> * *Enable training:* Toggled ON by default. If disabled, prevents users from being routed to the flow via intent recognition. Useful if the situation requires users only be navigated to the flow through deliberate [redirects](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#redirect) in other flows, or if the flow is set to a [default behavior](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/core#default-behavior) on the application. Essentially, this prevents the flow from being invoked by a user
> * *Generate using AI*: Quickly generate your training dataset [with AI](#generate-with-ai)
> * *Upload/Download*: Allows for a JSON or CSV to be ingested or downloaded with training phrase data. Tap the CSV/JSON button beside the *Download* link to swap formats
>   {% endtab %}

{% tab title="Generate with AI" %}
Want to create your training data in record time? Use the *Generate using AI* feature:

1. Create a sample set of at least 1 training phrase to allow the AI to learn and expand on phrases with similar characteristics
2. Click *Save*
3. Select *Generate using AI* to create phrases in batches of five
4. Modify before or after adding the phrases to your pool
5. Repeat the process as needed (recommended pool size: 5-30)

{% hint style="info" %}
If you have [slots](#attached-slots) you'd like to reference in generated training phrases, include them in your sample set first.&#x20;
{% endhint %}
{% endtab %}

{% tab title="Best practices" %}
Predicting what users might say to in order for the right flow to be invoked is a challenging task. Users may say a lot or say very little when explaining what they want to accomplish.

Take a deep dive on organizing intent flows and developing training data with [*our favorite best practices*](https://aws.amazon.com/blogs/machine-learning/best-practices-for-creating-amazon-lex-interaction-models/)*.*

#### Length

To start, keep training phrases short. AI models are able to identify filler words , misspellings, uncapitalized words, and politeness from user utterances, so no need to worry about creating multiple variations to account for them:

:heavy\_check\_mark:place an order for room service

:heavy\_check\_mark:would like to order room service

:x:Can I please place an order for room service for my family this evening?

#### Leverage slots

Slots help you capture dynamic info that determine the parameters to a user's request or choice. *Small/medium/large* or *yes/no* are common examples. Introducing slots into training phrases can reduce creating different intents that would have similar training phrases or prevent the need for drafting multiple variations of a single training phrase:

:heavy\_check\_mark:would like a {size} pizza

:heavy\_check\_mark:look up {accountType} account balance

:x:look up savings account balance; look up checking account balance, etc.
{% endtab %}
{% endtabs %}

### Model Context Protocol (MCP)

*MCP* in a flow’s settings allows you to configure the flow as a *tool* that can be invoked by a Large Language Model (LLM). This can be used in two ways:

* When exposing your flow to an [*MCP client* ](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/deployment/mcp-server)(with NLX serving as the MCP Server)
* When assigning the flow as a tool to the [Agentic Generative Journey](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#agentic-mode) node

By enabling MCP, an AI agent can recognize when to call the flow and execute the task it defines.

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's toolbar
2. Click *MCP* tab > Enable *MCP* toggle > Click *Save*

> *Input schema* (optional): Define input schema, which specifies the variable(s) the LLM should collect before invoking the flow. This schema helps guide the LLM in gathering the right information.
>
> For example, a flow designed to provide restaurant recommendations might use input schema that includes `cuisine` and `location`. The LLM would capture these details from the user and pass them into the flow to deliver more relevant results.
>
> * Provide a unique and concise input name (no spaces or special characters)
> * Enter the input schema containing necessary variable(s) that will be set and passed along by the LLM interfacing with a user
> * Enter a brief description in the property's *Description* field for the LLM to understand the purpose and context of each (e.g., `location` property might have the accompanying description for a restaurant recommendation flow: `The location where you want to find a restaurant`)
> * Click *Save*
>
> On any node of the flow, enter an open curly brace `{` and reference the MCP input variable you want to use as an output in messaging, payload fields, *Split* node conditions, etc:

{% hint style="warning" %}
Be sure to also include an [AI description for the flow](#ai-description) and turn on the [MCP interface setting](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/deployment/managing-channels/creating-an-api-channel#optional-api-fields) on an application that will use MCP-enabled flow(s).
{% endhint %}

<figure><img src="https://2737319166-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHCxYxhIU0Bqkjj942mGk%2Fuploads%2FOVKR7lzBfVHXYbGO9NAV%2Fimage.png?alt=media&#x26;token=01c6e71d-3604-4768-af82-7adef92af975" alt=""><figcaption><p>MCP variable (cuisine) being passed to a custom API payload and referenced in a <em>Basic</em> node message</p></figcaption></figure>

### Attached slots

Slots capture parameters from user responses and are deemed required information for completing a process outlined in a flow. The majority of user nodes in a flow are likely to be made up of [*User choice* nodes](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#user-choice) or[ Generative Journey nodes](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#generative-journey) that resolve these parameters while your conversational AI guides a user through a self-service task.

If a user wishes to book a stay at your resort, you might use slots to resolve the check-in date, check-out date, number of guests, name of guest, and so on.

{% hint style="info" %}
Slots must be attached to a flow to be used within its NLP training or within Canvas nodes.&#x20;
{% endhint %}

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's Canvas toolbar
2. Click *Attached slots* tab > Select *+Attach new slot*
3. Choose slot(s) from the dropdown (organized by Custom then Built-in types in your workspace)
4. Provide a name for the slot to be referenced when in use
5. Click *Save*

> Optional:
>
> * *Examples* (expand an attached slot to view setting):  Add sample phrases that users may provide (e.g., for the built-in `NLX.Time` slot, you might add "7 pm," "7:00pm" or "7 in the evening" as examples for use with the [*Generative Journey*](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/nodes#generative-journey) node)
> * *Sensitiv*e (expand an attached slot to view setting): Toggled OFF by default. There may be cases where a user's selection may reveal personally identifiable information (PII). For user privacy, you can enable the *Sensitive* setting so user input for this slot is not stored in NLX conversation logs

#### Custom vs built-in slots

Custom slots have values that are small in range, are customizable to your use case, and may also be visible choices for user selection in chat (text-based) applications. Custom slots are created within your workspace using the [Slots resource](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/slots-custom).

Examples:

* Yes / No
* Small / Medium / Large
* I want to signup / I want something else

Built-in slots have standardized values that may be large or infinite in range or abstract:

<table data-full-width="false"><thead><tr><th width="260">Built-in slot type</th><th>Use</th></tr></thead><tbody><tr><td>NLX.Country</td><td>When a user response should be any country</td></tr><tr><td>NLX.Date</td><td>When a user response will use words to represent a date. Converts words to standard ISO-8601 format. Recognizes words such as "now" or "today" to mean the complete date of the current day. Input such as "this week" or "next week" will map to the first day of the week. ISO-8601 format begins its week on Monday and ends on Sunday. Input such as "next month" maps to the last day of the following month</td></tr><tr><td>NLX.Duration</td><td>When a user response should be words that represent duration (e.g., "two days," "30 seconds"). Converts words into numeric duration</td></tr><tr><td>NLX.Email</td><td>When a user response should involve words and characters to represent an email address. Supports additional characters such as underscores, hyphens, periods, and plus signs</td></tr><tr><td>NLX.FirstName</td><td>When a user response should use a word to represent a first name</td></tr><tr><td>NLX.LastName</td><td>When a user response should use a word to represent a last name</td></tr><tr><td>NLX.Number</td><td>When a user response should only use numeric words. Converts words to digits</td></tr><tr><td>NLX.Ordinal</td><td>When a user response should use ordinal words (e.g., "first" or "1st") to represent ordinal position</td></tr><tr><td>NLX.AlphaNumeric</td><td>When a user response may use a combination of letters and numbers</td></tr><tr><td>NLX.PhoneNumber</td><td>When a user response should use numeric words to represent a phone number. Converts them to a numeric string</td></tr><tr><td>NLX.Text</td><td>When a user response may consist of any words or characters</td></tr><tr><td>NLX.Time</td><td>When a user response should use words that represent time. Converts them to standard time format. You may use <a href="../nodes#define">the <em>Define</em> node</a> to parse information in flow, if needed</td></tr><tr><td>NLX.Url</td><td>When a user response should use words to represent a URL. Converts them to standard URL format</td></tr><tr><td>NLX.City</td><td>When a user response should be any global city</td></tr><tr><td>NLX.USCity</td><td>When a user response should be a United States city</td></tr><tr><td>NLX.USState</td><td>When a user response should be a United States state</td></tr></tbody></table>

### Languages

{% hint style="info" %}
Need a list of available languages? See [Supported languages](https://docs.nlx.ai/platform/nlx-platform-guide/advanced/translations#supported-languages)
{% endhint %}

*Languages* lists all languages assigned to your flow, allowing for easy management of translations to any messaging contained within the flow and/or training phrases.&#x20;

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's Canvas toolbar
2. Click *Languages* tab > Select *+Add new language*
3. Choose language(s) from dropdown
4. Click *Save*

#### Managing translations

When new languages are added via [Translations](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/translations), they may be applied globally to resources in your NLX workspace. However, you may add/remove languages at the flow level to override your workspace's language settings.

{% tabs %}
{% tab title="Auto-translation" %}

* Select *Manage translations* next to a supported language
* Choose *Auto-translate all* > *Confirm*
  {% endtab %}

{% tab title="Manual translation" %}

* Select *Manage translations* next to supported language
* Type translation for each training phrase
* Click *Save*

Optional:

> * Expand training phrase > *Mark as translated* overrides auto-translation
> * Expand training phrase > *Skip translation* if you do not want the phrase translated or no proper translation exists

{% hint style="info" %}
To apply optional settings to all phrases, use the *Mark all as translated* or *Skip all translations* links above the lis&#x74;*.*
{% endhint %}
{% endtab %}
{% endtabs %}

### Versions

You may easily restore or view past versions of a saved flow:

1. Select <i class="fa-gear">:gear:</i> *Settings* within your flow's Canvas toolbar
2. Click *Versions* tab > Choose version to preview
3. Click Save to restore a version

{% hint style="info" %}
Restoring a version of a flow restores nodes patterns on the Canvas as well as the flow's settings from the previous save state.
{% endhint %}

### Organization

For internal organization of your workflows, you may add an optional description and resource tags.
