# Welcome to Digital Studio

Embark on your journey with Digital Agents and Customer Insight Analytics! Discover here what features our studio offers, what is new or just get some tips & tricks.

{% embed url="<https://www.youtube.com/watch?v=LzLcqlpAAcs>" %}
Watch a short walkthrough of the Digital Studio: where things are and how to get started.\
Perfect if you’re new here and want the fastest overview before diving into the docs.
{% endembed %}

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/U9NW26YFTRVrLsmzyEnC">Product changelog</a></td><td>Stay up to date with the latest releases, improvements, and fixes.</td></tr></tbody></table>

## Where do you want to go?

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th><th data-hidden data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/PgG5Mloq1IPV4aAV52Xb">/pages/PgG5Mloq1IPV4aAV52Xb</a></td><td>Master the fundamental principles for crafting a digital agent + use case</td><td></td><td><a href="/pages/PgG5Mloq1IPV4aAV52Xb">/pages/PgG5Mloq1IPV4aAV52Xb</a></td></tr><tr><td><a href="/pages/HFMsruHku3u4dgcY3Djq">/pages/HFMsruHku3u4dgcY3Djq</a></td><td>Get some tips from our conversation design experts.</td><td></td><td><a href="/pages/HFMsruHku3u4dgcY3Djq">/pages/HFMsruHku3u4dgcY3Djq</a></td></tr><tr><td><a href="/pages/OvIOYDKCqejkulPaFKel">/pages/OvIOYDKCqejkulPaFKel</a></td><td>Master the fundamental principles for crafting a text or audio analysis + use case</td><td></td><td></td></tr></tbody></table>


# Introduction

This section will enable you to understand the basics of creating and managing your first digital agent.

### Quick links for you

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/peBnFFbI5xmBLyhA78JB">/pages/peBnFFbI5xmBLyhA78JB</a></td><td>Understand the Digital Studio Workspace to manage and oversee your  projects</td><td></td><td><a href="/pages/peBnFFbI5xmBLyhA78JB">/pages/peBnFFbI5xmBLyhA78JB</a></td></tr><tr><td><a href="/pages/ZjlZjeZmj9Ei7IktTRvR">/pages/ZjlZjeZmj9Ei7IktTRvR</a></td><td>Understand how the Conversation Flow works and design or modify  your conversation as desired.</td><td></td><td><a href="/pages/ZjlZjeZmj9Ei7IktTRvR">/pages/ZjlZjeZmj9Ei7IktTRvR</a></td></tr><tr><td><a href="/pages/PMS11onUH0Oo7Lb8A4Fg">/pages/PMS11onUH0Oo7Lb8A4Fg</a></td><td>Initiate your first project by building a small chat bot with our step-by-step guide.</td><td></td><td><a href="/pages/WaCGTgFjmYwud5lUOc8E">/pages/WaCGTgFjmYwud5lUOc8E</a></td></tr></tbody></table>


# Workspace

Master the fundamentals of the Digital Studio Workspace

## Select your page or tap the navigation bar.

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/woEd29VvifGVoFoOMttP#create-project">/pages/woEd29VvifGVoFoOMttP#create-project</a></td><td></td><td><a href="/pages/woEd29VvifGVoFoOMttP#create-project">/pages/woEd29VvifGVoFoOMttP#create-project</a></td></tr><tr><td><a href="/pages/woEd29VvifGVoFoOMttP#search-project">/pages/woEd29VvifGVoFoOMttP#search-project</a></td><td></td><td><a href="/pages/woEd29VvifGVoFoOMttP#search-project">/pages/woEd29VvifGVoFoOMttP#search-project</a></td></tr><tr><td><a href="/pages/woEd29VvifGVoFoOMttP#delete-project">/pages/woEd29VvifGVoFoOMttP#delete-project</a></td><td></td><td><a href="/pages/woEd29VvifGVoFoOMttP#delete-project">/pages/woEd29VvifGVoFoOMttP#delete-project</a></td></tr><tr><td><a href="/pages/BQq2WLLiNXS66kYJBTfK#version-details">/pages/BQq2WLLiNXS66kYJBTfK#version-details</a></td><td></td><td><a href="/pages/BQq2WLLiNXS66kYJBTfK">/pages/BQq2WLLiNXS66kYJBTfK</a></td></tr><tr><td><a href="/pages/BQq2WLLiNXS66kYJBTfK#users-settings">/pages/BQq2WLLiNXS66kYJBTfK#users-settings</a></td><td></td><td></td></tr><tr><td><a href="/pages/BQq2WLLiNXS66kYJBTfK#version-history">/pages/BQq2WLLiNXS66kYJBTfK#version-history</a></td><td></td><td><a href="/pages/NbR5bCBZnYtNWpMVaK3n">/pages/NbR5bCBZnYtNWpMVaK3n</a></td></tr></tbody></table>


# List of Projects

Welcome to creating a new project in Digital Studio. Let's start at the beginning.

## Create Project

To initiate a new project, follow these steps within the Workspace section. The process is straightforward and requires:

* Project name
* Project description
* Language

<figure><img src="/files/rHP4Mxf0I2fwNbpb9ild" alt="create project step by step"><figcaption><p>create project step by step</p></figcaption></figure>

<details>

<summary><strong>Create new project step by step:</strong></summary>

1. **Access the Workspace Tab:** Click on the Workspace tab to enter the project management area.
2. **Initiate Project Creation:** Look for and click on the 'Create Project' button to start the project setup process.
3. **Enter Project Details:**
   * **Project Name:** Fill in the desired name for the new project.
   * **Project Description:** Provide a brief description that outlines the project's purpose or scope.
   * **Select Primary Language:** Choose the primary language intended for the project.
4. **Confirmation:** Once all necessary information is entered, confirm the creation of the project by clicking the 'Create Project' button.

</details>

{% hint style="info" %}
Ensure that all details entered accurately represent the new project to avoid any confusion or misrepresentation.
{% endhint %}

***

## Search Project

To efficiently locate specific projects, utilise the search functionality conveniently positioned above the project listing. The process is simple—enter the project name into the search bar, and the system will handle the rest. If no project matches your search criteria, the system will display 'No project found'; simply clear the search bar to broaden your search. Your search will stay persistent when you move through the studio.

Additionally, you have the option to sort the projects on the left side by alphabetical order or by the newest models, based on your preference."

<figure><img src="/files/Sca3ZTl1nfSM8QcKt1M8" alt=""><figcaption><p>search project</p></figcaption></figure>

<details>

<summary>Search project step by step</summary>

1. **Access the Search Bar:** Click on the search bar positioned above the project listing.
2. **Enter Project Name:** Type in the desired project name you're looking for.
3. **View Search Results:** The system will respond with matching projects based on the name entered.
4. **Select the Desired Project:** Click on the project that matches your search to open its detailed information.

</details>

{% hint style="warning" %}
If no project matches your search, 'No project found' will be displayed. Clear the search bar to reset the search criteria and broaden the results.
{% endhint %}

{% hint style="info" %}
Also throughout the studio, when you want to filter through long list of options (in dropdown fields), just start typing and list will be filtered automatically.
{% endhint %}

***

## Delete Project

To delete a project, ensure that you have selected it within your workspace. Please note that this action is irreversible and will permanently remove the selected project. It's crucial to confirm that you've chosen the correct project for deletion, as this process is final and cannot be undone.

<figure><img src="/files/p7achT0JBrhanf0j2WYe" alt=""><figcaption></figcaption></figure>

<details>

<summary>Delete project step by step:</summary>

1. **Select the Project in Your Workspace:** Navigate to your workspace and choose the project you want to delete.
2. **Ensure You've Selected the Correct Project for Deletion:** Double-check to confirm that you've chosen the right project before proceeding with deletion.
3. **Locate the "Delete" Button:** Look for the "Delete" button positioned mid right of the screen.
4. **Confirm Deletion:** A small window or confirmation dialog will appear. Click on "Delete Permanently" within this window.
5. **Project Successfully Deleted:** Once confirmed, the selected project will be permanently deleted from your workspace.

</details>

{% hint style="warning" %}
Always exercise caution and verify that you are deleting the intended project to avoid accidental deletion of important data or work. Double-checking ensures you're taking the correct action.
{% endhint %}


# Project Details

Let´s quickly examine the right pane in your Digital Studio Workspace

## Project Details

Once you select any specific project, on the right hand side you will find project details section,  containing essential information about your project:

<figure><img src="/files/rLrw8s38iJxuK8qyH1e8" alt=""><figcaption><p>project information in a nutshell</p></figcaption></figure>

**Section is divided into four subsections:** Details | Version History | Users | Comments

## Details

This section gives you more details about the current version of your project. Below are few details about current version such as version number, if it is trained version, has phone numbers assigned, etc..

1. **Project Description:** You can provide a brief description of the project within the input text panel to add context or details.
2. **Announcements:** This section allows you to set up important information relevant to your project. Examples include details about working hours, state vacations, system issues, or delays. This assists in organising and informing your team. Refer to the Announcements chapter for more details.
3. **Updated:** Displays timestamp of the last update.
4. **Created:** Displays the timestamp and user responsible for creating the project.
5. **Project ID:** An exclusive identification code assigned to each created project, ensuring uniqueness.
6. **Organisation ID:** Your unique organisation ID serves as a key to identify your team or department within the Born Digital Digital Studio app.
7. **Train/Untrain Version:** Only trained projects can be used and deployed. Here, you can train your project, or Untrain it if needed.
8. **Deploy:** Deploy your trained project here. You will get a config-hash of your project or will be able to deploy it to a specific phone number here.
9. **Open:** Open digital studio builder for this project.

***

## Version History

Digital studio supports versioning of the projects, to be able to do important changes without endangering working version. With that, user can always get back to the previous working version, or have the working version deployed and work on the new changes at the same time.

User can access project versions via **Version history** subsection:

<figure><img src="/files/1EnlKSUAVxwcschgntrn" alt=""><figcaption><p>version history</p></figcaption></figure>

<details>

<summary><strong>Explanation of Default Columns:</strong></summary>

1. **Version:** Number of the project version.
2. **Description:** Simple summary of the changes made in that version.
3. **Updated:** Timestamp indicating the last modification time of the version and by whom.
4. **Trained:** Checkbox indicating if the version is trained and ready to be used.
5. **Connected:** Checkbox indicating version is deployed on the specific phone number.

By selecting a version, you can:

* Untrain a selected version
* Delete selected version
* Open selected version

</details>

***

### <mark style="color:yellow;">tbd</mark> - Open previous versions

If needed to get back to any previous version, simply navigate to Version history and click on "Use version" action item next to the version you want to use. In the Version details page, you will see that version has changed and that you are not using the latest one.

<figure><img src="/files/Pl0EnDGKNWFAY4qHa40r" alt=""><figcaption><p>Project version history - open previous version</p></figcaption></figure>

<details>

<summary><strong>Step-by-Step Guide:</strong></summary>

1. **Access Version History:** Navigate to the Project Details and click on the 'Version History' button.
2. **View Versions in Popup Table:** A table will appear displaying various project versions.
3. **Select Desired Version:** Tap on 'Use Version' under the 'Action' tab for the specific version you wish to access.
4. **Confirm Version ID:** Double-check the ID of the new version within the project version details.
5. **Perform Actions:** Train the model or use the flow according to your requirements.

</details>

{% hint style="info" %}
Following these steps allows for easy access to previous project versions and enables you to make necessary adjustments or improvements to the project. You can save the selected previous version as the latest one via "Save model version" button in the Conversation Flow.
{% endhint %}

***

## Users

This section aims to clarify the distinct roles that users can hold within the project

1. **Owner:** The Owner is the **primary responsible person for that specific project**. Owner can assign different rights to users within his project, or assign ownership to other users. Typically, the Owner is the creator of the project or an individual responsible for its successful delivery.
2. **Editor:** Have the capability to **make any modifications within the project**, they can train and deploy projects. However, Editors cannot assign the Owner role. They are often specialised individuals assisting in creating or delivering the project.
3. **Viewer:** Viewers have access to all sections and tabs within the project but lack the ability to edit, save changes or perform training functions. They serve as **stakeholders who need visibility into the project or its statistics, dashboards and all data** without the ability to alter or manage its contents.&#x20;

Assigning or removing roles is a straightforward process, detailed in the accompanying video below.

<figure><img src="/files/fBgMEchKAiug5Xli2n0w" alt=""><figcaption><p>add users into project</p></figcaption></figure>

***

### Delete project versions

Deleting project versions can be accomplished effortlessly, either individually or by selecting multiple versions simultaneously.

<figure><img src="/files/zLgi8JSLcXeraQMMggvI" alt=""><figcaption><p>Version history - delete version</p></figcaption></figure>

<details>

<summary><strong>Step-by-Step Guide to Deleting a Project Version:</strong></summary>

1. **Access Version History:** Access Version history in project detail in your workspace.
2. **Select the Correct Project:** Identify and locate the specific project version you wish to delete.
3. **Use the Bin Icon:** Click on the bin icon associated with the particular project version you intend to remove.
4. **Confirmation Pop-up:** A confirmation window will appear to ensure the permanent deletion of the selected project version.
5. **Click "Delete Model Version":** To confirm the deletion, click on "Delete Model Version." This action will permanently delete the project version.

</details>

***

### Handling multiple project versions

Within the project version history, you have the capability to handle multiple versions efficiently:

* **Train or Delete Multiple Versions:** Utilise checkboxes in the table window to mark specific projects. For untraining selected projects and freeing server memory capacity, use 'Untrain' icon in the action column. To delete multiple versions, click the bin icon in the first row of the table.
* **Current Version Status:** Presently, there exists only one trained version - 0.6, with a set description.

<figure><img src="/files/hBkOfDOvql40kKmhT1LC" alt=""><figcaption><p>untrain multiple versions</p></figcaption></figure>

<details>

<summary><strong>Step-by-Step Process for Handling Multiple Items:</strong></summary>

1. **Mark Specific Projects/Items:** Use checkboxes to select the projects/items you intend to manage.
2. **Perform Actions on Selected Items:** Click on specific actions available for the selected items.
3. **Untrain or Delete Project Versions:** Untrain projects to increase server memory capacity or delete unnecessary project versions.

</details>

{% hint style="info" %}
By following these steps, you can efficiently manage multiple project versions, untraining and deleting models as needed to optimise server memory and streamline project operations.
{% endhint %}


# Deploy Project

Deploying your project into production is a pivotal step in enhancing customer satisfaction through its use.

We're here to guide you through the deployment process. If you need assistance, please refer to the contact information provided.

Navigate to button Deploy

subsection ESSENTIAL

<figure><img src="/files/RxI0xIKwFNGN0seTVih8" alt=""><figcaption><p>deploy - essential</p></figcaption></figure>

subsection EXTRAS

<figure><img src="/files/mff38TFpXLXGtKDX5cDg" alt=""><figcaption><p>deploy extras</p></figcaption></figure>

Assigning a new phone number to your assets is an essential part of this process.

<details>

<summary>Step-by-step of project deployment</summary>

**Essential**

1. **Ensure Conversation Flow Training:** Verify that your conversation flow is adequately trained before initiating deployment.
2. **Initiate Deployment:** Click on the "Deploy Version" option within your project.
3. **Assign a Phone Number:** Associate the created phone number with your deployment.
4. **Assign a Bubble:** Associate chat bubble with your deployment (in case of chatbot deployment).
5. **Record calls:** an option to automatically record calls, which you can later find within project.
6. **Language split:** in case more than one language is supported within project.
7. **Speech to text provider:** select your preferred provider
8. **Text to speech provider:** select your preferred provider
9. **Voice model:** select your preferred voice model
10. **Repeat question after no answer:** how many times bot should repeat a question if no answer from customer.

**Extras**

1. **Backround music:** preferences for call recordings and background music (upload custom tracks in assets).
2. **Whitelisting or blacklisting** specific numbers as needed.

**Confirm Deployment:** Click "Confirm" to execute and deploy your project.

**Test Your Conversation Flow:** Run a test call to ensure the effectiveness of your deployed Conversation Flow.

</details>

{% hint style="info" %}
Ensure your project is trained and has an assigned phone number in assets before deployment. You can refer to our step-by-step guide in the "Create First Project" chapter for assistance.&#x20;
{% endhint %}

Minor adjustments may be required in the project to successfully deploy your voicebot.


# Conversation Flow

Where would you like to go? Click the card below or use the right-side navigation

<table data-card-size="large" data-view="cards"><thead><tr><th data-card-target data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/UbNJ2MNs9fV2I2TQQb8t">/pages/UbNJ2MNs9fV2I2TQQb8t</a></td><td>How does the Conversation editor looks like?</td><td></td></tr><tr><td><a href="/pages/MqzoVclSLtVgtk9MfHxv">/pages/MqzoVclSLtVgtk9MfHxv</a></td><td>Nodes are basic flow building blocks</td><td></td></tr><tr><td><a href="/pages/pcQnYwI3GzsmZ53yPlo9">/pages/pcQnYwI3GzsmZ53yPlo9</a></td><td>Train your project and improve your flow</td><td></td></tr><tr><td><a href="/pages/7RIigcsiffgilPZigOkQ">/pages/7RIigcsiffgilPZigOkQ</a></td><td>Learn how to deploy the project</td><td></td></tr></tbody></table>


# User Interface Basics

Before starting work on any Conversation Flow, whether creating a new project or updating an existing one, it is important to understand the basics of the User Interface

### **Overview of the New Blank Project**

To start from scratch, refer to the [Creating Project](/digital-agent/workspace/list-of-projects) page for detailed instructions.&#x20;

Remember, you can also **import projects** based on your templates into your workspace.&#x20;

To understand different versions, check out the [Project Version History ](broken://pages/NbR5bCBZnYtNWpMVaK3n)and refer to the video below.

<figure><img src="/files/jhIHYCKKWO2glixGhSm3" alt=""><figcaption><p>creating new flow</p></figcaption></figure>

{% tabs %}
{% tab title="Top Panel" %}

<figure><img src="/files/HPxgkwrDcKVnMCFkh7oi" alt=""><figcaption></figcaption></figure>

\
The top panel of our platform provides essential tools and functionalities for seamless project management and navigation. Let's break down each component:<br>

#### 1. Files:

The Files section serves as a gateway to manage your project files and configurations. It contains a dropdown menu with the following options:

* **Import:** Allows you to import files or data into your project from external sources.
* **Export:** Enables you to export project files or data for sharing or backup purposes, deal for creating various project cases and scenarios.
* **Shortcuts:** Provides access to keyboard shortcuts overview for quick navigation and actions within the platform.
* **Settings:** Allows you to customize project settings and configurations according to your preferences. See [Setting tab](/digital-agent/conversation-flow/setting-tab) for detail explanation.
* **Variables overview:** list of all variables within selected project.

#### 2. Cursor Icons:

These icons offer flexibility in navigating and interacting with the project canvas:

* **Standard Cursor:** Allows you to select and interact with nodes and elements on the canvas.
* **Hand Cursor:** Enables you to grab and move nodes or scroll within the canvas for better navigation.

#### 3. Comment Icon:

Clicking on this icon activates the commenting feature, allowing users to add comments.

#### 4. Sync Toggle:

This toggle allows you to enable or disable synchronization between the flow diagram and the code.

#### 5. Undo/Redo Icons:

These icons offer the ability to undo or redo previous actions, providing a safety net for experimentation and preventing accidental changes.

#### 6. Search Panel:

The search panel provides a convenient way to search for nodes within your project by their names, allowing for quick navigation and location of specific elements.
{% endtab %}

{% tab title="Nodes panel" %}
The left panel showcases Nodes and an interactive panel with various building blocks. For a deeper understanding, explore the [Nodes Explained chapter](/digital-agent/conversation-flow/nodes-explained).
{% endtab %}

{% tab title="Zoom panel" %}
Use basic interaction options such as zoom-in, zoom-out, or fit to the project screen by clicking on the basic interaction menu.
{% endtab %}

{% tab title="Bottom panel" %}

1. **Save:** Save the current project status. If the Flow Editor and Code Editor are synced, automatic saving is enabled.
2. **Save  Version:** Saving the model version is crucial. Visit "Project Fundamentals" to understand why versioning matters.
3. **Train Version:** This feature is used to train the completed project flow (explained later).
4. **Deploy Version:** Change parameters and deploy your created project.
5. **Test:** This offers advanced technical logs about the project in the elastic app, more suitable for advanced users and optimization purposes.
6. **Notes:** Blank pages for notes, thoughts and ideas about your project.
7. **Comments:** Overview of all existing comments within the project.
   {% endtab %}
   {% endtabs %}

### Comments

To enhance cooperation and streamline communication, users have the flexibility to add two types of comments:

* **General comments**\
  General comments provide a space for users to share overall feedback, ask questions, or discuss ideas that are not tied to any specific node or element within the project. They can be placed anywhere on the canvas and are not tied to a specific node.
* **Node-specific** **comments**\
  Node-specific comments offer more targeted feedback by linking comments directly to specific nodes or elements within the project. This feature is invaluable for providing precise feedback on particular parts of a conversation flow, code segments, or design components.

<figure><img src="/files/g1m5sgjX2TM0HayyXVVd" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Gl92AYuGSj4v6F2cNlI3" alt=""><figcaption></figcaption></figure>

<details>

<summary>Creating comments step-by-step</summary>

1. **Access the Comment Feature:** Locate the comment icon in the top menu among other tools. Click on this icon to activate the comment feature.
2. **Placing Comments:**
   * For general comments: Click anywhere within the project where you want to place the comment.
   * For node-specific comments: Click on the specific node or element within the project to tie the comment with that particular node.
3. **Compose Your Comment:** A text box will appear where you can type your comment. Write the text of your comment, providing feedback, asking questions, or sharing ideas as needed.
4. **Save Your Comment:** Once you've written your comment, click on the check mark icon to save it. Your comment will be added to the project, visible to all users with access to the project.

</details>

<details>

<summary>Editing comments step-by-step</summary>

1. **Select Comment:** Click on the comment directly within the canvas or in the comment panel. This action fully opens the comment.
2. **Access Editing Mode:** Once the comment is opened, click on the pencil icon. This action allows you to edit the content of the comment.
3. **Edit Comment:** Update the text of the comment as needed, making any necessary changes or revisions.
4. **Save Changes:** After editing the comment, click on the check mark icon to save your changes

</details>

<details>

<summary>Assigning comments to user step-by-step</summary>

1. **Write Your Comment:** Begin writing your comment in the text box.
2. **Tag a User:** To assign the comment to a specific user, type "@" followed by the user's name. As you type, suggestions of other users in your organization will appear. Select the appropriate name from the suggestions to assign the comment to that user.\
   :exclamation:Remember, you can tag only users who have access to the project, see [Project Details](/digital-agent/workspace/project-details#users-settings) for details.
3. **Complete Your Comment:** Continue writing the rest of your comment as needed.
4. **Save Your Comment:** Once your comment is complete, click on the check mark icon to save it. The comment will now be assigned to the selected user

</details>

<details>

<summary>Managing comments step-by-step</summary>

**Marking Comments:**

1. **Mark as Read/Unread:**
   * To indicate that you've read a comment, simply click on the icon <img src="/files/jPJhmrcFxpo4gr5ZIN1R" alt="" data-size="line">, and it will be marked as read.
   * Similarly, if you want to mark a comment as unread to revisit it later, click on the icon again, and it will revert to an unread status.

#### Resolving Comments:

2. **Mark as Solved:**
   * If a comment has been addressed or no longer requires attention, you can mark it as solved.
   * This action will remove the comment from the canvas or comment panel, streamlining the view for unresolved comments.

#### Filtering Comments:

3. **Filtering Options in Comment Panel:**
   * You can filter comments in the comment panel based on different criteria:
     * Only comments you've made.
     * All comments marked as read.
     * All comments marked as solved.
   * By default, you'll see all unresolved comments in the order of their creation or last update.

**Delete Comment:**

4. #### Deleting Comments:

* If a comment is no longer needed or is redundant, you can delete it by clicking on the trash bin icon associated with the comment.

</details>

### Notes

Within each project, **a notepad** is provided, offering a simple yet powerful tool for collaboration and organization.&#x20;

The notepad features a user-friendly graphical interface with a blank space where you can jot down your thoughts, ideas, and reminders. Additionally, a formatting panel is available, allowing you to customize the appearance of your notes with options such as font styles, colors, and list formatting.

<mark style="color:yellow;">SPend</mark>

<figure><img src="/files/kbJ8TR2TrNA8nmy3X6ts" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/5lHAAJ18AKuyjWunAOYR" alt=""><figcaption></figcaption></figure>

***

### **Overview of the Not-so-Blank Project**

Here, you'll find the editor displaying an example project. We have a flow with connections and nodes as the primary building blocks shaping our conversational flow, featuring a starting node and an end node (phones). After training the version, we gain access to the chatbot widget, allowing us to toggle the left navigation bar and hide/show the node bar.&#x20;

This straightforward project was built step-by-step (refer to the [Creating My First Virtual Assistant](/digital-agent/building-new-projects) page), utilizing nodes as fundamental building blocks, elaborated further in the upcoming chapter - [Nodes Explained](/digital-agent/conversation-flow/nodes-explained).

<figure><img src="/files/51k64lM0wxXJMMpnmWNv" alt=""><figcaption><p>Training example project</p></figcaption></figure>

<details>

<summary>Step by step to train the project</summary>

See the more information about training / untraining version in page (Training model)

Prerequsities - having the completed conversation flow, see the example project in page - Creating  my first Virtual Assistant

1. Select the right project
2. Click "Train version"
3. Click chatbot widget in bottom right corner and start interacting with simple chatbot (Virtual assistant)
4. Check the flow
5. Untrain model, make modification and train again

</details>

{% hint style="info" %}
You can see that we can expand the chatbot widget or move it to the middle by clicking the buttons in the top left corner
{% endhint %}

***

### Simplified interactions using shortcuts

These shortcuts are designed to enhance your workflow and help you navigate the studio with ease. Check out the new shortcuts in action below:

<figure><img src="/files/5ja4aACuOyM6O8pd9TrX" alt=""><figcaption></figcaption></figure>

#### Learn how to use shortcuts&#x20;

You can find a comprehensive overview of all the new shortcuts within the app. Just navigate to FILE -> Shortcuts modal to learn more and incorporate them into your projects.

{% tabs %}
{% tab title="Deployment" %}
Ideal for training, deployment, and various project management tasks.

<table><thead><tr><th width="256">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + S</td><td>Save</td></tr><tr><td>ALT + SHIFT + S</td><td>Save model version</td></tr><tr><td>ALT + SHIFT + I</td><td>Import</td></tr><tr><td>ALT + SHIFT + E</td><td>Export</td></tr><tr><td>ALT + SHIFT + T</td><td>Train version / untrain</td></tr><tr><td>ALT + SHIFT + F</td><td>Test in debug</td></tr><tr><td>ALT + SHIFT + D</td><td>Project Deploy</td></tr></tbody></table>
{% endtab %}

{% tab title="Edit" %}
Streamline your editing process with these handy shortcuts.

<table><thead><tr><th width="301">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>CTRL + C</td><td>Copy</td></tr><tr><td>CTRL + V</td><td>Paste</td></tr><tr><td>CTRL + X</td><td>Cut</td></tr><tr><td>CTRL + D</td><td>Duplicate</td></tr><tr><td>ALT + F</td><td>Find</td></tr><tr><td>Shift + Left mouse</td><td>Multiselect</td></tr></tbody></table>
{% endtab %}

{% tab title="Essentials" %}
Familiar essential shortcuts, now with ALT replacing CTRL for improved accessibility.

<table><thead><tr><th width="237">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + Y</td><td>Redo</td></tr><tr><td>ALT + Z</td><td>Undo</td></tr><tr><td>ESC</td><td>Escape the node</td></tr><tr><td>BACKSPACE</td><td>Delete node</td></tr><tr><td>END</td><td>Previous node</td></tr><tr><td>ALT + G</td><td>Group selection</td></tr><tr><td>ALT + SHIFT + G</td><td>Ungroup selection</td></tr></tbody></table>
{% endtab %}

{% tab title="Nodes" %}
Effortlessly create multiple nodes with a simple click on the canvas. Press ESC to revert to the normal cursor.

<table><thead><tr><th width="266">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>SHIFT + M</td><td>Message node</td></tr><tr><td>SHIFT + A</td><td>Answer node</td></tr><tr><td>SHIFT + D</td><td>Decision node</td></tr><tr><td>SHIFT + F</td><td>Function node</td></tr><tr><td>SHIFT + G</td><td>Generative AI node</td></tr><tr><td>SHIFT + R</td><td>Redirect</td></tr><tr><td>SHIFT + T</td><td>Transfer </td></tr><tr><td>SHIFT + E</td><td>End</td></tr></tbody></table>
{% endtab %}

{% tab title="Tools" %}
Navigate UI changes quickly with shortcuts for the move tool, hand tool, and comment tool.

<table><thead><tr><th width="175">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + V</td><td>Move tool</td></tr><tr><td>ALT + H</td><td>Hand tool</td></tr><tr><td>ALT + C</td><td>Insert comment</td></tr><tr><td>ALT + SHIFT + C</td><td>Show/hide comment panel</td></tr><tr><td>ALT + SHIFT + N</td><td>Open / hide notepad</td></tr></tbody></table>
{% endtab %}

{% tab title="Zoom" %}
Enhance your project view with quick zoom in/out shortcuts.

<table><thead><tr><th width="229">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>Mouse wheel</td><td>Zoom in / out</td></tr><tr><td>SHIFT + 1</td><td>Zoom to fit</td></tr><tr><td>SHIFT + 2</td><td>Lock interactivity</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Special Note for Mac Users:**&#x20;

Don't worry, we've got you covered! Mac users can enjoy these shortcuts by using the OPTION key in place of ALT, and the COMMAND key instead of CTRL.
{% endhint %}

***


# Nodes Explained

In this chapter, we aim to provide comprehensive explanations of each type of node.

Click on each node to explore its details and gain insight into our foundational building blocks within the [Conversation Flow ](/digital-agent/conversation-flow)application.

We provide an in-depth understanding of each node at a configuration level along with practical recommendations. This chapter serves as a high-level introduction to the primary functions of these nodes, showcasing various usage scenarios. For practical application and a hands-on experience, visit the [Creating Your First P](/digital-agent/building-new-projects)[roject](/digital-agent/building-new-projects) page.

## Nodes list

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/5v4yIvZVYaRZjIHR9FEU">/pages/5v4yIvZVYaRZjIHR9FEU</a></td><td>Enables your chatbot or voicebot to engage with your customers directly.</td><td><a href="/pages/5v4yIvZVYaRZjIHR9FEU">/pages/5v4yIvZVYaRZjIHR9FEU</a></td></tr><tr><td><a href="/pages/Eb8At1yFZFsLZlAexN7a">/pages/Eb8At1yFZFsLZlAexN7a</a></td><td>Serves as a pivotal point within the logic, allowing understanding of customer intents and name entities.</td><td><a href="/pages/Eb8At1yFZFsLZlAexN7a">/pages/Eb8At1yFZFsLZlAexN7a</a></td></tr><tr><td><a href="/pages/y0a393y5FHWJGoGdDaBS">/pages/y0a393y5FHWJGoGdDaBS</a></td><td>Serves as a valuable feature to drive the flow of the conversation based on the defined conditions.</td><td><a href="/pages/y0a393y5FHWJGoGdDaBS">/pages/y0a393y5FHWJGoGdDaBS</a></td></tr><tr><td><a href="/pages/OCOqGP1ZLguZnX5PsMqb">/pages/OCOqGP1ZLguZnX5PsMqb</a></td><td>Serves various purposes, allowing for the execution of multiple functions and interactions with backend systems.</td><td><a href="/pages/OCOqGP1ZLguZnX5PsMqb">/pages/OCOqGP1ZLguZnX5PsMqb</a></td></tr><tr><td><a href="/pages/9CbbWPxQDo75KxDtJYlg">/pages/9CbbWPxQDo75KxDtJYlg</a></td><td>Utilize Large Language Models and theri generative features in you conversation.</td><td><a href="/pages/9CbbWPxQDo75KxDtJYlg">/pages/9CbbWPxQDo75KxDtJYlg</a></td></tr><tr><td><a href="/pages/KAdyg1s29hnerdbijchi">/pages/KAdyg1s29hnerdbijchi</a></td><td>Plays a pivotal role in complex and advanced projects, facilitating moving the conversation between different projects in your workspace</td><td><a href="/pages/KAdyg1s29hnerdbijchi">/pages/KAdyg1s29hnerdbijchi</a></td></tr><tr><td><a href="/pages/PwyQkutfRstdv1yDH1XI">/pages/PwyQkutfRstdv1yDH1XI</a></td><td>The 'Redirect' node plays a significant role in redirecting the conversation to human agent</td><td><a href="/pages/PwyQkutfRstdv1yDH1XI">/pages/PwyQkutfRstdv1yDH1XI</a></td></tr><tr><td><a href="/pages/TDp5fbJakbitK5YFOgmh">/pages/TDp5fbJakbitK5YFOgmh</a></td><td>Defining the starting and ending points within is crucial for the successful implementation</td><td><a href="/pages/TDp5fbJakbitK5YFOgmh">/pages/TDp5fbJakbitK5YFOgmh</a></td></tr></tbody></table>

***

## Create a new project to start exploring on your own

<figure><img src="/files/GGGmJn9OtHaqSzLWHX0n" alt=""><figcaption><p>Nodes - basic introduction</p></figcaption></figure>

On the Workspace tab, create a new project and navigate to the Conversation flow tab to continue.


# MESSAGE node

Use Message node when you want to tell something to the customer.

This node is a basic element within the [Conversation Flow](/digital-agent/conversation-flow), facilitating communication between your digital agent and the customer. It serves various purposes such as:

* posing questions
* providing guidance
* offering information

Within [**'Message'** nodes](/digital-agent/conversation-flow/nodes-explained/message-node), you have the flexibility to add, delete, or edit multiple text or voice blocks. Each block is considered as one "chat bubble" in case of chat conversation.

Incorporate basic text or utilise variables, for dynamic content. Just start typing with curly brackets `{}` and variable names will be suggested to you. During the actual conversation, content of the variable is read to the customer.

{% hint style="info" %}
To enable using various visuals for chat conversations, we support **Markdown language**. Check out [Customizing text output](/for-advanced-users/conversation-design-tips/customizing-text-output) in Tips & Tricks chapter for a detailed guide to all the formatting wizardry.
{% endhint %}

{% hint style="info" %}
To enable intonations for voice conversations, we support **SSML language**. You can find more about intonations in [Customizing speech synthesis](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis) section.
{% endhint %}

You can use your project as either chat or voice conversation or both. That's why you can define either Text or Speech content within the Message node. In case you define just one of them, other channel use the same content.

<figure><img src="/files/GvbqfoAEhJFTGcUvxLau" alt=""><figcaption><p>Message node in nutshell</p></figcaption></figure>

***

### Variables

The variables section can be found in all node types, since it can be used for various purposes based on the goal you need to achieve. Within the Message node, variables are used to track the progress or status of the conversation. To input a string value to the variable, just use `""` quotes such as `"Invoice explained"` as the value of the variable.

***

### **Use Announcement Feature:**&#x20;

With announcements, you can create placeholders within your conversation flow. When an announcement is active (configured on the workspace tab for each project), the designated message will automatically be played at that point in the flow. This can be used for various use cases, such as informing customers about service availability issues, other technical issues, or any other emergency or time specific information. Announcements can be also scheduled.&#x20;

{% hint style="info" %}
For voice conversations, the announcement message is played to the customer as it is defined in the Announcement settings on the workspace tab.
{% endhint %}

{% hint style="info" %}
For chat conversations, you can set the type of announcement in the Message node, supporting **modal** type or **toast** type of announcement.
{% endhint %}

***

### **Advanced Settings:**&#x20;

The Message node's advanced settings are straightforward:

* **Execute after the message is played:** This option is intended for voice conversations, allowing moving the conversation to the next target node only after the message is played. This is usually used in specific scenarios such as executing some time consuming back end calls in parallel and using the Message node to bridge this time with information about what is happening and moving to next node only after the time-consuming back-end call is finished. If turned off, the Conversation Flow will continue until next Answer node, where it stops to get the response from the customer.
* **Use variable as target:** This setting caters to advanced users, enabling dynamic setting of the next target node. If turned on, variable can be used instead of specific node name.


# ANSWER node

Use Answer node when you need a response from the customer and you need to understand the intent from the response and extract some name entities.

The[ 'Answer' node ](/digital-agent/conversation-flow/nodes-explained/answer-node)essentially waits for and processes customer response, subsequently guiding the Conversation Flow based on these inputs. Let's delve into the foundational logic of the ['Answer' node ](/digital-agent/conversation-flow/nodes-explained/answer-node)step-by-step.

<figure><img src="/files/d1qBKn4Gu1FCdDzN9syN" alt=""><figcaption><p>Answer node in nutshell</p></figcaption></figure>

## Entities

Entities operate similar to variables, with the purpose of extracting information from user responses. Enable **Use Smart Function** toggle and choose from available functions to extract entities from customer response. Each smart function may have some configuration elements to further tailor what the extracted entity should look like.&#x20;

In general, **last utterance** is used as an input for entity extraction, meaning that the user's last response to the digital agent is checked, and if the entity is present there, it is stored as a value of that specific variable. Use **Custom input** field in case you want to use anything else as an input for entity extraction (i.e. content of any other variable).

{% hint style="info" %}
Learn more about smart funcitions here -> <https://smart.borndigital.ai/>&#x20;
{% endhint %}

{% hint style="warning" %}
We will update the UX/UI of the variable dialog in near future. Stay updated!
{% endhint %}

Most commonly used entity extraction types are:

* address
* advanced\_address
* advanced\_number
* birth\_number
* birthdate
* city
* date
* fullname
* phone
* registration\_plate
* street
* simple\_number
* time

***

## Intents

Intent is a meaning of what the customer said in his last utterance and thus intents enable the conversation to move further based on the context. We use 4 types how to build the intent:

<details>

<summary>Training set</summary>

You can build **your own training set** for understanding the context

* **Name**
* **Sub-Intents:** These are the main elements of the training set, where multiple sub-intents form the intent, which then provide context and allow designer to specify, what should be the response to that intent `Yes, agreed` and `I confirm` are 2 examples of sub-intents, both specifying Intent Yes which means customers confirms whatever digital agent asked him.
* **Each sub-intent should have 5-15 utterances**, forming the meaning od that sub-intent&#x20;
* You can leverage our **Intent library** by choosing "Add intent from library" option when starting to type intent in the Sub-intents dropdown
* Each intent can be also used as a **Chat button**, which can be then configured
* **Required/Forbidden in answer** - forming a "safety net" as NLU intent recognition as complex topic, where
  * *Required in Answer:* Specifies a specific word or pattern necessary in the answer (e.g., explicitly saying "Yes") for this intent to be recognised. Regexes are supported here
  * *Forbidden Answer:* Blacklists certain words or patterns, like rejecting an answer containing "Yes, don't want this" in the "Yes" intent. Regexes are supported here

</details>

<details>

<summary>Generative AI</summary>

You can leverage the generative knowledge of Large Language Models to understand the intent of user's utterance. Since these LLM models have been trained on common knowledge, they know by default what that `My invoice didn't come again`can mean `Invoice not send` intent.

</details>

<details>

<summary>Keywords</summary>

Utilize specific keywords for intent determination, e.g., using keywords like "YES," "YES, please," or "\*.S, I want it" for the "YES" intent.

</details>

<details>

<summary>Condition</summary>

Conditions aid intent recognition. For example, employing a condition like *get("name\_surname")* to assess continuity in the Conversation Flow.&#x20;

Remember, every intent must have a target node for further action.

</details>

We can use every intent as separated chat button with some basic configuration. Feel free to learn more in chapter - [Creating Your First Virtual Assistant ](/digital-agent/building-new-projects)for more informations and basic use case.

{% hint style="warning" %}
Every intent has to have a target node, what I want to do with the intent of customer.&#x20;

**For example:** Customer wants to know more about the product, intent is recognized, continue in flow to ask for specific product name.
{% endhint %}

See the page - [STEP 4.](/digital-agent/building-new-projects/advanced-project/step-4.-managing-flow-scenarios) and [STEP 5. ](/digital-agent/building-new-projects/advanced-project/step-5.-finalizing-the-project)in [Creating Your First Virtual Assitant](/digital-agent/building-new-projects) to see the intents in action

***

## Fallbacks

Fallback scenarios are a crucial component of the Answer node setup, as they provide **fail-safe mechanisms** for instances where the bot encounters challenges in processing user inputs or understanding their intents.

### Fallback triggers

Fallback occurs under the following circumstances:

* Failure to acquire input from speech-to-text (STT) conversion (applicable to voicebots and digital human only).
  * **NO\_INPUT**: This signal, pertinent only to voicebots, arises when the STT module detects silence from the user.&#x20;
  * **NO\_MATCH**: Also exclusive to voicebots, this signal occurs when the STT module fails to transcribe the user's audio input into coherent words, such as in cases of background noise.&#x20;
  * **SHUT\_UP**: This signal, applicable solely to voicebots, triggers when the user's speech exceeds a predefined duration, indicating a prolonged input.&#x20;
* Recognition failure of user intent, resulting in no identified intent.
  * **NOT\_UNDERSTOOD**: This signal applies to both voice and chat interactions, signifying that although an utterance was received, the intent recognition process failed to understand or select any options.

Each time a fallback occurs, irrespective of its trigger, the counter increments, recording the frequency of fallbacks encountered within that specific Answer node.

You have the option to chose between the following 2 courses of action, for the situation when a fallback is triggered in the conversation:

1. **Transition to another node**: you may opt to direct the conversation flow to a different node within the Digital Agent's flow. This action bypasses further interaction within the current node.
2. **Custom Fallback message**: Alternatively, you can specify a custom fallback message to be delivered to the user. This message prompts the user to retry or rephrase their input. Following the delivery of the custom fallback message, the conversation loops back to the beginning of the Answer node, affording the user a second opportunity to engage effectively. This loop mechanism provides users with a second chance to provide input and Digital agent with a second chance to process user query successfuly.

The behavior of the fallback counter is determined by its configuration:

* **Counter Set to 0**: In this case, the conversation flow proceeds directly to the target node without considering the presence of a fallback message.<br>

  <figure><img src="/files/wYb4WxvjTnIPWfAaTHjV" alt=""><figcaption><p>When Fallback counter is se to 0. Digital agent imediatelly tranfers to set target node (MSG_NEXT_NODE on example screenshot).</p></figcaption></figure>

* **Counter Set to 1**: Upon the first fallback occurrence, the conversation transitions to the first custom fallback message. Subsequently, upon encountering a second fallback, the flow proceeds to the target node as the maximum fallback count has been reached.

<figure><img src="/files/uqmwJ9m9u4cEl1mFGAXy" alt=""><figcaption><p>When the Fallback counter is set to 1, the Digital agent outputs the First fallback message upon counting the fallback the first time. Then it loops back to the start of the node and waits for a new user input. If fallback is counted for the second time in this node, flow continues according to the set target node (MSG_NEXT_NODE in the screenshot example).</p></figcaption></figure>

* **Counter Set to 2**: The first fallback event directs the conversation to the **First custom fallback** message. Upon the second fallback, the flow transitions to the **Repeated custom fallback message.** Finally, upon encountering a third fallback, the conversation progresses to the target node, having exhausted the maximum fallback count.

<figure><img src="/files/5xAkq8ifq8XibGK5XOAz" alt=""><figcaption></figcaption></figure>

* **Counter Set to Higher Values**: For counters set to values higher than 2, the behavior remains consistent with the previous scenarios. The conversation initially proceeds to the first custom fallback message upon the first fallback occurrence. With each subsequent fallback, the flow transitions to the repeated custom fallback message until the maximum fallback loop count specified in the counter is reached. Upon reaching this limit, the conversation proceeds to the target node.

<figure><img src="/files/ORxKMEsdJqRkRXtLXQ4d" alt=""><figcaption></figcaption></figure>

Once the fallback repetition count reaches its limit (e.g., if the configured count is 2 and the fallback cycle occurs for the third time in a specific ANS node), the conversation flow progresses to the designated target node.&#x20;

{% hint style="info" %}
**Note!** :pencil:\
Fallback counter operates **locally within Answer nodes.** Each time the conversation falls back due to intent recognition failure, a count is incremented within that node, resetting when moving to a new node.

**Example:** Imagine a scenario with three nodes, each representing a question. If the fallback counter is set to 2 within each node, it means the fallback message can occur up to twice for each question. So, in total, the fallback could happen up to six times throughout the conversation, with two fallbacks per question, before transferring to an operator.

Understanding this local behavior is key for designing a smooth user journey and knowing when to transition to human assistance
{% endhint %}

{% hint style="info" %}
**Note!** :pencil:

If you enable **reuse utterance** for fallbacks in the advanced settings (for more details see [#advanced-settings](#advanced-settings "mention")) the signal (`no_input,` `no_match`, `shut_up`) and empty utterance will be carried over to the next ANS node it encounters in flow and reused as input there!
{% endhint %}

{% hint style="warning" %}
:tada:**Upcoming Feature:** Exciting news! We're working on a feature for global fallback counting. Stay tuned for updates!
{% endhint %}

### Setting Custom Fallback messages

In ANS node modal, you have the option to customize fallback responses according to specific scenarios triggered by different signals. This customization process involves creating distinct messages for each type of signal, ensuring tailored interactions with users based on their input or lack thereof.

<figure><img src="/files/uhU7jzXemuEv6zWwPaZM" alt=""><figcaption></figcaption></figure>

<details>

<summary>Setting custom Fallback messages step-by-step</summary>

To customize fallback messages:

1. Click on the "Create custom messages" button.
2. Toggle the switch to enable custom message settings.
3. A dialogue window will appear, allowing administrators to set custom messages for each type of trigger signal

</details>

Additionally, you can skip the custom messages and set different target nodes for each type of trigger, directing the conversation flow to the next node right away, based on the nature of the input signal received.

<figure><img src="/files/G8jlkveSmtzyQid4tV7x" alt=""><figcaption></figcaption></figure>

<details>

<summary>Setting Custom fallback target</summary>

To customize fallback targets:

1. Click on the "Create custom messages" button.
2. Toggle the switch to enable custom message settings.
3. A dialogue window will appear, select the **Target node** option.
4. Fill in the name of the desired target.<br>

   <div align="left"><figure><img src="/files/vkHUw529No4cKPNtPZmq" alt=""><figcaption></figcaption></figure></div>

</details>

{% hint style="warning" %}
**Note!** :pencil:\
Within **chatbot** flows, configuring **custom fallback messages for 'NO\_INPUT,' 'NO\_MATCH,' and 'SHUT\_UP' signals is&#x20;**<mark style="color:red;">**redundant and unnecessary**</mark><mark style="color:red;">.</mark> These signals are specifically related to the functionality of speech-to-text conversion, which is not utilized in chat channels. Therefore, these signals never occur in a chat-based environment.
{% endhint %}

**Custom Messages Examples:**

* **NO\_INPUT:**
  * *First Message*: `"Apologies, I didn't catch that. Could you please repeat?"`
  * *Repeated Message*: `"Sorry, I still couldn't hear you. Please try again."`
* **NO\_MATCH:**
  * *First Message*: "`I'm sorry, I couldn't understand your query. Can you provide more clarity?"`
  * *Repeated Message*: `"It seems I'm still having trouble understanding. Could you rephrase your question?"`
* **SHUT\_UP:**
  * *First Message*: `"Could you sum that for me in a one sentence, please?"`
  * *Repeated Message*: "`Remember, shorter queris make our conversation smoother and more effective. Let's keep it brief for better understanding.`
* **NOT\_UNDERSTOOD:**

  * *First Message*: `"Apologies, I couldn't understand your request. Could you provide more information?"`
  * *Repeated Message*: `"I'm still having difficulty understanding. Can you try rephrasing your request?"`

***

## Advanced settings

Advanced settings within the 'Answer' node are quite complex. The advanced settings are designed to unlock the full potential of your Digital agent. These settings delve deeper into the intricacies of your bot's functionality, catering to both novice and seasoned users alike.

Advanced settings encompass a diverse range of features, spanning from f**ine-tuning speech-to-text timeouts** to **customizing the UI chat bubble appearance** and **optimizing obtaining  user utterance** and **intent recognition processes**. These settings offer users granular control over various aspects of their bot's behaviour, empowering them to create more sophisticated and tailored conversational experiences.

<figure><img src="/files/OoCOevTD8n1bDOi6Cwsb" alt=""><figcaption></figcaption></figure>

<details>

<summary>Accessing Advanced setting step-by-step</summary>

* **Open the Answer Node (ANS):** Start by opening the Answer Node within your conversation flow. You can do this when creating a new flow or editing an existing one.
* **Navigate to Advanced Settings:** Within the Answer Node settings, look for an option labeled as "Advanced Settings." Click on this option to access the interface for advanced configuration.
* **Explore Advanced Settings:** Upon entering the advanced settings, you'll gain access to a wider range of features and options for fine-tuning your conversational assistant. Here, you can adjust various parameters related to speech recognition, UI chat bubble appearance, intent recognition, and other advanced functionalities.\
  When you open the dialog window for Advanced settings, you'll find fields for inputting values or toggle buttons that enable specific features. After toggling these buttons to enable certain functionalities, additional fields for inputting sub-parameters may appear.

</details>

### Speech-to-text timeouts

Let's break down the speech-to-text timeouts and explain when they're used, what they control, and their default values. It's also important to note that **these settings are local to the specific Answer Node** and apply only to that node.

#### **No Input Timeout**

<figure><img src="/files/dx7zrytNT0CZ34HJ5udH" alt=""><figcaption></figcaption></figure>

* Default Value: 15 seconds.
* This parameter sets the threshold time for detecting no response from the user. After this period, if the system detects no input from the user, it triggers the `'no_input'` action signal. Based on this trigger, the system can either progress or activate fallback actions within the conversation flow. See [#fallback-triggers](#fallback-triggers "mention")

#### **Maximum Listening Time**

<figure><img src="/files/prBbnczBPQhONgVHC6V9" alt=""><figcaption><p>Maximum listening time advances settings.</p></figcaption></figure>

* Default Value: 15 seconds.
* This setting is useful in scenarios where the user speaks for an extended period, and transcription keeps coming. After this period, the system sends a `'shut_up'` signal, which can trigger fallback actions or transfer to the next node in the flow, based on the configuration of the Answer Node. See [#fallback-triggers](#fallback-triggers "mention")

#### **Continuous Transcription**

<figure><img src="/files/icDBO20KGE49cMxgUAH6" alt=""><figcaption></figcaption></figure>

* Default Value: Disabled.
* Recommended for open-ended questions, continuous transcription allows the Answer node to wait for extended pauses in speech before processing the information. This setting enhances transcription accuracy by capturing the user's complete utterance, even if they briefly stop to think or catch a breath.
  * **End Transcription:**
    * Default Value: 1800 milliseconds.
    * When Continuous Transcription is enabled, this feature determines the timeout for concluding continuous transcription in specific scenarios. It optimizes resources by stopping transcription when no longer needed, enhancing performance.
    * Values are specified in milliseconds. When the user pauses for a second, speech-to-text continues transcription but ends it and sends input when the pause reaches 1800 milliseconds (or the set value).

{% hint style="warning" %}
**Note!** :pencil:\
These **speech-to-text settings** are specifically tailored for **voice-based interactions**, such as those with voicebots or digital human interfaces.&#x20;

For chatbots, configuring these settings is not applicable, as chat interactions do not involve speech-to-text processing. Therefore, signals like `'no_input`' or `'shut_up'` cannot be triggered within a chat environment. When setting up your conversational assistant, consider the nature of your interaction channels to optimize settings accordingly.
{% endhint %}

### DTMF settings

DTMF signals are audio tones generated when a user presses keys on a phone keypad or similar input device. These tones are commonly used for interactive voice response (IVR) systems, allowing users to input numerical or menu selections during a phone call.

<figure><img src="/files/A5pECOLqL5yxVjz7Jy8m" alt=""><figcaption><p>DTMF signal advanced setting.</p></figcaption></figure>

#### **Expected DTMF Signals Length**

* Default: 0 (must be set to higher value).
* This parameter specifies the expected length of DTMF signal string, eg. 10 for a 10-digits order ID.
* For instance, if we expect the user to press a single digit like "press one," after receiving the first digit, the system won't wait for additional input. However, it's crucial to set the signal length appropriately. For example, on a scale from 0-10 or 1-10, the signal length must be set to 2. Otherwise, after pressing 1, the system won't wait for subsequent input, preventing the user from entering 10.

#### **DTMF Timeout**

* Default: 3000 milliseconds (also minimum required, cannot be set to a lower value).
* This setting determines how long the system waits for DTMF input, in milliseconds.
* After this period, if no input is received, the system proceeds according to further configuration in ANS node.

#### **Received DTMF Signal Silences Playback**

* When enabled, received DTMF signals silence the playback of the current natural language processing (NLP) response.
* This feature ensures that if the user inputs DTMF signals during a response playback, the system interrupts the playback to process the input promptly.

{% hint style="warning" %}
**Note!** :pencil:\
These DTMF (Dual-Tone Multi-Frequency) signal settings are specifically designed for voicebots, as they facilitate interaction via phone keypad inputs during phone calls.

Therefore, configuring DTMF settings is irrelevant for chatbots and digital humans, where users interact via chat, microphone or terminals rather than telephone calls. When setting up your conversational assistant, consider the input methods available to your users to optimize settings accordingly.
{% endhint %}

### Chat interface settings

Discover advanced settings to customize the chat bubble output in the Answer Node. From hiding the chat input field to enabling file uploads, optimising user interactions and streamlining the conversational experience.

#### **Hide Chat Input Field**

* This setting **hides or disables the manual input option in the chat field.**&#x20;

<figure><img src="/files/P59VLT0FEim3HoXn4ECO" alt=""><figcaption><p>Hiding chat input field advanced setting.</p></figcaption></figure>

* It's beneficial when your conversational flow relies solely on button selections for intents, streamlining the user experience. For instance, if your chat interface presents users with predefined button options and you prefer they choose from those options rather than inputting free text, enabling this setting ensures users must make a selection, promoting clearer interaction paths.

<figure><img src="/files/CLcRzjcoyMkHmstwTOow" alt=""><figcaption><p>Here's what hidden chat input field looks like in combination with chat buttons.</p></figcaption></figure>

#### **Use as a Widget**

Engage the Answer node as a [widget](/digital-agent/advanced-functions/widgets) for specialized uses. This feature caters to advanced users seeking enhanced functionalities, offering additional customization options and integration capabilities.&#x20;

<figure><img src="/files/BhFoLBMvbcVt44AkHb55" alt=""><figcaption><p>Setting ANS node as a widget.</p></figcaption></figure>

* When enabled, a code window appears for inserting the widget code. Widgets provide alternative ways of obtaining user input (such as [forms](/digital-agent/advanced-functions/widgets#generic-form), [star ratings](/digital-agent/advanced-functions/widgets#star-rating), [NPS ratings](/digital-agent/advanced-functions/widgets#nps), etc.)
* After training the projects, the widget will be rendered in the chat bubble interface upon entering the given ANS node. User input obtained within widgets is logged and processed based on further configuration of ANS node or the rest of the flow.

<figure><img src="/files/K4tF6UeGbSNnNpgbbO3J" alt=""><figcaption><p>Here's what widget (star rating type) in chat bubble interace might look like. </p></figcaption></figure>

* All types of widgets are pre-developed, but customizable.  This feature is intended for advanced users only as it requires coding skills. For detailed documentation on widgets and code examples see [Widgets](/digital-agent/advanced-functions/widgets).

{% hint style="warning" %}
🔔 **Coming Soon: No-Code Widget Builder** Stay tuned for an upcoming enhancement to widget functionality! We're planning to revamp widgets and introduce a no-code feature, allowing users to easily create custom widgets using the widget builder
{% endhint %}

#### **Allow File Upload**

<figure><img src="/files/tHsnnXQzB0OLtT0No0Gj" alt=""><figcaption><p>Allowing file upload advances setting.</p></figcaption></figure>

* In summary, enabling Allow File Upload adds a functionality to the chat bubble interface, allowing users to share files. The associated parameters, Upload Timeout and Maximum Uploaded File Size, control the timeout duration for the upload process and set limits on the size of uploaded files, respectively.
  * **Upload Timeout**
    * Default: 10000
    * This parameter specifies the limit, in milliseconds, for the duration the system waits for the file upload process to complete.
    * If the upload process exceeds this timeout period, the system may trigger a timeout action or display an error message, depending on the configuration.
  * **Maximum Uploaded File Size**
    * Default: 10
    * This parameter specifies the limit of the file size in megabytes.
    * If a user attempts to upload a file that exceeds this size limit, the system may reject the upload or display an error message.

{% hint style="warning" %}
**Note!** :pencil:\
These chat bubble output settings are specifically **designed for chat channels**, where users interact with the conversational assistant via text-based interfaces. In voice channels, such as phone calls, users utilize voice interfaces to provide input. Therefore, these setting**s are not applicable to voice channels.**
{% endhint %}

### Other advanced settings

#### **Use Variable as Target**

<figure><img src="/files/3A9y59YS8bgP8moVN7ZK" alt=""><figcaption></figcaption></figure>

* This advanced setting empowers node naming through specific variables, allowing for customized operations. It enhances flexibility and control over how intents are processed and managed.

#### **Enable Language Detection**

<figure><img src="/files/SccFfs96oQSSaqudXelR" alt=""><figcaption><p>Enabling language detection advanced settings.</p></figcaption></figure>

* Activating this feature allows the 'Answer' node to analyze provided answers and determine the conversation's language. Useful for multilingual voicebots and digital humans or for directing users to appropriate language-specific flows.
* :exclamation:Language detection is an advanced **speech-to-text feature**. As such, it won't detect the language of utterances obtained by a chat interface and **does not apply to chatbots.**
* When enabled, the result of language detection is stored in a variable called `language_detection`. The value represents the two-letter ISO code of the detected language, such as "en" for English, "de" for German, or "pl" for Polish.
* Enabling language detection affects speech-to-text processing because it occurs before transcription begins. This process may take longer to receive the transcription of the user's utterance. Consequently, there will be a delay between when the user stops speaking and when the bot starts responding. This delay is due to several processing steps taking place in between, each taking a few milliseconds to a second.
* Enabling language detection merely stores the ISO language code in the background. If we intend to use language detection to control subsequent flow steps or transfer to another project based on language, we must manually configure this.
  * For instance, within an Answer Node, we can set up a condition like `language_detection == "de"`, where the target node is set to [transfer](/digital-agent/conversation-flow/nodes-explained/transfer-node) to a German language-specific project (`TRAN_DE`). This manual configuration ensures that the conversation continues appropriately based on the detected language.\
    ![](/files/yIyHaCmZz3UvqtWqCUnt)

#### **Reuse Utterance**

<figure><img src="/files/qKVdjg9HlW6y6rXysn28" alt=""><figcaption><p>Advanced setting for reuseíng utterance in case the intent eas not recognized and utterance ended in fallback.</p></figcaption></figure>

* Stores unrecognized utterances (failure of intent recognition) obtained in the ANS node where this setting is enabled and **reuses the utterance in the next Answer Node in the flow**.
* This feature applies only to utterances that fall into the fallback category. If we want to reuse recognized utterances, we must enable reuse within the intent configuration.
* :exclamation:Caution! When this setting is enabled, it means that utterances from the fallback are carried forward until they encounter the next Answer Node in the flow. In the subsequent node, instead of stopping and waiting for new input, it evaluates the utterance remembered from the previous step.
* This behaviour also applies to signals from speech-to-text (`no_input`, `no_match`, `shut_up`). In that case, obtained input is a signal value and empty utterance (e.g. `signal 'shut up' and utterance ""` is logged in tech logs)  and this input is carried over to the next ANS node and reused as an input there as well.
* This feature is beneficial, for example, when designing a decision tree-like flow with gradual intent recognition. At the first level, we obtain the utterance and recognize only the general topic (e.g., Invoice). Then, we want to reuse this utterance in the next Answer Node, which focuses only on invoices and further categorizes them into specific topics (send invoice, missing invoice, wrong sum, unpaid).


# DECISION node

The 'Decision' node serves as a valuable feature for creating branching scenarios within your Conversation Flow

In this example overview, prerequisites are established through the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node) or some variable in the[ 'Answer' node ](/digital-agent/conversation-flow/nodes-explained/answer-node)before reaching the 'Decision' node. To witness its application, refer to the chapter [Creating Your First Virtual Assistant](/digital-agent/building-new-projects):

* **County:** Tracks the number of times the user crosses the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node).
* **Value:** Assuming the value is set to 32, multiple scenarios are crafted based on these values to bifurcate the [Conversation Flow](/digital-agent/conversation-flow).

<figure><img src="/files/KhqAGJijZRNMu65j92Gs" alt=""><figcaption><p>Decision node in nutshell</p></figcaption></figure>

Precise conditions within the ['Decision' node](/digital-agent/conversation-flow/nodes-explained/decision-node) hold utmost significance. Conditions are processed sequentially, moving from the first to the last. When a condition is met, the connected target node is triggered.&#x20;

In cases where no conditions match, the ['Decision' node](/digital-agent/conversation-flow/nodes-explained/decision-node) resorts to the 'Other' path, similar to a fallback function seen in other nodes. Visualize it as akin to an SQL Case function (when/else logic).

{% hint style="info" %}
Consider altering the condition order based on your flow logic and priority for optimal decision-making within your [Conversation Flow](/digital-agent/conversation-flow)
{% endhint %}


# FUNCTION node

The 'Function' node serves various purposes, allowing for the execution of multiple functions and interactions with backend systems.

Here's an overview of the function node configuration tab and some practical use cases:

['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node) are versatile and can perform various tasks, including retrieving, posting, or manipulating information from backend systems. To see practical examples, refer to the chapter [Creating Your First Virtual Assistant](/digital-agent/building-new-projects).

{% hint style="info" %}
Learn more about smart funcitions here -> <https://smart.borndigital.ai/>&#x20;
{% endhint %}

{% hint style="warning" %}
We will update the UX/UI of the variable dialog in near future. Stay updated!
{% endhint %}

Within this overview of the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node), let's explore two distinct types of using the function variable:

* **Smart Functions:** These are programmed to execute specific functions, such as retrieving a particular name, fetching specific data from your sources, or obtaining the current date.
  * **Example:** *'Now'* - a smart function that returns the current date.
  * **Example:** *'County'* - a smart function that tracks the number of times the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node) is invoked (useful in ['Decision' node](/digital-agent/conversation-flow/nodes-explained/decision-node)).
  * **Example:** *'Value'* - represents a static value predefined within the node.

<figure><img src="/files/zwFPrd0i78fxRmhBn37B" alt=""><figcaption><p>Function node in nutshell</p></figcaption></figure>

Note the importance of the order of smart functions, as this dictates their execution sequence. Follow a 'first-things-first' approach to ensure the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node) operates as intended.

{% hint style="info" %}
In this overview, the target node remains empty. Ensure you connect another node after the ['Function' node](/digital-agent/conversation-flow/nodes-explained/function-node) to continue the flow effectively.
{% endhint %}


# AI node

Exciting News! Our 'AI node' is in the process of receiving some fantastic updates!

In this chapter, we are going to introduce you the updated user interface for ['Generative AI' node](/digital-agent/conversation-flow/nodes-explained/ai-node).

We've decided to create an infinite loop chatbot virtual assistant based on a simple prompt - system message. This is crucial for implementing the **Generative AI** within the Conversation Flow. We're excited to enhance its capabilities and explore various scenarios. To explain this, we've created a simple project. Watch the video below for a clear demonstration.

{% hint style="info" %}
To understand and showcase the 'Generative AI' node effectively, we recommend visiting the ['Message' node](/digital-agent/conversation-flow/nodes-explained/message-node),[ 'Answer' node](/digital-agent/conversation-flow/nodes-explained/answer-node), ['Training Project'](/digital-agent/conversation-flow/launching-project) ,  and ['Create Project' ](/digital-agent/workspace/list-of-projects)pages for detailed insights.
{% endhint %}

<figure><img src="/files/Htn4NRF9ulUqDDOx3RyM" alt=""><figcaption><p>New Generative AI node is here!</p></figcaption></figure>

<details>

<summary><strong>Step-by-Step Guide to Test It Out!</strong></summary>

1. Create a simple 'Message' node as an example.
2. Develop a basic 'Answer' node with an intent to exit the conversation if the customer chooses to.
3. Create a new 'Generative AI' node and configure it to create a persona named Mr. Chatty:
   * Enter a recognizable name for the node.
   * Define a specific role for the system message.
   * Add new input fields for assistant content.
   * Keep {current\_utterance} as the user's input in the third person.
   * Determine the usage of functions.
   * Configure the setup.
4. Connect the 'Generative AI' node to the 'Answer' node.
5. Train the model and conduct tests.

</details>

***

### Understanding the AI Instructions

Clear and well-written instructions are essential for a delightful Generative AI experience by guiding the manual. In a specific scenario, we created a simple ['Answer' node](/digital-agent/conversation-flow/nodes-explained/answer-node) to understand the conversation language, which can be incorporated into the system message prompt for the ['Generative AI' node](/digital-agent/conversation-flow/nodes-explained/ai-node).

{% hint style="warning" %}
Ensure the {current\_utterance} variable is in the user input type for each iteration. The assistant further explains past actions before the user inputs.
{% endhint %}

{% tabs %}
{% tab title="System message" %}

### Summary:&#x20;

This is the initial text or prompt provided to the AI model, setting the context or guidelines for generating responses.

### Description

The system message acts as the contextual cue for the AI model. It provides information about the topic, defines the assistant’s persona, outlines the response format, and instructs the AI on what to focus on or avoid in its generated responses. It primes the model with relevant information before generating the conversation.

### Example

Perform as Company´s chatbot, you role is to respond to questions. Answer my questions only using information you receive as text snippets from Knowledge base.
{% endtab %}

{% tab title="Asistant (optional)" %}

### Summary:&#x20;

Varies based on the context and the system message input. **Optional field**

### Description

The assistant's role is to generate responses based on the instructions provided in the system message. It uses the context, guidelines, and previous interactions to create suitable and contextually relevant responses for the user's queries or inputs.

### Example

Please take a moment to familiarize yourself with the guidelines for our conversation:&#x20;

* These snippets may be unrelated.&#x20;
* Do not sumarise all of the facts received, use the most relevant part only&#x20;
* Always answer only in {language} language.&#x20;
* If needed, translate your response to {language}.&#x20;
* Current date is {date\_now}

Please review the information available and be ready to assist customers with accurate information
{% endtab %}

{% tab title="User input" %}

### Summary:&#x20;

It contains the user's query or input as variable named - **{current\_utterance}**

### Description

This input represents the user's side of the conversation. It includes the queries, questions, or statements provided by the user, triggering the assistant's responses generated based on the context set by the system message. The AI processes this input to create appropriate replies.

### Example

{current\_utterance}
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Checkbox" Use in each iteraction" can help you add the infinite number of loops and improve the desired outcome. Recommending to turn on for user´s utterance for 99% scenarios.
{% endhint %}

<details>

<summary>Try customize the system message</summary>

Try extending the system message yourself. For example, "Be brief in your answer; create longer answers for open-ended questions" or "Use bullet points for your answer."

![](/files/CDq9DBb2wZpaaU8E8not)

</details>

{% hint style="info" %}
Visit [Prompting cookbook](/for-advanced-users/prompting-cookbook)in our Tips and tricks section to get more in-depth explanation of prompt types, prompting techniques and prompt examples. :sparkles:
{% endhint %}

***

### Knowledge base - functions

Apart from generating customer responses, Generative AI can utilize a Function from our [Knowledge Base](/digital-agent/advanced-functions/knowledge-base) to learn information. More details about the Knowledge Base will be provided soon after reworking this feature.

{% content-ref url="/pages/y82k1p4d8O7PF6ArgdLI" %}
[Knowledge base](/digital-agent/advanced-functions/knowledge-base)
{% endcontent-ref %}

This integration allows our internal knowledge base to complement the Neural Language Processor, delivering optimal answers, even from internal information.

***

### Configuration

Let´s explain the basic configuration

* **Use History:** Default 3 - Choose how many messages stay in the conversation memory, useful for creating continuity.
* **Language Models:** Default set to Standard, a cost-efficient general model. The advanced model, ChatGPT 4.0 Turbo, is significantly more expensive to use.
* **Advanced Settings:** Set model temperature from 0 to 1 (default 0.7) to adjust the creativity level.

{% hint style="warning" %}
Don't forget to set up the Target node.
{% endhint %}

***

### Try Importing the Project

For a step-by-step guide, visit the ['Import / Export' page](broken://pages/EiOjNpeymLBpBS1GXe33) to see the process.

{% file src="/files/FdBUPosGIzmXJdDco1fo" %}


# TRANSFER node

The 'Transfer' node plays a pivotal role in complex and advanced projects, facilitating connections between different segments or projects within your Conversation Flow

In a scenario, for instance, we're linking our current project, "My First Project," with a[ 'Transfer' node](/digital-agent/conversation-flow/nodes-explained/transfer-node) to "My First Virtual Assistant." It's important to note that this example is purely illustrative and can be customized according to specific project requirements.

{% hint style="info" %}
When transferring a project, it always begins from the ['Starting' node](/digital-agent/conversation-flow/nodes-explained/start-end-nodes). Ensure that the logic behind the subsequent project is accurate, and the project possesses a stable, active version for seamless transitioning.
{% endhint %}

<figure><img src="/files/RKvSiB6h8Wq6RvmV1vvN" alt=""><figcaption><p>Transfer node in nutshell</p></figcaption></figure>

### Some potential use cases:

1. **Transitioning from General to Specific Topics:** A project initially designed with basic welcome logic can smoothly transition to more specific topics using the transfer node, catering to diverse user queries or scenarios.
2. **Breaking Down Complex Scenarios:** Projects with intricate and multifaceted scenarios can be segmented into smaller, more manageable projects through the use of transfer nodes. This segmentation enhances organization and eases navigation through different components of the conversation flow.
3. **Seamless Handoff between Stages:** Utilizing transfer nodes to smoothly handoff or delegate tasks between various stages or processes within a conversation flow, ensuring a continuous and coherent user experience.
4. **Routing Users to Specialized Sections:** Redirecting users from a general inquiry stage to specialized sections or departments within the bot based on their specific needs or preferences using transfer nodes, improving user satisfaction and efficiency in query resolution.


# REDIRECT node

The 'Redirect' node plays a significant role in facilitating effective human-chatbot interactions. Are you familiar with the distinction between the 'Redirect' and 'Transfer' nodes?

In your Conversation Flow, there are instances where you may opt for human intervention. For this specific purpose, the 'Redirect' node comes into play.

The primary setting within this node is the destination setup, configurable within the node's configuration panel.

<figure><img src="/files/pXRt0GB0c1dwHjTawuvI" alt=""><figcaption><p>Redirect node in nutshell</p></figcaption></figure>

As an editor, you have the freedom to set destinations such as:

* 'Flap'
* 'Invoicing'
* 'Call center agent'
* 'Department number'

This setting depends entirely on your preferences and can be further customized based on your specific requirements. Feel free to refine it to suit your needs better.


# START / END nodes

Defining the starting and ending points within your conversational flow is crucial for the successful implementation of your project's logic.

Without them, errors may occur in the code editor, hindering the training process.

<figure><img src="/files/SaAQB7pkYbW7vr8ivyMT" alt=""><figcaption></figcaption></figure>

* **Starting Node:** This is the initial node visible when starting a new blank project. Quite straightforward, this node serves as the entry point for conversations with your chatbot or voicebot. Creating a message node after the start automatically generates a target node associated with it.
* **End Node:** In a brief explanation, the end node functions as a fallback mechanism. For instance, when the customer doesn't respond with a "yes," it triggers the end of the conversation. This example illustrates a simple usage and flow towards the conclusion. Multiple end nodes can be established to conclude conversation logic as needed.

{% hint style="info" %}
To create an[ 'End node'](/digital-agent/conversation-flow/nodes-explained/start-end-nodes), you can simply drag it from the nodes panel located on the right side of the interface. It's important to note that within a project, there is only one starting node, which acts as the singular point of conversation initiation.
{% endhint %}


# Training set

In this section we want to introduce how to create an effective and crucial training set for the success of your digital agent

A training set is a collection of data used to train a machine learning model. It consists of examples that the model learns from, allowing it to recognize patterns, understand context, and make predictions or generate responses based on incoming end-user's data.&#x20;

Key points about a training set:&#x20;

1. **Composition:**\
   A training set typically includes input-output pairs, where the input might be a user query or statement, and the output is the corresponding response or action expected from the model.
2. **Diversity:**\
   The training set should be diverse and representative of the various scenarios the model will encounter in real-world applications. This includes different phrasing, languages, contexts, and user intents.
3. **Size:**\
   A larger training set generally provides more examples for the model to learn from, improving its performance and ability to generalize to unseen data.
4. **Preprocessing:**\
   Data in the training set often undergoes preprocessing steps, such as normalization, tokenization, and labeling, to make it suitable for model training.
5. **Validation:**\
   While training sets are used for training the model, separate validation and test sets are also used to evaluate the model's performance and ensure it generalizes well to new data.

Go to overview to get more knowledge on "Training Set" tab in Digital Studio, then go to best practicec for more detailed knowledge.


# Overview

Overview of Training Set tab in Digital Studio

<figure><img src="/files/uu0UBPJuDcMb6DhZyNaq" alt=""><figcaption><p>Snippet of training section tab in Digital Studio</p></figcaption></figure>

**Intent** - represents the purpose behind an end-user's input during a conversation. For each agent, multiple intents are defined, allowing your collective intents to manage an entire conversation. When an end-user inputs a message, Digital Studio identifies the most appropriate intent associated with your agent.&#x20;

**Intent name** – a user defined, recognizable name of intent&#x20;

**Utterances** - these are sample phrases that end-users might use. When an end-user expression closely resembles one of these phrases, Digital Studio identifies the corresponding intent. You don’t need to provide every possible example, though it is advised that every intent has 5-15 different utterances based on what your users say.

**Used in node** – indicates the point in conversation flow where selected intents are being checked against end-user's input.

**Target node** – after recognizing the proper intent, target node points to the next step in conversation flow.

**Actions** – from here you can either select the “edit intent” or “delete intent” button. When the “edit intent” is selected, you will be shown a window, where you can quickly change the name of intent and update its utterances. You can also use “Generate utterances with AI” by providing an intent description and desired number of utterances to be generated.

&#x20;


# Best practices for writing training set

Outline for best practices for developing a robust training set

Creating an effective training set is crucial for the success of any AI-driven system, especially in conversational AI. A well-crafted training set ensures that the model accurately understands user intents, responds appropriately, and continuously improves over time. I

In this section, we will outline best practices for developing a robust training set, covering guidelines on data diversity, labeling consistency, and balancing between overfitting and underfitting. By following these practices, teams can build more reliable, scalable, and efficient AI models that enhance user experience and meet business objectives.

1. Diversity of Utterances: \
   Include a wide range of phrases and variations for each intent. This helps the model understand different ways users might express the same request. Consider different dialects, regional variations, and slang that users may employ.&#x20;
2. Use Real User Data: \
   Whenever possible, use real interactions from users to create training data. This ensures the training set reflects genuine language patterns and user behavior.&#x20;
3. Balance Intent Representation: \
   Ensure that all intents are adequately represented in the training set. Avoid over-representing some intents while neglecting others, as this can lead to biased performance.&#x20;
4. Contextual Examples: \
   Include examples that reflect different contexts in which the intents might be used. This helps the model understand when and how to apply specific intents.&#x20;
5. Label Clearly: \
   Make sure each utterance is clearly labeled with its corresponding intent. Consistent and clear labeling is essential for effective training and evaluation.&#x20;
6. Include Edge Cases: \
   Incorporate edge cases and less common utterances to improve the model’s robustness and ability to handle unexpected inputs.&#x20;
7. Iterative Improvement: \
   Regularly review and update the training set based on model performance and user feedback. This iterative process helps improve accuracy over time.&#x20;
8. Testing and Validation: \
   Create a separate validation set to test the model’s performance on unseen data. This helps ensure that the model generalizes well and doesn't just memorize the training examples.&#x20;
9. Avoid Ambiguity: \
   Strive for clarity and specificity in the examples. Ambiguous phrases can confuse the model and lead to incorrect intent classification.
10. Documentation: \
    Keep thorough documentation of the training set, including the rationale for chosen examples and how they relate to user intents. This can help future modifications and training efforts.&#x20;


# Launching project

## Creating Project History

Regularly creating project versions is crucial for tracking significant updates, informing colleagues, and ensuring functional backups in case of issues or errors

Each project version can be individually trained and deployed, allowing for detailed version management. For more detailed information, refer to the [Project Version History](broken://pages/NbR5bCBZnYtNWpMVaK3n) page.

<figure><img src="/files/8CtnSkoW8W6sg6gSMh4E" alt=""><figcaption><p>Saving project version - example</p></figcaption></figure>

<details>

<summary>To create a new project version, follow these steps:</summary>

1. **Create a Project Version:** Generate a new version of your project by providing a brief description and outlining new improvements that are not intended for production.
2. **Utilize Older Trained Versions:** Your previously trained and deployed versions can continue operating while you're working on creating newer versions. This ensures continuity even during the development phase.
3. **Revert if Necessary:** If any issues arise, you always have the option to revert back to a previous version. Detailed instructions for this process are available on the [Project Version History](broken://pages/NbR5bCBZnYtNWpMVaK3n) page.

</details>

Consistent creation of project versions helps in maintaining a clear track record of changes, allows for ongoing development, and ensures the ability to revert to stable versions in case of unforeseen complications.

***

## Import / Export project

Each project version can be individually trained and deployed, allowing for detailed version management. For more detailed information, refer to the [Project Version History](broken://pages/NbR5bCBZnYtNWpMVaK3n) page.

<figure><img src="/files/8CtnSkoW8W6sg6gSMh4E" alt=""><figcaption><p>Saving project version - example</p></figcaption></figure>

<details>

<summary>To create a new project version, follow these steps:</summary>

1. **Create a Project Version:** Generate a new version of your project by providing a brief description and outlining new improvements that are not intended for production.
2. **Utilize Older Trained Versions:** Your previously trained and deployed versions can continue operating while you're working on creating newer versions. This ensures continuity even during the development phase.
3. **Revert if Necessary:** If any issues arise, you always have the option to revert back to a previous version. Detailed instructions for this process are available on the [Project Version History](broken://pages/NbR5bCBZnYtNWpMVaK3n) page.

</details>

Consistent creation of project versions helps in maintaining a clear track record of changes, allows for ongoing development, and ensures the ability to revert to stable versions in case of unforeseen complications.

***

## Training and testing project

Training your project version is an essential step to thoroughly test the Conversation Flow before deployment, ensuring optimal utilization.

Initially, we made a minor enhancement in the '[Answer' node](/digital-agent/conversation-flow/nodes-explained/answer-node), particularly with the intents **"Yes"** and **"No"** by incorporating chat button options. Before initiating training, we added chat buttons specifically tailored for these intentions. Our goal was to emphasize the **"Yes"** option by highlighting it as our primary button choice.

The training process is straightforward. After verifying the flow logic, simply click the **"Train the button"** option. Upon successful completion of training, a chatbot interaction bubble will appear in the bottom right panel. Feel free to engage in a conversation with your newly created chatbot.

<figure><img src="/files/3qZgN3YUcV33C1pjltNv" alt=""><figcaption><p>Training project + answer node improvement</p></figcaption></figure>

<details>

<summary>Step-by-step for a small improvement</summary>

1. Access the example project and navigate to the 'Answer' node.
2. Identify the intent that you wish to transform into a button format.
3. Modify the intent and select the checkbox labeled "Use as button."
4. Optionally, configure your button settings according to your preferences.
5. Ensure to save changes in both button configuration and intent configurations.

</details>

{% hint style="info" %}
Utilizing primary and secondary buttons can effectively guide users through the desired flow within the conversation, enhancing the overall user experience.
{% endhint %}

***

Deploying project

We're here to guide you through the deployment process. If you need assistance, please refer to the contact information provided.

<figure><img src="/files/ertOYw4Lya5rIvsGc2b2" alt=""><figcaption></figcaption></figure>

Assigning a new phone number to your assets is an essential part of this process.

<details>

<summary>Step-by-step of project deployment</summary>

1. E**nsure Conversation Flow Training:** Verify that your conversation flow is adequately trained before initiating deployment.
2. **Initiate Deployment:** Click on the "Deploy Version" option within your project.
3. **Assign a Phone Number:** Associate the created phone number with your deployment.
4. **Configuration Options:** Customize your deployment by specifying:
   * A friendly name for your deployment number.
   * Voice settings, including temperature, technology, speed, and supported languages.
   * Preferences for call recordings and background music (upload custom tracks in assets).
   * Whitelisting or blacklisting specific numbers as needed.
5. **Confirm Deployment:** Click "Confirm" to execute and deploy your project.
6. **Test Your Conversation Flow:** Run a test call to ensure the effectiveness of your deployed Conversation Flow.

</details>

{% hint style="info" %}
Ensure your project is trained and has an assigned phone number in assets before deployment. You can refer to our step-by-step guide in the "Create First Project" chapter for assistance.&#x20;
{% endhint %}

Minor adjustments may be required in the project to successfully deploy your voicebot.

***

## Deploying project

Deploying your project into production is a pivotal step in enhancing customer satisfaction through its use. We're here to guide you through the deployment process. If you need assistance, please refer to the contact information provided.

<figure><img src="/files/ertOYw4Lya5rIvsGc2b2" alt=""><figcaption></figcaption></figure>

Assigning a new phone number to your assets is an essential part of this process.

<details>

<summary>Step-by-step of project deployment</summary>

1. E**nsure Conversation Flow Training:** Verify that your conversation flow is adequately trained before initiating deployment.
2. **Initiate Deployment:** Click on the "Deploy Version" option within your project.
3. **Assign a Phone Number:** Associate the created phone number with your deployment.
4. **Configuration Options:** Customize your deployment by specifying:
   * A friendly name for your deployment number.
   * Voice settings, including temperature, technology, speed, and supported languages.
   * Preferences for call recordings and background music (upload custom tracks in assets).
   * Whitelisting or blacklisting specific numbers as needed.
5. **Confirm Deployment:** Click "Confirm" to execute and deploy your project.
6. **Test Your Conversation Flow:** Run a test call to ensure the effectiveness of your deployed Conversation Flow.

</details>

{% hint style="info" %}
Ensure your project is trained and has an assigned phone number in assets before deployment. You can refer to our step-by-step guide in the "Create First Project" chapter for assistance.&#x20;
{% endhint %}

Minor adjustments may be required in the project to successfully deploy your voicebot.


# Setting tab

Our goal is to ensure a seamless onboarding experience for the Digital Agent and the comprehensive suite of Digital Studio products.

Within the project settings, personalization options are available, but some are specifically designed for advanced users. It's essential to proceed carefully and have a thorough understanding before making adjustments.

{% hint style="info" %}
Before delving into settings, it's recommended to save the current version in case of any issues. You can easily revert changes at any time using the [Project Version History](/digital-agent/workspace/project-details#version-history) feature.
{% endhint %}

<figure><img src="/files/9tWfsLc1dCKJ2LNAPjSB" alt=""><figcaption></figcaption></figure>

### **Basic Project Settings Include Three Categories:**

1. **Configuration:** Customize project settings such as project description, the starting node of the flow, and advanced configurations.
2. **Vocabulary:** Customize the vocabulary used within the conversation flow.
3. **Stopwords:** Add specific words that halt or stop the conversation flow when encountered.

For more detailed information and guidance regarding each setting, explore the specific sections within the project settings. Taking a cautious approach while modifying settings ensures a smooth and optimal project configuration.

***

### Configuration

<figure><img src="/files/ZBV7YmSg2E0Hj2QumQcd" alt=""><figcaption></figcaption></figure>

<details>

<summary>Start node</summary>

The name of the node in the conversation flow from which the conversation begins. The default is set as START. Most of the time, when building digital agents from flow editor, is not necessary to change this setting.

</details>

<details>

<summary>Description</summary>

Brief description/note about the project; not utilized in the code or low.

</details>

<details>

<summary>Allow jumping</summary>

**allow\_jumping (bool):**

* If set to True, users can leave the conversation tree and start a new topic accessible from the `start_node`.
* If set to False, users can only visit graph nodes allowed in the conversation flow or nodes presented in `allow_jumping_to_nodes`.

**allow\_jumping\_to\_nodes (List\[str]):**

* List of intents which can be jumped to from other intents. Confidence of such intent prediction incurs a penalty to prefer intents in trees.

</details>

<details>

<summary>Disabled utterance transformers</summary>

This configuration parameter allows advanced users to specify a list of transformers that should be disabled and not used during the preprocessing stage of the conversation flow. Each transformer is identified by its name as seen in the logging or diagnostic information.

**Usage:**

* Users can refer to tech logs (eg. in Test in debug mode) to identify the transformers they want to disable based on their names.
* Transformers may perform various preprocessing tasks such as normalization, filtering, or augmentation of utterances.
* Disabling specific transformers can be useful for customizing the preprocessing pipeline according to specific project requirements or preferences.

**Example:**

```yaml
codedisabled_utterance_transformers:
  - numbers
  - chitchat_annoyance
  - chitchat_greeting
```

In this example:

* The `numbers` transformer is disabled, which means the preprocessing step responsible for normalizing numbers and digits will be skipped.
* The `chitchat_annoyance` transformer is disabled, indicating that preprocessing related to filtering out offensive language or annoyance expressions will not be applied.
* The `chitchat_greeting` transformer is disabled, suggesting that preprocessing related to normalizing greetings and farewells will be omitted.

By selectively disabling transformers, users have finer control over the preprocessing pipeline, allowing for tailored customization of the conversation processing flow. This feature caters to **advanced users who are familiar with the underlying preprocessing mechanisms** and wish to fine-tune them for specific use cases or preferences.

<mark style="color:red;">**Note:**</mark>**&#x20;This feature is relevant only when using a custom-trained model for intent recognition or smart functions, as they operate on preprocessed utterances.** \
**GPT intent recognition and generative AI nodes work with raw utterances (current\_utterance) as obtained from chat or speech-to-text, unless it's manually set to differ.**

</details>

<details>

<summary>Language</summary>

Specifies the language code crucial for various functionalities dependent on language setting.

It impacts:

1. **Text-to-Speech and Speech-to-Text Services:**
   * The language setting influences the accuracy and effectiveness of **text-to-speech** and **speech-to-text** services. These services are tailored **to be language-specific.**
   * Different languages have unique phonetic characteristics, pronunciation rules, and accents. Therefore, the underlying algorithms and models need to be adjusted accordingly for optimal performance.
   * **Neural voice options for text-to-speech are dependent on language setting**, as, for example, Czech offers only two public neural voice personas (male and female), whereas English have dozens of options with regional accents, sentiment features, age variety, a multitude of female and male personas and even unisex neural voice.<br>
2. **Word to Vec Library Functionality:**
   * The Word to Vec library functionality may be adjusted based on the language setting. This library is commonly used for word embedding, where words are represented as vectors in a high-dimensional space.
   * When using a custom training set, the Word to Vec library can be optimized to capture the language's unique features. This optimization helps improve various natural language processing tasks such as semantic similarity and intent recognition.<br>
3. **Entity Extraction:**
   * Entity extraction involves identifying and extracting specific entities or information from text, such as **dates, names, addresses, and numerical values like phone numbers or registration plate formats.**
   * Language-specific formats and conventions exist for different types of entities. \
     For example, date formats may vary between languages, as demonstrated by the example of MM/DD/YYYY format in US-English versus DD/MM/YYYY in UK-English and Europe.
   * Therefore, entity extraction rules need to be tailored to recognize and extract entities according to the specific formats and patterns of the language being processed.
   * This means that for languages like Slovak, the system may not recognize Czech cities when extracting addresses from text, and vice versa. This limitation arises due to the language-specific nature of the entity dictionaries or lists used for extraction.
4. **Preprocessing Tasks:**
   * Preprocessing tasks encompass various text processing steps applied before feeding data into downstream natural language processing (NLP) engine.
   * Language-specific preprocessing includes tasks such as handling default stopwords (common words like "the", "and", "is" that are often removed as they carry little semantic meaning), correction of spelling errors, text transformation (e.g., lowercase conversion), and other linguistic transformations.
   * Different languages may have distinct sets of stopwords and spelling correction rules, necessitating language-specific preprocessing pipelines to ensure accurate and consistent processing of text data.

**Supported languages**:&#x20;

* cs (Czech :flag\_cz:),&#x20;
* sk (Slovak :flag\_sk:),&#x20;
* en (English :flag\_us::flag\_gb::flag\_au::flag\_ca:),&#x20;
* de (German :flag\_de::flag\_at::flag\_ch:),&#x20;
* pl (Polish :flag\_pl:),&#x20;
* hu (Hungarian :flag\_hu:),&#x20;
* fr (French :flag\_fr::flag\_be::flag\_ca:),&#x20;
* nl (Dutch :flag\_nl:),&#x20;
* pt (Portuguese :flag\_pt:),&#x20;
* ro (Romanian :flag\_ro:),&#x20;
* ru (Russian :flag\_ru:),&#x20;
* es (Spanish :flag\_es:), es-mx (Mexican Spanish :flag\_mx:).<br>

</details>

<details>

<summary>Classifier (lemmatizer, tokenizer, aspell, stopwords)</summary>

&#x20;Configuration of the Natural Language Understanding (NLU) module.

* **tokenizer (str):** Default value is 'nist'.
* **aspell (str):**
  * Options: 'replace', 'duplicate', 'whitelist', 'null'.
  * 'replace': Replace misspelled words by their correct forms.
  * 'duplicate': Add the correct form of the misspelled word to the end of the utterance.
  * 'whitelist': Use only whitelist corrections, ignore aspell (suitable for speech channel).
  * 'null': No correction and accentuation.
* **stopwords (bool):**
  * If True, remove stopwords from text (e.g., 'the', 'be', 'and').&#x20;
  * A default stop word list is set for each language. You may also define a custom stop word list on the project level. In that case, the default stop word list is ignored on your project.

</details>

<details>

<summary>Intent thresholds</summary>

These intent thresholds serve as criteria for deciding whether the system can confidently determine a user's intent based on the input provided. Here's a more detailed explanation:

#### intent\_threshold:

* This threshold sets the **minimum level of confidence** required for the system to consider an intent as valid. \
  \
  If the confidence score of the top-ranked intent falls below this threshold, it indicates that the system lacks confidence in identifying the user's intent accurately. In such cases, instead of making a potentially erroneous intent selection, the system returns the `I_DONT_UNDERSTAND` intent, signaling to the user that their input couldn't be confidently interpreted. Subquentually, next state the flow continues is the target node set as fallback.
* The intent threshold setting is global, meaning it's the same for all the ANS nodes in the flow.
* The default value is 0,6; the recommended range is from 0,55 to 0,9.

#### intent\_relative\_threshold:

* This threshold introduces a comparative aspect to the intent selection process. It ensures that the confidence of the top-ranked intent significantly exceeds the confidence of the next-ranked intent by a specified margin.&#x20;
* If the confidence of the top-ranked intent is not substantially higher than the confidence of the second-ranked intent multiplied by this threshold value, it suggests that there isn't a clear distinction in confidence levels between the top two intents. Consequently, the system returns the `I_DONT_UNDERSTAND` intent, indicating uncertainty in intent prediction despite having multiple options and flow moves to next state based on the fallback target.

**----------------------------------------------------------------------------------------------------**

**Threshold test and score boosting:**\
Test is performed only if more than one intent is considered. Intent resolver predicts pairs of original confidences and labels `(oc1, label1), (oc2, label2), …`, where original confidence is a number in the range \[0, 1], and the sum of original confidences is in the range \[0, ∞).

Flow cuts off unreachable nodes and nodes not passing EXTRACTors entry conditions.

We also operate with Semantically Same Intent (SSI) groups. The rule is as follows: while the label with the highest score is in the same SSI group as the second-best node, merge scores of these nodes and keep the label of the winner.

**Example intent resolver scores:**

The above scores are normalized as follows:

After merging SSI nodes and computing normalized score, the threshold tests follow:

**Original Threshold Test:**

If the first label original confidence is less than the original threshold, no intent is selected.

* With `original_intent_threshold=0.001`, the label `yes_plain` passes, and the test continues.
* With `original_intent_threshold=0.005`, the label `yes_plain` fails, and no intent is selected.

**Normalized Threshold Test:**

If the first label normalized confidence is greater than the intent threshold, the first label is selected; otherwise, the next test follows.

* With `intent_threshold=0.8`, the label `yes_plain` passes and is returned (intent is selected).
* With `intent_threshold=0.9`, the label `yes_plain` fails, and the next test follows.

**Relative Threshold Test:**

If the best label confidence is X times greater than the second-best label confidence, the best label is accepted, and the intent is selected.

* With `intent_relative_threshold=10`, the label `yes_plain` passes (`0.067 * 10 < 0.87`), and the intent is selected.
* With `intent_relative_threshold=20`, the label `yes_plain` fails (`0.067 * 20 > 0.87`), and no intent is selected.

</details>

<details>

<summary>Training epoch and learning rate</summary>

Model parameters for deep neural network training.

* **epoch (int):** Specifies how long the training takes. To be exact, this parameter specifies the number of cycles the neural network goes through your training set during the training process. The recommended value is between 10 and 30, depending on language and training set volume.
* **lr (float):** Learning rate determining how fast the neural network learns. Must be a positive number. A recommended value is between 0,1 and 0,5.&#x20;

:exclamation:<mark style="color:red;">**This configuration is relevant only when utilizing a custom training set for intent recognition. If intent recognition is driven by methods such as GPT or keyword matching, this setting is unnecessary as a custom neural network model is not employed.**</mark>

</details>

<details>

<summary>Speed and delay</summary>

**speed\_coefficient (float):**

* A smaller value results in a smaller delay between messages sent by the chatbot to the user. A value of 1 allows enough time for the average user to read everything before the next message is displayed.

**max\_delay\_milliseconds (int):**

* Specifies the maximum delay between messages sent by the chatbot in milliseconds.

:exclamation:<mark style="color:red;">**Speech and delay setting concerns chat-based digital assistants only!**</mark>

</details>

###

### Vocabulary

The Vocabulary feature serves as a dictionary of corrections used during utterance processing. It allows users to specify custom corrections for words or phrases, which take precedence over the default corrections provided for each language.

<figure><img src="/files/wrdRINxaVkzLzOgYbilY" alt=""><figcaption></figcaption></figure>

**Key Concepts:**

1. **Custom Corrections:**
   * Users can define custom corrections by specifying key-value pairs. The key represents the word or phrase to be corrected, while the value indicates the replacement text.
2. **Case Sensitivity:**
   * Vocabulary corrections are case-sensitive. Each key is matched against the input utterance as a whole word, ensuring that partial matches of syllables within words are not corrected.
3. **Regular Expressions:**
   * Vocabulary supports the use of regular expressions, enabling users to provide multiple word forms or patterns with a single correction entry.
4. #### Sequential Evaluation of Vocabulary Corrections

   The Vocabulary feature evaluates corrections sequentially in the order they appear in the configuration. This means that if multiple corrections conflict, the correction listed first will be applied. Therefore, it is not advisable to order corrections alphabetically.

   \
   **Example:** Suppose we have the following corrections:

   * `"Hello" corrected to "Greeting"`
   * `"Hello World" corrected to "bonus program Hello word"`

   If the input sentence is "I am interested in Hello World", the first correction will be applied, transforming the sentence into "I am interested in Greeting World". The second correction will not be applied because "hello world" is no longer present in the sentence. This can potentially impact intent recognition, as the sentence has been altered suboptimally.

&#x20;:bulb:**Here are some tips for custom vocabulary use-cases:**

<details>

<summary><strong>Semantic recognition enhancement</strong></summary>

Custom corrections can expand or rewrite expressions to improve semantic recognition. For instance, mapping "car" to "automobile" ensures that both terms are recognized as referring to the same concept.

</details>

<details>

<summary><strong>Acronym and abbreviation interpretation</strong></summary>

Mapping acronyms to their expanded forms aids in interpreting user inputs containing abbreviations. For example, associating "ATM" with "automatic teller machine" ensures that users' requests involving ATMs are correctly understood.

</details>

<details>

<summary>Internal terminology understanding</summary>

Specifying internal terms or expressions improves the language model's understanding.&#x20;

For instance, mapping "Joy" to "tariff Joy" and "Holiday" to "tariff Holiday" helps the system comprehend user requests related to specific tariff plans, eg. the utterance *I would like to purchase Joy/Holiday.*

</details>

<details>

<summary>(In)consistent transcription from speech-to-text</summary>

Vocabulary corrects systematically misspelled words or phrases from speech-to-text.&#x20;

For example, a common issue with Czech and Slovak speech-to-text is transcription of the number six as aest. Mapping it to "6" in custom vocabulary ensures consistent transcription for smart functions to work with.

</details>

<details>

<summary><strong>Normalization of user vocabulary</strong></summary>

Standardizing user expressions reduces the need for extensive training data. Mapping synonymous terms to a common expression streamlines intent recognition. For example, mapping "invoice" to "bill" ensures that both terms are recognized interchangeably.

</details>

<details>

<summary><strong>Slang and regional expression normalization</strong></summary>

Vocabulary can map slang or regional expressions to more recognizable terms. For instance, mapping "hella" to "very", "barák" to "dům", "šalina" to "tramvaj" etc. ensures that regional expressions are correctly interpreted in a wider context.

</details>

<details>

<summary>Preserving specific input</summary>

Users can specify transcriptions they prefer not to be altered. By specifying a key-value pair where the key and value are the same, certain transcriptions remain unchanged.&#x20;

For example, mapping "Yello" to "Yello" ensures that the term "Yello" (a company name) is preserved without alteration by default corrector or other transformer.

</details>

### Stopwords

Stopwords are common words in a language that are typically filtered out during text processing as they do not carry significant meaning and are unlikely to contribute to the understanding of the text. Examples of stopwords include articles, conjunctions, and prepositions.

<figure><img src="/files/7ISLDOF2BtroGh8BDtGf" alt=""><figcaption></figcaption></figure>

**Importance of Removing Stopwords:**

* Enhances Text Processing: By removing stopwords, text processing algorithms can focus on more meaningful content, improving the accuracy of tasks such as sentiment analysis, topic modeling, and text classification.
* Reduces Noise: Stopwords often occur frequently in text but convey little semantic information. Removing them helps reduce noise and extract the most relevant information from the text.

**Key Features of Stopwords Handling:**

1. **Default stopword list:**
   * For each language, a default list of stopwords is provided. These lists contain common stopwords in the respective language.
2. **Stopword removal configuration:**
   * Stopword removal can be toggled on or off in the project configuration. This allows users to customize whether stopwords are removed during text processing.
3. **Custom stopword list:**
   * Users have the flexibility to specify a custom list of stopwords. In cases where the default stopwords do not suit the project's requirements, the custom stopword list takes precedence. The custom list is used for stopwords removal, and the default list is ignored.
4. **Preprocessing order:**
   * Stopword removal is one of the initial preprocessing steps. If stopwords are removed, subsequent preprocessing steps such as vocabulary corrections do not operate on them, as they are already eliminated from the text.


# Building new projects

Welcome aboard! This guide will walk you through the effortless steps to craft a basic Generative AI chatbot. Follow along this step-by-step tutorial to create Your First Virtual Assistant.

Choose the project

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><a href="/pages/DPfNe3cP2GLzhrwfsL0l">/pages/DPfNe3cP2GLzhrwfsL0l</a></td><td>Here you will learn how to build the basic Virtual assistant for answering your questions using the 3 main nodes in 3 easy steps.</td></tr><tr><td><a href="/pages/c0XioQGDIxyAf9i9lGCB">/pages/c0XioQGDIxyAf9i9lGCB</a></td><td>Here we will deep-dive to  more complex solution and showcase all nodes and explain the logic to more details</td></tr></tbody></table>

Advanded project

{% hint style="info" %}
Want to [download the project](#import-the-project-to-your-workspace)? Recommending you to follow this step by step guide&#x20;
{% endhint %}

***

## Import the sample chatbot project to your workspace

To understand the Conversation Flow, import the provided example project to your workspace. The downloadable file serves as a working copy for you to explore and comprehend the project logic.

{% file src="/files/fgd9btaNye3zWdPrdFl7" %}

{% hint style="info" %}
Practice building the project step-by-step. You can reference the downloadable example to understand the project's logic better.
{% endhint %}


# Knowledge base project

In this chapter, we want to introduce you step by step guide for building simple conversation flow in Flow editor with possibility to add your own Knowledge base index as optional information source

## Overview

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/VR5Pwls0yWJOk4tgLpY4">/pages/VR5Pwls0yWJOk4tgLpY4</a></td><td>Learn how to add your first 'Message' node and 'Answer' node to your logic</td><td></td></tr><tr><td><a href="/pages/sb4kkNaN4KOxqAhB18os">/pages/sb4kkNaN4KOxqAhB18os</a></td><td>Start using the capabilities of 'AI' node and how can you implement it to your logic</td><td></td></tr><tr><td><a href="/pages/9Wdem4VkbiPDRoQOY7wE">/pages/9Wdem4VkbiPDRoQOY7wE</a></td><td>See how to train, test and play with current chatbot bubble withou deploying</td><td></td></tr><tr><td><a href="/pages/LpKi5V2HWO5B7JFIGpi1">/pages/LpKi5V2HWO5B7JFIGpi1</a></td><td>Learn how to add a Knowledge base index on existing logic in UNESCO use case</td><td></td></tr></tbody></table>

### Try to import the project yourself

You can import the project to your organization to better understand the logic flow.&#x20;

{% file src="/files/RAcJXIGEQ6mnN3Ivxjcg" %}
Import this project to Conversation Flow
{% endfile %}

{% file src="/files/6sM1csWzpyw9opvj71NO" %}
Text snippet zip
{% endfile %}


# Step 1. - Initializing Your Project

This section guides you through starting your project by setting up and linking 'Message' and 'Answer' nodes to establish the foundation for user interaction.

Begin by establishing a new project, a crucial first step in crafting your digital assistant.&#x20;

Following the creation of your project, set up a greeting message node featuring the straightforward query, **"How can I help you?"** This establishes the initial interaction with users.

For a deeper understanding of configuring these nodes, it is advisable to consult the articles on ['Message' node](/digital-agent/conversation-flow/nodes-explained/message-node) and ['Answer' node](/digital-agent/conversation-flow/nodes-explained/answer-node)s provided in this section.

<figure><img src="/files/kQ5KOxUAHrPPg0CAoLDA" alt=""><figcaption></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. **Create Your Project:** Initiate by naming and setting up a new project.
2. **Set Up the Message Node:** Link the ['START' node](/digital-agent/conversation-flow/nodes-explained/start-end-nodes) to the newly established '[Message' node](/digital-agent/conversation-flow/nodes-explained/message-node).
3. **Input Friendly Text:** Craft a welcoming message for users, enhancing clarity on the interaction's purpose.
4. **Incorporate an 'Answer' Node:** Introduce an[ 'Answer' node ](/digital-agent/conversation-flow/nodes-explained/answer-node)to capture user responses, facilitating an interactive experience.

</details>

Next, ensure the message node (labeled MSG\_INTRO) is effectively linked to the ['Start' node](/digital-agent/conversation-flow/nodes-explained/start-end-nodes). This connection delineates the flow from the initiation of interaction to the user's engagement.&#x20;

It's imperative to position the ['Answer' node](/digital-agent/conversation-flow/nodes-explained/answer-node) subsequent to the ['Message' node](/digital-agent/conversation-flow/nodes-explained/message-node), mirroring the dynamic of chatbot output followed by customer input.


# Step 2. - Integrating AI Node

This part is about integraton a Generative AI node for dynamic interactions and establishing an ongoing dialogue loop, preparing for further project refinement.

With the initial setup complete, the next stride involves incorporating a [Generative AI intent recognition](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai). This addition enriches customer interactions by enabling recognition of greetings or conversation conclusions, thus enhancing user experience with responsive engagement.

**Defining Fallbacks**

A fallback mechanism is crucial when specific intents are unrecognizable. In such cases, the interaction defaults to a ['AI' node](/digital-agent/conversation-flow/nodes-explained/ai-node), ensuring the customer receives pertinent responses to their inquiries.

<figure><img src="/files/pTCIWnSKn0LX1OXMt6iA" alt=""><figcaption><p>Step 2: - Adding the intent and AI node</p></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. **Access an 'Answer' Node**: Initiate by selecting an existing 'Answer' node.
2. **Generate a New Intent**: Employ Generative AI intent recognition to create a 'goodbye' intent.
3. **Establish a Fallback**: Set up a fallback 'AI' node for unrecognizable queries.
4. **Create an 'END' Node**: Designate this as the target for the 'goodbye' intent.
5. **Configure the 'AI' Node**: Tailor the system message to meet your requirements.
6. **Incorporate a Follow-Up 'Message' Node**: Position this after the 'AI' node to query additional customer questions.
7. **Link for Continuous Interaction**: Connect this 'Message' node back to the 'Answer' node, enabling an infinite interaction loop.

</details>

**Implementing AI Node**

An[ 'AI' node](/digital-agent/conversation-flow/nodes-explained/ai-node) is established with a predefined system message (for details, refer to the [linked resources](/digital-agent/conversation-flow/nodes-explained/ai-node)). Post-response, a subsequent ['Message' node](/digital-agent/conversation-flow/nodes-explained/message-node) inquires if the customer has further questions, linking back to the 'ANS\_ask' node to foster a continuous dialogue loop. This structure is pivotal for crafting a seamless ask-and-answer loop within the virtual assistant, laying the groundwork for our [Conversation Flow builder](/digital-agent/introduction).

**Proceeding to Further Development**

As this step lays the foundational AI integration, it's crucial to progress to [STEP 3 - Training and Testing Your Project](/digital-agent/building-new-projects/knowledge-base-project/step-3.-finalizing-with-testing-and-training), to refine and validate the system's functionality.


# Step 3. - Finalizing with Testing and Training

We are focusing on finalizing the project through training and testing, leveraging collaborative tools and test bubble to ensure the virtual assistant's logic is flawless and ready for interaction.

Progressing to project finalization, it's paramount to harness the collaborative features such as notes and comments, enhancing team synergy and efficiency. Saving and training the project ensures the conversational logic is error-free and operates as intended.

**Collaborative Review**

Utilize the collaborative tools to refine the project with team insights, ensuring comprehensive review and optimization.

<figure><img src="/files/l5KZ0jlpR0SotzffoDPu" alt=""><figcaption><p>Collaborating and training the project</p></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. **Evaluate the Conversation Logic**: Engage in a thorough review to ensure seamless flow.
2. **Save Your Work**: Secure project progress with a simple click on the save button.
3. **Initiate Training**: Activate the training process to verify the conversation logic's integrity.
   1. **Error Handling**: Should errors arise, consult the provided hints for precise troubleshooting.
4. **Conduct Flow Testing**: Experiment with various queries within the test bubble to gauge interaction effectiveness.

</details>

**Training the Project**

Training validates the logical structure and absence of errors, a critical step before deployment. A testing bubble, appearing in the bottom right corner, serves as a sandbox for real-world simulation, allowing you to observe and refine the conversation flow, including the seamless recognition of conversation endings through phrases like "thank you."


# (Optional) - Integrating a Knowledge Base Index

Elevate the capabilities of your 'AI' node by incorporating a knowledge base index. As an example, we'll transform the logic to mimic a UNESCO FAQ chatbot, utilizing a specialized knowledge base index

### **Download the Sample Knowledge Base**

For a practical demonstration, access the UNESCO knowledge base index through the provided \*.zip file download link:

{% file src="/files/6sM1csWzpyw9opvj71NO" %}

***

### **Configuring the Knowledge Base**

This section illustrates the straightforward process of building your index, specifically tailored to enrich the 'AI' node's responses with detailed, accurate information.

{% content-ref url="/pages/y82k1p4d8O7PF6ArgdLI" %}
[Knowledge base](/digital-agent/advanced-functions/knowledge-base)
{% endcontent-ref %}

<figure><img src="/files/JHGRt2g5L62WEMevwFMA" alt=""><figcaption><p>Quick tutorial on Knowledge base index</p></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. **Adapt Textual Content**: Modify existing content to align with the UNESCO chatbot's objectives.
2. **Initiate a New Index**: Label this new index 'UNESCO'.
3. **Populate the Index**: Upload relevant files to the newly created index.
4. **Select Knowledge Base in 'AI' Node**: Navigate to the 'AI' node, opting for the 'Knowledge base' function.
5. **Choose the Appropriate Index**: Link the project to the desired knowledge base index.
6. **Commence Training**: Prepare the model for interaction by training it with the updated index.
7. **Conduct Queries**: Test the system's knowledge by asking diverse questions.

</details>

{% hint style="info" %}
[Knowledge base](/digital-agent/advanced-functions/knowledge-base) indexes significantly augment the conversational AI's effectiveness, enabling the integration of specific, detailed company or organizational information directly into the dialogue flow.
{% endhint %}

{% hint style="danger" %}
While powerful, knowledge base indexes have [their limitations](/digital-agent/advanced-functions/knowledge-base#current-limitations) and may not suit every [information source](/digital-agent/advanced-functions/knowledge-base#best-practices). For optimal results and current limitations, further reading is advised [here](/digital-agent/advanced-functions/knowledge-base).
{% endhint %}


# Advanced project

Advanced project is showing more logic capabilities comparing with simple project. Recommending you to go throught the simple one before starting this advanced one.

## Overview

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/12sbZlxWX9dkPtaHMi8l">/pages/12sbZlxWX9dkPtaHMi8l</a></td><td>Establishing Your Project's Foundation: Initiating the Creation of Your First Virtual Agent</td><td></td></tr><tr><td><a href="/pages/uvpKOqjzEgpxzXHdkiGf">/pages/uvpKOqjzEgpxzXHdkiGf</a></td><td>Crafting Personalized Greetings: Tailoring Initial Conversations to Engage Users</td><td></td></tr><tr><td><a href="/pages/OFtbCTYVIDEIMxL6TTMr">/pages/OFtbCTYVIDEIMxL6TTMr</a></td><td>Implementing AI Nodes: Enabling Intelligent Conversations for Seamless Interactions</td><td></td></tr><tr><td><a href="/pages/LB0iABmFJT2PQGkLGXNx">/pages/LB0iABmFJT2PQGkLGXNx</a></td><td>Directing Interaction Flow: Providing User Choices for a Smooth Conversation Journey</td><td></td></tr><tr><td><a href="/pages/Kp59kgFoLrJcg0cgvimt">/pages/Kp59kgFoLrJcg0cgvimt</a></td><td>Structuring Logical Endings: Defining Conclusive Paths for Effective Conversations</td><td></td></tr><tr><td><a href="/pages/Ypwu5aGJvf6UO1RxbXMe">/pages/Ypwu5aGJvf6UO1RxbXMe</a></td><td>Polishing Skills and Deployment: Training Your Assistant for Deployment and Continuous Improvement</td><td></td></tr></tbody></table>


# Step 1. - Establishing Functions

Let's dive in!

In this initial step, our aim is to create a fundamental function - a counter to track the number of times a user interacts with the function node. Utilizing this information, we'll leverage the decision node to smoothly guide our users through the Conversation Flow.

* When the Chatbot/Voicebot interacts with the user for the first time, the chatbot will initiate a query to identify the user's name.
* Subsequent interactions (beyond the first) will redirect the flow to a generative AI node designed to assist the customer.&#x20;

This specific use case serves as a foundational example within this guide.

<figure><img src="/files/gLkfZluM003n5iJmCMJX" alt=""><figcaption><p>Step 1. - Esstabiishing Functions</p></figcaption></figure>

By incorporating additional function nodes and integrating backend-connected functions, we can create a user authorization flow based on the principles laid out in this simple guide.

<details>

<summary>Let's break it down step-by-step:</summary>

1. Begin by creating a new project. If you require guidance, refer to the step-by-step instructions [on this page](/digital-agent/workspace/list-of-projects).
2. Click on the starting node and generate a function node.
3. Establish a new variable named *"County"* using a smart function, specifically the counter function to track the flow's progression.
4. Progress further by creating a decision node and define a basic condition.
   1. For the first iteration of the flow (when County variable == 1), focus on acquiring the customer's name.
   2. In subsequent iterations, follow the *"Other"* option to continue with the flow.
5. Extend the decision-making process by creating a simple welcome message node.
6. Craft a straightforward text introduction for the Chatbot/Voicebot and prompt the customer for their name.

</details>

{% hint style="info" %}
Function nodes are incredibly versatile. They can be utilized to track specific use case information or retrieve data from your backend system, such as current date, time, user address, or numerical values.
{% endhint %}


# Step 2. - Crafting Greetings

Following the completion of Step 1, it's time to initiate a more personalized interaction by asking the customer for their name

To extract and utilize this information effectively, the ***'Answer' node*** will leverage the *'smart extractor' function*. This function will be created within the entities panel, named *"Namex"* and configured as a smart function aimed at extracting the Full\_name from the user's response.

Now, let's proceed to customize our message nodes by leveraging the properties extracted using *"Namex"*:

* ***{Namex}*****:** Displays all properties along with their extracted values.
* ***{Namex\["name"]}*****:** Reveals only the customer's Name.
* ***{Namex\["name"]} {Namex\["surname"]}*****:** Shows both the Name and Surname of the customer.

You have the flexibility to choose the level of personalization you prefer. Remember to set our previously created ***'Function' node*** as the target node to establish a loop within the flow.

<figure><img src="/files/nr6uIyjO595215ETQnRS" alt=""><figcaption><p>Step 2. - Crafting Greetings</p></figcaption></figure>

By integrating additional function nodes and connecting them to backend operations, we can develop a more robust user authorization flow based on the principles outlined in this guide.

<details>

<summary>Step-by-step guide for crafting a simple greeting</summary>

1. Create an *'**Answer' node*** after the 'Message' node to progress with this step.
2. Name the **'Answer' node** and establish a new Entity named *"Namex"* as a smart function to retrieve the full\_name.
3. Proceed by creating a ***'Message' node*** after the ***'Answer' node*** and formulate a personalized welcome message.
4. Connect the target node of the ***'Message' node*** to the **'Function' node** at the beginning of the flow.

In [Step 6. ](https://docs.borndigital.ai/digital-agent/building-new-projects/advanced-project/pages/PMS11onUH0Oo7Lb8A4Fg#step-6.-training-and-playing)observe the application of data from the *"Namex"* function across two rows. Feel free to experiment with other entities within the ***'Answer' node***.

</details>

{% hint style="warning" %}
Ensure to check and adjust the language settings in your project within the Project Settings. The extractor supports names predominantly from the domestic language group. For instance, certain names like **"Radovan"** might not be recognized as valid names in English language settings.
{% endhint %}

{% hint style="info" %}
Entities within the ***'Answer' node*** function similarly to variables in other nodes. They serve the purpose of extracting specific information tailored to your use case.
{% endhint %}


# Step 3. - Adding the AI node

The second step was about configurating friendly greetings in our Digital Studio Conversation Flow

Now, our customer crossed the function node second time and he/she is ready to continue in flow. Starting with simple - "How can I help you today?" and connecting it to simple setup Generative AI node with purpose to answer the topic.&#x20;

Make sure you checked -> Execute after message is played - to wait for a client response. Continue with making other nodes asking the T/F question reqarding other customer´s questions or topics to discuss.

<figure><img src="/files/6Cd7TE4BBUusHhVsIV7Y" alt=""><figcaption><p>Step 3. - Adding the AI node</p></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. Establish a fallback option from the ***'Decision' node*** (Else) as a new ***'Message' node***.
2. Prompt the user with a simple query - "How can I help you today?"
3. Ensure the *'Execute'* option in advanced settings is checked to ensure the flow operates correctly.
4. Create a connected ***'Generative AI' node*** with a straightforward prompt to address the user's query.
5. Generate a ***'Message' node*** prompting the user to respond with True/False regarding any additional questions.

</details>

{% hint style="info" %}
The *'Execute after message is played'* feature signifies a brief pause in the conversation, awaiting the customer's input within our chat bubble. Technically, it triggers the post-event immediately after the node's completion, enhancing the conversational flow by synchronizing responses with user interactions.
{% endhint %}


# Step 4. - Managing Flow Scenarios

Let´s create a simple Flow scenario!

In this tutorial, we'll create a straightforward answer node equipped with two intents, presented as selectable options via buttons:

* **YES:** Represents a positive response; the customer seeks additional information or has another query.
* **NO:** Indicates the call will conclude immediately.

<figure><img src="/files/J4uVTrcA99BeG6iSrwAG" alt=""><figcaption><p>Step 4. - Managing Flow Scenarios</p></figcaption></figure>

While using keywords is helpful, leveraging generative AI based on meaning can often yield better outcomes and simplify processes.

<details>

<summary>Step-by-step guide:</summary>

1. Create a simple ***'Answer' node*** following the 'Help' message node.
2. Generate a *"YES"* intent using generative AI and assign it as the primary chat button.
3. Develop a "NO" intent using keywords (for demonstration purposes only; you can utilize *Generative AI* instead).
4. Designate the *"NO"* intent as the secondary chat button.

</details>

{% hint style="warning" %}
The sequence of intents, variables, and entities within nodes is critical. Visualize this as an SQL case function where the system progresses through ordered parameters until no matches are met. This functions as a fallback action or, in SQL terms, an "else" statement.
{% endhint %}

{% hint style="info" %}
Determine the priority flow by assigning primary colors to intents for primary objectives and secondary colors for alternate objectives.
{% endhint %}


# Step 5. - Finalizing the Project

Our last step involves defining the concluding logic for the successful Virtual Assistant we've built.

Let's establish a simple TRUE/FALSE logic based on the customer's response to showcase a basic logic example in your application:

* "YES" intent loops back to the generative AI node.
* "NO" intent leads to ending the conversation.

{% hint style="warning" %}
Make sure you have properly setup the hangup (when the user is still on the call) and fallback (backing scenario)
{% endhint %}

<figure><img src="/files/bBnUZspOP2E3JW4cj1rz" alt=""><figcaption><p>Step 5. - Finalizing the Project</p></figcaption></figure>

<details>

<summary>Step by step</summary>

1. Create an ending node for the "NO" intent.
2. Generate a new message node, "Please write your answer below," connected to the generative AI node for the "YES" intent.
3. Connect the "Fallback" to the newly created message node.
4. For "Hangup," immediately end the call.

</details>

{% hint style="info" %}
You can create an infinite loop by arranging 'yes/no' questions to return to the same node (avoiding the call end).
{% endhint %}


# Step 6. - Training and Execution

Congratulations on creating your first Virtual Assistant that knows your name!

Before training the project, ensure you've activated the "Execute..." option in the advanced settings before the Generative AI node in the last message node. The project is automatically saved, and now it's time to train it by clicking the designated button.

<figure><img src="/files/WSJlsXqrK9Y48tGgpss4" alt=""><figcaption><p>Step 6. - Training and Execution</p></figcaption></figure>

We intentionally used a two-line user name as an example. We elucidated the usage of the "namex" function back in Step 2. Feel free to modify or delete these sentences based on your requirements.

Wanna know more about project deployment? [Visit this page](/digital-agent/workspace/deploy-project)

<details>

<summary>Step-by-step</summary>

1. Review and reconfigure the message node connected to the ***'Generative AI' node***, ensuring that the checkbox for *"execute"* is selected.
2. Validate the logic of the entire flow to ensure smooth functioning.
3. Initiate the training process by clicking the *"Train version"* button. If any errors arise, carefully review the provided information and improve the problematic node(s) accordingly.
4. Interact with your newly created Virtual Assistant by clicking on the **Chat Bubble** and engaging in a conversation.

You've now successfully developed your First Virtual Assistant!

</details>

{% hint style="warning" %}
The displayed message: {'name': 'John', 'surname': 'Swain'} showcases the specific details retrieved by the "Namex" function. You can extract particular parts for usage purposes as demonstrated in [Step 2](#step-2.-creating-simple-greetings).
{% endhint %}

{% hint style="info" %}
Even minor alterations in the **Conversation Flow** necessitate retraining the version. Ensure you untrain and retrain the version to implement and observe any updates or modifications made.
{% endhint %}


# Advanced functions

This chapter explores advanced features and capabilities within our Digital Studio, enabling users to harness the full potential of their conversational applications

### By utilizing and understanding

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/y82k1p4d8O7PF6ArgdLI">/pages/y82k1p4d8O7PF6ArgdLI</a></td><td>The Knowledge Base is a repository of information that the chatbot or voicebot can access to provide accurate and relevant responses to user queries.</td><td></td><td><a href="/pages/y82k1p4d8O7PF6ArgdLI">/pages/y82k1p4d8O7PF6ArgdLI</a></td></tr><tr><td><a href="/pages/9UjuXW0G8R3liPIZXE6o">/pages/9UjuXW0G8R3liPIZXE6o</a></td><td>Recordings allow you to review and analyze voicebot interactions, including transcriptions of customer conversations, for quality assurance and training purposes.</td><td></td><td><a href="/pages/9UjuXW0G8R3liPIZXE6o">/pages/9UjuXW0G8R3liPIZXE6o</a></td></tr><tr><td><a href="/pages/eXmwtimuqufO8uqzI2XI">/pages/eXmwtimuqufO8uqzI2XI</a></td><td>The Statistics section provides valuable insights into the performance of your chatbot or voicebot, allowing you to measure and improve its effectiveness.</td><td></td><td><a href="/pages/eXmwtimuqufO8uqzI2XI">/pages/eXmwtimuqufO8uqzI2XI</a></td></tr><tr><td><a href="/pages/9tCgM4rhH5cb27j9hBh7">/pages/9tCgM4rhH5cb27j9hBh7</a></td><td>The Code Editor is a tool that automatically generates code based on changes made in the Flow Editor, eliminating the need for manual coding and making the development process more efficient</td><td></td><td><a href="/pages/9tCgM4rhH5cb27j9hBh7">/pages/9tCgM4rhH5cb27j9hBh7</a></td></tr><tr><td><a href="/pages/JzRf9V1g0yIzulVEqcdd">/pages/JzRf9V1g0yIzulVEqcdd</a></td><td>Learn how to build custom widgets in ANSWER node</td><td></td><td></td></tr></tbody></table>


# Knowledge base

Learn how the Knowledge base empowers your digital agent by providing the necessary information to answer your users\` questions by leveraging both Generative AI and Internal knowledge.

## Creating a Knowledge base

Knowledge base files typically contain internal information, customer queries (FAQ), and specific answers based on previous analysis. It can also contain internal documents like General Terms and Conditions, Privacy Policies, NDAs agreements, and more. The Knowledge base is a vital component of our ['AI' node](/digital-agent/conversation-flow/nodes-explained/ai-node), allowing us to extract knowledge from it and use OpenAI's generative solutions to provide answers.

In this chapter, we'll guide you through creating, managing, and utilizing Knowledge base index files.

### Creating an new index

<figure><img src="/files/qmHtvpTsfemsAkPubSZs" alt=""><figcaption><p>Knowledge Base - creating new index</p></figcaption></figure>

<details>

<summary>Step by step guide</summary>

1. Select a project in your Workspace.
2. In the left main menu, navigate to Knowledge base.
3. Click on  <img src="/files/WHpROBH5QqCxiKU6Az2G" alt="" data-size="line"> button in the upper left corner.
4. In modal window, name your index.

</details>

### Gathering knowledge

Collect relevant information from various sources such as FAQs, manuals, documentation, and subject matter experts. Ensure that the gathered data is accurate, up-to-date, and aligned with the intended purpose of the digital agents.

#### Method 1: Uploading text documents

You can easily upload knowledge from text documents directly from your computer.&#x20;

<figure><img src="/files/iIISzldXjkSCHQFw15FW" alt=""><figcaption></figcaption></figure>

<details>

<summary>Steps by step guide</summary>

1. Navigate to Choose a file section in modal.
2. Click on the option to upload text documents. Select the desired text documents from your computer. Or utilize drag-and-drop functionality.
3. (Optional) Adjust parsing and chuck size parameters.
4. Confirm the upload, and the platform will process the documents and integrate them into your index.

</details>

{% hint style="warning" %}
Each file must be under 100 MB, and the entire upload should not exceed 200 MB.
{% endhint %}

Before uploading a document to the index, you have the option to configure parsing settings to tailor the integration process according to your requirements.&#x20;

#### Parsing options

1. **No parsing**: Selecting this option will bypass any parsing of the document content. The document will be uploaded as-is into the index.
2. **Simple parsing (No LLM)**: This is the **default parsing option recommended** for most scenarios. It involves basic parsing without utilizing large language models (LLMs).

**Simple Parsing Method - Delimiters:** You can now split documents by setting a delimiter (ENTER or double ENTER). The document will be divided into snippets based on the chosen delimiter. Default delimeter means snippets will be parsed with the same approach as before

{% hint style="info" %}
Use this method in case you have a clear TXT document (for example FAQ type), where you have paragraphs of text woth questions / answers and you have ENTER or double ENTER between the paragraphs. Created snippets will be then created based on these paragraphs
{% endhint %}

<figure><img src="/files/gKcoInCS1IjIQiMjukig" alt=""><figcaption><p>Index simple parsing with delimiter example</p></figcaption></figure>

3. **Advanced Parsing**: This option involves parsing the document content using large language models. :exclamation:However, it's essential to consider the potential cost implications, as utilizing LLMs can <mark style="color:red;">significantly increase token consumption and, consequently, expenses</mark>. :exclamation:
4. **Custom Parsing:** Select specific areas to split into snippets using the **SHIFT + ENTER** command, allowing for more control over how the snippets are creating. For now, upload just one document at a time if you want to use this method

{% hint style="info" %}
When you upload your document, set the Custom parsing method and you press Upload -> txt version of the document will be shown to you on the next page, where you can decide by yourself how the snippets will be created
{% endhint %}

<figure><img src="/files/Mzlrg5qnF1THRyzxLUis" alt=""><figcaption><p>Index custom parsing example</p></figcaption></figure>

​

#### Chunk size

You have the flexibility to adjust the chunk size parameter, which determines the size of text portions processed during parsing. The default chunk size is set to 300 tokens.

**Best practices**

* Unless specifically required, utilize the default option of simple parsing (no LLM) to minimize costs and token consumption.
* Adjust the chunk size parameter based on the size and complexity of the documents being parsed to optimize processing efficiency.
* We recommend using \*.txt, .html, .json, or .pdf files for optimal results. \*.docx files have a different code structure and may produce lower-quality outcomes.

####

## Method 2: Webscrapping / webcrawling

Web crawling enables you to extract knowledge from websites and integrate it into your knowledge base. Here's how to do it:

<figure><img src="/files/hXN76MB4Wy1KhOqN1976" alt=""><figcaption></figcaption></figure>

<details>

<summary>Step by step guide</summary>

1. Select <img src="/files/C3KkysgzwxC8fiYTf6ql" alt="" data-size="line"> feature within the modal.
2. Enter the URL of the website you want to crawl.
3. Specify any relevant parameters for the crawling process, such as depth, parsing, chunk size.
4. Clicking on the Upload button initiates the crawling process, and the platform will retrieve the content from the specified URL according to the provided parameters. The retrieved content will be automatically parsed and integrated into your knowledge base, ready to use in your digital agents' flow.

</details>

#### Current Limitations

* **Security issues have been identified on several websites, including financial and banking sites containing sensitive data**. The latest technology, including web scraping tools, cannot access content on these sites due to enhanced security measures and scam prevention. Additionally, concerns regarding compliance with cookie and privacy policies have been reported on multiple websites. **Current technologies, such as ChatGPT 4.0, are also affected by these limitations.**
* **No Automatic Refresh or Sync**: Currently, the platform does not support automatic refresh or synchronization for web scraping. Users must manually refresh the scraping process to update the content.
* **Static Web Pages Preferred**: Web crawling, which is essentially web scraping of pages, may not yield the best results for pages with dynamic fields, values, or information. It's more suitable for static web pages as a quick and easy solution to initiate the knowledge base.
* **Inconsistent Information Retrieval**: The effectiveness of web scraping depends on the structure and design of the target website. If the website is poorly constructed or has inconsistent formatting, the extracted information may not be accurate or useful.
* **HTML Formatting**: Web scraping retrieves content in HTML format, including tags, which can affect searchability in the index and, the number of snippets needed to attain necessary information and increase token consumption during processing in the flow.
* **Language processing dependencies on website code:** Web scraping for website content in a language that employs special accented characters in its alphabet will proceed correctly only when the HTML code of the website includes language information.

{% hint style="danger" %}
Web scraping is **not a suitable method** for building a knowledge base if your website contains **files other than HTML code,** such as PDFs. Text files can be uploaded directly into the index.
{% endhint %}

{% hint style="warning" %}
When constructing a knowledge base through web scraping, if the content is in language other than English, e.g. **Czech**, it is essential to ensure that the respective **website has the language in HTML code defined, e.g. as `<head lang="cs-CZ">.`** Otherwise, it will be processed as if it were in English, potentially leading to difficulties in processing characters with diacritics.<br>

The same principle applies to other **languages utilizing accented or special characters within their alphabets.**
{% endhint %}

<figure><img src="/files/PPvkfqOYeAXKuyOv56Q3" alt=""><figcaption></figcaption></figure>

#### Best Practices

* **Use APIs Where Possible**: Instead of relying solely on web scraping, consider utilizing APIs (such as FETCH\_URL) provided by websites whenever available. APIs offer a more reliable and structured way to access data and ensure consistency in information retrieval.
* **Consider Dynamic Content**: Evaluate the nature of the content on the target website before opting for web scraping. If the website contains dynamic fields or frequently updated information, web scraping may not be the most suitable approach.
* **Leverage ChatGPT-4 Analysis**: We recommend building indexes using GPT-4 analysis of the web. This approach leverages advanced language models for enhanced understanding and extraction of information. However, it's important to note that utilizing GPT-4 analysis may result in <mark style="color:red;">**increased costs.**</mark>

:robot: While web scraping capabilities may not deliver the best outcomes yet, our team is continuously working to enhance and optimize this functionality. Stay updated on platform updates and improvements to leverage the latest advancements!

{% hint style="info" %}
**General tips for building strong knowledge:**

* Start with a general\_faq index for common questions and information, then create more specific, smaller indexes to address specific fields within the conversation flow.
* **Shorter and well-structured documents tend to perform better** within the knowledge base. Ensure that documents are concise, organized, and focused on providing clear and relevant information.
* Currently, our **platform can only process textual input.** When creating content for the knowledge base, focus on textual information such as FAQs, manuals, guides, and articles. Avoid including non-textual elements such as diagrams, images, or infographics, as they will not be processed by the system.
* Whenever possible, **structure the content** of the knowledge base using headings, bullet points, and numbered lists. This enhances readability and makes it easier for users to navigate and extract relevant information.
* If you need to input tables into the knowledge base, for better interpretation of its content by LLM, it's preferable to insert the table in Markdown or HTML format.
* Uploading PDFs that are converted from images or contain graphical elements (such as background images) may not be processed correctly, or the platform may reject the file for indexing.
  {% endhint %}

***

## Managing the Knowledge base

Once you've created an index, you can efficiently manage it by utilizing four key buttons:

### Open index and upload more docs

Click this icon <img src="/files/iIYeB3xAn9BwzT010TNX" alt="" data-size="line">to access and view the current index. This way, you may add other documents to your existing index and build your knowledge base bit by bit.

<figure><img src="/files/529bvS1Vt86BfwcYAHPy" alt=""><figcaption></figcaption></figure>

### Copy index

Click on ![](/files/dAXpNkqIzLRfC5MkWhWr) icon to duplicate the selected index for creating backups or making variations.

<figure><img src="/files/sX9s5BMrVXrhCpMSr3ji" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
:bulb: Having administrative privileges within your organization or an editorial role across multiple projects, or being the owner of several projects within the organization, grants you the ability **to copy an index across projects.** \
\
Simply click on the dropdown arrow during duplication and select the project to which the copied index should be assigned.\
![](/files/VSq01EwumXx3Prg9HK1h)<br>
{% endhint %}

### Export/Import Index&#x20;

We have enhanced our Knowledge Base tab to allow you to **easily export and manage indexes.** You can now export one or multiple indexes with a simple click. Additionally, we've updated the functionality to ensure that the exported indexes can be seamlessly re-imported.

**Copy indexes** functionality can be also used if you just want to copy the index (either to the same, or other project).

{% hint style="info" %}
This will help you to move your fine tuned index from Test to Prod for example. All content of your index is exported (incl. snippets) and are uploaded to the new environment in the same way. **You can also export and import whole project configuration, which includes also indexes now**
{% endhint %}

<figure><img src="/files/mmkfCKgqv41hMeKYSTYJ" alt=""><figcaption><p>Export / import index</p></figcaption></figure>

### Edit index

When you want to edit an index, click on the pencil icon <img src="/files/zalFjB4wLf2nr5MnBBRc" alt="" data-size="line">. This will open an overview of individual documents. \
In this overview, you'll see document names, and annotations that were automatically generated. You can also view the number of tokens contained in the documents, among other details.

<figure><img src="/files/fV96dHe1bnlkes0sfYSe" alt=""><figcaption></figcaption></figure>

You can manage the entire index or focus on editing specific files within. You can filter the overview, add tags, download documents from the index, delete, or edit their content.

To maintain clarity, it's recommended to name your files in a way that reflects their content.<br>

{% tabs %}
{% tab title="Editing docs" %}

#### Editing Documents

Documents can be edited by clicking on the pencil icon. This opens a text window where you can rewrite the document's annotation, the document text itself, or add/remove tags.

<figure><img src="/files/unBftyNM6QQpYDyHeN7J" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip!** :bulb:\
When you press CTRL + F with the editing window, you can **search** the document's content. The search feature supports regular expressions <img src="/files/VgIXh7LFZQ1LdXrUXgf5" alt="" data-size="line">, case sensitivity <img src="/files/qxfT9sn1MR7clAUprtzc" alt="" data-size="line">, whole word search <img src="/files/TWBvjzXlhjCD47xUpYlF" alt="" data-size="line">, and searching within the selected text <img src="/files/LHg5rk9CaWfKV3AijF56" alt="" data-size="line">.\
\
![](/files/Wv6UG2kY1ZI3dW90veVO)\
Pressing CTRL + H opens up the **find and replace** function within the document. This functionality provides a convenient way to edit and modify text within the document efficiently.\
![](/files/OkhIYj8pVGOiP2fcvCPP)
{% endhint %}

#### Editing Snippets

If parsing was enabled during index creation, each document was segmented into snippets. Each of these **snippets can be edited individually.**

<figure><img src="/files/Ob97jZYN5BkTklViKX7y" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Downloading docs" %}
If needed, you can **download the index documents and data** to gain insight into its contents.\
\
You can download documents:

* **Individually** by clicking on the download icon.

<figure><img src="/files/Ye4OJhiAbYVtKCJl3KId" alt=""><figcaption></figcaption></figure>

* &#x20;**In bulk** by selecting multiple documents and clicking on the same icon in the table header.

<figure><img src="/files/kL6FHPKTAEGMEAUNjVB3" alt=""><figcaption></figcaption></figure>

* &#x20;If "Select All" is chosen in the multi-select mode, the **entire content of the index** including metadata will be downloaded as a .zip file.

<figure><img src="/files/kqir08OY3H5iHkW4gKZi" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Labelling docs" %}

#### Individual labelling

To **add labels individually to a single document** open the document for editing. Scroll down to the tag field and input the desired tags. You can create labels by clicking into the field, typing the label name, and pressing enter. A document can have multiple tags.

<figure><img src="/files/d82HbK80yQn81FsbAaJJ" alt=""><figcaption></figcaption></figure>

#### Bulk Labelling&#x20;

For adding **the same tags to multiple documents simultaneously:**

* First, select the documents to which you want to add tags. (If you want to add a tag to all documents, simply use the "select all" option in table header.)
* Then, click on the pencil icon in the table header.&#x20;
* Fill in the labels and click on save. This action will add the specified tags to all selected documents.&#x20;

<figure><img src="/files/rEz8yuNcyCnLNVbGo10X" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Deleting docs from index" %}
To **delete a document from the index**, look up the document and simply click on the trash bin icon. Make sure you've selected the right document before confirming deletion!

<figure><img src="/files/H4x67cj9lErYfrJp5eM7" alt=""><figcaption><p>Deleting a single document.</p></figcaption></figure>

If you need to **delete multiple documents at once**, you can select them in the multi-select mode and then click on the trash bin icon in the table header.

<figure><img src="/files/p8ccehXEM3LCkmwWEq1X" alt=""><figcaption><p>Deleting documents in bulk.</p></figcaption></figure>
{% endtab %}
{% endtabs %}

### Delete index

By clicking on ![](/files/unRRCvnonwvabtuZSKXS)icon, remove the index when it's no longer needed.

<figure><img src="/files/iB2m0eZ1S59iFAQumKNW" alt=""><figcaption><p>Deleting index.</p></figcaption></figure>

{% hint style="warning" %}
Be cautious when deleting a Knowledge base index, as this action <mark style="color:red;">**cannot be undone**</mark> :exclamation:
{% endhint %}

***

## Integrating Knowledge base into a conversation flow

Integrating the knowledge base into the conversational flow is a crucial aspect of enhancing the capabilities of the digital agent. This integration is achieved through the AI node.

<figure><img src="/files/28nCJIFScdRDeCXb5CRi" alt=""><figcaption></figcaption></figure>

<details>

<summary>Step by step guide</summary>

1. Navigate to the [AI node](/digital-agent/conversation-flow/nodes-explained/ai-node).
2. Toggle the option to enable the utilization of the knowledge base within the AI node. In the functions dropdown select **Knowledge base.**
3. Configure Knowledge base settings:
   * Select Index name: Choose the specific index from the knowledge base that the digital agent will utilize to retrieve relevant information.&#x20;
   * Definine Snippet count: Specify the number of snippets to be retrieved from the selected index. Snippets are concise excerpts of information that are relevant to the user's query.
   * (Optional) Allow and define Adjuscent snippet count.
4. Once the knowledge base integration is configured, the generative language model will utilize snippets from your index to generate responses. Craft your prompt carefully to guide LLM to create concise and well-articulated output.\
   :sparkles: Visit [Prompting cookbook](/for-advanced-users/prompting-cookbook) for some tips and tricks.&#x20;
5. Don't forget to set the target node.

</details>

{% hint style="warning" %}
Without enabling the Knowledge base function and choosing the source index, the digital agent won't have access to any customized knowledge you've prepared. In this case, the LLM will use its pre-trained general knowledge and make answers on the spot, or it may even start hallucinating.
{% endhint %}

***

## Creating the index sources

Requirements: ChatGPT4.0

Please note that this is for testing and workflow purposes only, as ChatGPT may face challenges when handling more than 50 rows in a single sheet.

### Prompt #1 - Generate txt files

Copy and paste the text below to see the example:

{% file src="/files/6do47iedo0XWGmrCB85l" %}
Example sheet
{% endfile %}

***

You are an automated task manager specialized in data processing. Your task today involves handling an uploaded Excel spreadsheet to create individual \*.txt files based on its content. Before you proceed, please carefully review the following instructions:

1. **Ignore the First Row**: The first row of the spreadsheet is the header. Do not create a .txt file for this row.
2. **Column 'File\_name'**: Use the data in this column as the name for each .txt file.
3. **Column 'Body\_header'**: This column contains data that should be placed as the first line in the body of the text file.
4. **Column 'Body\_subheader'**: The contents of this column should follow as the second line in the text file's body.
5. **Separate Files**: Generate a distinct .txt file for each row in the Excel sheet, excluding the header row. The file name and content should be derived from the relevant columns as specified.

Now, with these instructions in mind, please process the inserted \*.xlsx file and create a separate .txt file for each row following the guidelines provided.

***

### Prompt #2 - Generate zip file

Please copy this text below:

***

Your next task as an automated file manager involves a crucial step of archiving. After successfully creating individual \*.txt files from the Excel spreadsheet, it's time to consolidate them. Please follow these instructions to proceed:

1. **Gather All .txt Files**: Locate all the .txt files you've just created from the Excel sheet. Ensure none are missed.
2. **Combining Files**: Combine these individual .txt files into a single archive. The format for this archive should be \*.zip.
3. **Naming the Archive**: Name the .zip file in a way that clearly identifies its contents or its source (for example, 'Processed\_TextFiles.zip' or a name that reflects the project or date).
4. **Checking for Completeness**: Before finalizing the archive, ensure that every .txt file is included in the .zip file. This step is crucial to maintain data integrity and completeness.
5. **Final Output**: Once the .zip file is created and all files are confirmed to be included, your task is complete. The archive should now be ready for storage or distribution as required.

Please proceed with these steps to create the combined \*.zip file from the individual text files.

***

## FAQs and troubleshooting

<details>

<summary>I cannot upload a file. It always results in error. Why?</summary>

There could be several reasons why uploading a document to the index ends in an error:

1. **Document size limit**: The document may exceed the maximum allowable size. Each document has a maximum size limit of 100 MB. Ensure that the document size complies with this limitation.
2. **Unsupported document format**: You may be attempting to upload a document in a format that is not supported. Only text documents can be processed and parsed. Ensure that you are uploading a supported text document format (e.g., .txt, .pdf, .doc).
3. **Document content**: Although the format of the document may be supported, its content might contain graphical elements or hidden formatting that could cause issues during processing. Try converting the document to plain text format to eliminate any potential formatting complexities before uploading it.

</details>

<details>

<summary><strong>Can I upload images, diagrams, or infographics into the knowledge base?</strong></summary>

Unfortunately, it isn't currently possible as we do not support this feature. The input files must be text-based to facilitate parsing.

However, the processing of visual documents is on our roadmap, and it's something we plan to implement in the future. Stay tuned for updates, as we aim to enhance our platform to support a broader range of content types

</details>

<details>

<summary>I accidentaly deleted index/files from index. Can it be recovered?</summary>

Unfortunately, no. Once it's deleted, it's gone.

</details>

<details>

<summary>Can I use multiple indexes in one project?</summary>

Absolutely! You can use as many indexes as you desire within a project.&#x20;

In fact, it's often beneficial to utilize multiple indexes, especially when creating more narrowly focused thematic indexes. This approach increases the likelihood of retrieving relevant snippets, enabling the chatbot to cover a broader range of nuances within the provided knowledge base.

However, it's important to note that **within a single AI node, only one index can be linked.** Therefore, in your conversational flow, you need to ensure that you can recognize the correct intent from the user's utterance and direct it to the AI node associated with the relevant thematic knowledge base. This ensures that the digital agent can access the appropriate index to provide accurate and contextually relevant responses to user queries.

![](/files/aFi211XctXm7nAlRMuVZ)

</details>

<details>

<summary>What are labels for?/<strong>Do labels have to be related to the content of the document?</strong></summary>

Labels are at your disposal for your convenience. You can use them for various purposes beyond categorizing documents. For instance, labels can be employed to facilitate smoother collaboration within your team. For example, if multiple individuals are managing the knowledge base, you can assign labels to documents to indicate the person responsible for their factual accuracy, such as "Jack" :man: or "Jill" :woman:.&#x20;

Alternatively, you can utilize labels to indicate the validity period of documents, making it easier for you to search within the index in the future and keep track of what needs updating.

Feel free to leverage labels in a manner that best suits your workflow and organizational needs. They serve as a flexible tool to enhance efficiency and organization within your project.

</details>

<details>

<summary>Are labels case-sensitive?</summary>

Yes, they are. So be mindful when assigning labels to files in your index.

</details>

<details>

<summary>How can I keep track on changes in indexes?</summary>

Sure thing. :sunglasses:\
Documents within the index contain **metadata** columns, allowing you to monitor changes effectively. You can view details such as which user uploaded a file and when it was uploaded, as well as who last modified the file and the timestamp of the modification.

You can sort the file table based on various criteria, such as from the most recently updated to the oldest.

Simply click on the three dots in the column header by which you want to sort the table. Alternatively, click on the green button in the top left corner above the table to set filters according to your preferences. This enables you to organize and track changes within the index efficiently.

</details>

<details>

<summary><strong>Does the information in the knowledge base need to be in the same language as the project language?</strong></summary>

It is not necessary. Language Models (LMs) have the capability to understand and translate queries into multiple languages. However, it's essential to consider that having the knowledge base and the project in different languages may lead to the loss of some nuances in translation, potentially impacting the searchability within the knowledge base. Additionally, LMs may encounter difficulties with certain terms and product names.

While having the knowledge base and project in the same language is not mandatory, it often results in better outcomes.

</details>

<details>

<summary>I have various elements on my website, such as infographics, slides and other dynamic content. Will it all be scraped into the knowledge base?</summary>

No. Web scraping only retrieves HTML code. Therefore, additional elements like dynamic content cannot be processed through web scraping. Using an API is a better approach for supplying dynamic content to a digital agent.<br>

Note that currently knowledge base feature supports only textual input.

</details>

<details>

<summary>If I have text files on my website, such as PDFs, will they be downloaded into the knowledge base during web scraping?</summary>

No. Only HTML code is scraped, so files will not be included in the knowledge base. If you want to include a text file in the database, you must manually upload it to the index as a file.

</details>

<details>

<summary>I've scraped a website, but the indexed content contains broken characters. What should I do?</summary>

The website is likely in a language other than English. Check the source code of your website. The **language attribute** of the page **must be included in the code**, as some processes rely on it during processing.

Example:&#x20;

`<head lang="cs-CZ">`<br>

Suppose the language of the website is not specified in the HTML. In that case, it is assumed to be English by default, and attempts are made to decode characters into the standard English alphabet but fail to handle characters with non-English Unicode values.

</details>


# New AI node property variables

We have completed a minor deployment on the Customer-Test environment, specifically related to the indexer functionality. This update introduces important changes that you need to be aware of:

### New Automatic Variable Population in AI Node

When using the indexer in the AI node, the following variables are now automatically populated and can be utilized within your workflows:

### **FINAL DOCUMENT Variables:**

* **kb\_document\_id**: Contains the internal ID of the document used. This ID can be used for advanced API calls to the indexer, if needed.
* **kb\_document\_name**: Contains the name of the document used for the final answer.
* **kb\_document\_url**: Contains the URL of the document used for the final answer. This will be empty if the URL is not populated in the document.

<figure><img src="/files/XVmLJQ04GPG67WJP5TJ2" alt=""><figcaption></figcaption></figure>

**Use Case Example:** To display to the user which document was used to prepare the answer, you can use the MSG node after the AI node. For instance:

```kotlin
For more information, check this document:
[{kb_document_name}]({kb_document_url})
```

or

```csharp
My answer was based on this document:  
[{kb_document_name}]({kb_document_url})
```

The end result will be a clickable link to the document used for the answer. Ensure the URL is populated in the Knowledge Base tab and is the URL of the original document.

### INDEXER Related Variables

The following variables are now available for indexer-related data:

**indexer\_returned** where result of the index search to the indexer is stored. It's json format with

* list of documents, from which the snippets were found based on the question and snippet size
* for each document
  1. id of the document
  2. url of the document
  3. name of the document
  4. labels for the document
  5. description = annotation od the document
  6. individual chunks (again, as list)

**Use Case Example:** For reporting and troubleshooting, you can check which snippets have been found and what document descriptions were used to find the best answer without needing to check technical logs. This can also be used within the flow to work with JSON-structured variables.

<figure><img src="/files/XRPWIMuQ3ffKNW5oV7ft" alt=""><figcaption></figcaption></figure>

### **AI NODE primary variable, where the response of GPT is stored**

The primary variable where the GPT response is stored remains the **gpt\_response** variable. This JSON structure now also includes:

* **gpt\_response** variable (or however you call the variable in the AI node)

[it's a json structure variable, where originaly you were working with (or AI node used bu default) the key "response\_text"](#user-content-fn-1)[^1]

* **Now it also contains these keys:**
  1. function\_call -> if the AI node used function, you will see it here and use in the flow or troubleshooting. This key contains

     name of the function used

     arguments -> in our case questions, which GPT used to send to indexer
  2. error -> if there was an error response form the AI node/gpt

<figure><img src="/files/tpPaDD1NsF0yioMIZj5R" alt=""><figcaption></figcaption></figure>

[^1]:


# Recordings

Within the recording tabs, you have access to a comprehensive log of voicebot interactions, complete with transcriptions of real customer voices.

<figure><img src="/files/iioppzBhg613OV15T8wS" alt=""><figcaption><p>Recording screen</p></figcaption></figure>

At the top of the table, convenient search and filtering tools allow you to locate specific calls and sort columns based on your criteria. Whether you're dealing with inbound or outbound calls, the process remains consistent.

You can easily navigate through these records, with options to play, pause, or download the voice transcriptions for in-depth analysis. Remember to ensure that you have enabled call recording during the project deployment phase to access these valuable insights.

{% hint style="info" %}
Each recording provides valuable context, such as the subject matter of the call, like in this example where the discussion centers around Born Digital's services.
{% endhint %}


# Statistics

"What is measured is improved," as quoted by Peter Drucker. On the Statistics page, you gain access to the Business Dashboard, featuring essential analytics powered by Kibana.

<figure><img src="/files/eysV9oIgscwNsc6BbpHi" alt=""><figcaption><p>Digital Studio  Business Dashboard</p></figcaption></figure>

Within this dashboard, both business and technical metrics are available for in-depth project examination. Utilizing the Kibana Query Language (KQL), you can search and analyze conversation inputs and outputs effectively.&#x20;

For example, you can sort through over 60 conversations with more than 100 interactions from past days, filter specific conversations, and even download data samples in CSV format. To access the Utterance/Response table, click on Settings and select 'Download Table.'

{% hint style="info" %}
This Business Dashboard serves as a foundational analytical tool for all projects in Digital Studio, with the flexibility to personalize settings according to your preferences and specific project needs.
{% endhint %}


# Code editor

The Code Editor in Born Digital automates code generation based on your changes in the Flow Editor, eliminating the need for manual coding.

It's crucial to keep the Flow Editor and Code Editor synchronized, as any changes made in one are reflected in the other.

<figure><img src="/files/OfKZFLp2OMcT8NHkHORM" alt=""><figcaption><p>Code Editor - example</p></figcaption></figure>

In the past, project flows were manually coded in the Code Editor.&#x20;

However, we now adopt a more user-friendly approach with the Flow Editor, making the process smoother and more accessible. This explanation is provided for informational purposes.

{% hint style="danger" %}
Please avoid disabling the synchronization between the Flow Editor and Code Editor, as it can be challenging to manage.
{% endhint %}


# Widgets

Widget enhances the interactivity of chat with your Digital agent by allowing users to engage with dynamic components directly within the conversation flow.

<figure><img src="/files/BhFoLBMvbcVt44AkHb55" alt=""><figcaption></figcaption></figure>

<details>

<summary>Creating a widget step-by-step</summary>

1. **Create Answer Node (ANS node):**
   * Add an [Answer node](/digital-agent/conversation-flow/nodes-explained/answer-node) to your flow diagram. This node represents a point in the conversation where the chatbot waits for user input.
2. **Access Advanced Settings:**
   * Click on the button to access its advanced settings.
3. **Enable "Use as a Widget" Toggle:**
   * Within the advanced settings, locate the "Use as a widget" toggle and enable it. This indicates that the Answer node will function as a widget.
4. **Paste Widget Code:**
   * In the designated code field, paste the code for the widget you wish to integrate. You can use the example code provided in this documentation and customize parameters to suit your requirements.
5. **Customize Parameters:**
   * Modify the parameters of the widget code to customize its behaviour, appearance, and functionality according to your preferences and the specific needs of your chatbot

</details>

**Widget Behavior:**

* **Interaction:** When the chatbot encounters an ANS node functioning as a widget, it displays the widget within the chatbot bubble, allowing users to interact with it directly.
* **Submission:** The chatbot pauses its flow and waits for the user to fill out and submit the widget. Once the user submits the widget, the chatbot continues its flow according to the defined path in the diagram.

**Data Handling:**

* **Variable Storage:** Values collected from the widget, such as user responses or selections, are stored in backend variables for further processing and analysis.

{% hint style="warning" %}
Widgets are designed for use within **chat-based Digital agents only** and are not compatible with voicebots.
{% endhint %}

{% hint style="info" %}
:tada: Widget graphic elements, including colours, fonts, and overall chatbot bubble appearance, can be customized to match the client's branding and style. Contact the [Born Digital team](https://borndigital.ai/contact-us/) to explore customization options.
{% endhint %}

***

## Star rating

The **Star rating** is a widget designed to gather user feedback through a star rating system. It allows users to rate their satisfaction on a scale of stars and optionally provide additional comments.

<figure><img src="/files/K4tF6UeGbSNnNpgbbO3J" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: Chatbot_Rating
  DATA:
    widget:
      Question: 'Please rate our conversation.'
      Submit_Button_Message: Submit
      Feedback_Message: Thanks!
      Star_Labels:
        - Horrible
        - Bad
        - Standard
        - Good
        - Great
      Additional_Fields:
        - visible_on: '[true,true,true,true,true]'
          title: 'Could you give us a feedback?'
          placeholder: Type here...
```

{% endcode %}

**Configuration Parameters:**

1. **`Question`:** The prompt displayed to users, asking for their feedback.
   * **Data Type:** String
   * **Example:** `"Please rate our conversation. How easy was it for you to resolve the issue with the information we provided?"`
2. **`Submit_Button_Message`:** The text displayed on the submit button.
   * **Data Type:** String
   * **Example:** `"Submit"`
3. **`Feedback_Message`:** The message displayed to users after they submit their feedback.
   * **Data Type:** String
   * **Example:** `"Thank you for your response."`
4. **`Star_Labels`:** Labels for the star rating scale, indicating user satisfaction levels. <mark style="color:purple;">**The number of stars is based on the number of elements listed in the array**</mark><mark style="color:purple;">.</mark> Additional stars can be added to provide more granularity in the rating scale. \
   The strings in the array will be displayed on hover above the corresponding number of stars. The string meaning should start from the lowest rating and progress upwards (e.g., the worst to the best, the lowest to the highest) to maintain consistency within the scale. Ensure that each label reflects a corresponding level of satisfaction and fits within the scale progression.

   * **Data Type:** Array of Strings
   * **Example:**

   <pre class="language-javascript" data-title="Array for 5 stars option"><code class="lang-javascript"><strong>[...]
   </strong><strong>Star_Labels:
   </strong><strong> - Very Dissatisfied
   </strong> - Dissatisfied
    - Neither Satisfied nor Dissatisfied
    - Satisfied
    - Very Satisfied
   [...]
   </code></pre>
5. **`Additional_Fields`:** Additional input fields that can be displayed alongside the star rating widget. The additional field is optional and does not need to be shown for all ratings. The visibility of the additional field can be customized using the `visible_on` parameter, where the number of elements in the array corresponds to the number of stars.
   * **Data Type:** Array of Objects
   * **Example:**

     <pre class="language-javascript" data-title="Array for 5-stars option" data-overflow="wrap"><code class="lang-javascript">[...]
     Additional_Fields:
       - visible_on: '[true,true,true,true,true]'
         title: 'We would appreciate it if you could provide reasons for your rating:'
         placeholder: Your response
     </code></pre>

* The **`visible_on`** array determines when the additional field should be displayed. \
  For example:\
  `[true, true, true, true, true]`: The additional field is displayed for all ratings.\
  `[false, false, false, false, false]`: The additional field is not displayed for any rating.`[true, true, false, false, false]`: The additional field is displayed only if the user selects one of the two lowest ratings
* The **`title`** parameter specifies the text to be displayed above the textarea for feedback. It's recommended to provide instructions and a request for feedback in this field.
* The **`placeholder`** parameter specifies the text to be displayed inside the textarea where users can provide feedback. For example, "Write here". If no placeholder text is desired, an empty string `""` can be used.

***

## NPS

The `NPS_Rating` widget is designed to collect feedback using the Net Promoter Score (NPS) methodology. Users are prompted to rate their likelihood of recommending a product or service, typically on a scale from 0 to 10.

<figure><img src="/files/ub9EpTPLKpXwtCsWCmvN" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" overflow="wrap" %}

```javascript
'1':
  WIDGET: NPS_Rating
  DATA:
    widget:
      Question: How likely is it you recommend our services to your family and friends?
      Submit_Button_Message: Submit
      Feedback_Message: Thank you!
      MinScale: 0
      MaxScale: 10
      Scale_Min_Text: Most unlikely
      Scale_Max_Text: Most likely
```

{% endcode %}

**Configuration Parameters:**

1. **`Question`:** The prompt displayed to users, instructing them to provide their response on a given scale, where the highest score represents "most likely" and the lowest represents "definitely not likely."
   * **Data Type:** String
   * **Example:** "`Please rate your response on a scale of 0 to 10, with ten representing very likely and zero representing definitely not likely`."
2. **`Submit_Button_Message`:** The text displayed on the submit button.
   * **Data Type:** String
   * **Example:** `"Submit"`
3. **`Feedback_Message`:** The message displayed to users after they submit their response.
   * **Data Type:** String
   * **Example:** `"Thank you for your response."`
4. **`MinScale:`**&#x54;he minimum value on the rating scale.
   * **Data Type:** Integer
   * **Example:** `0`
5. **`MaxScale:`**&#x54;he maximum value on the rating scale.
   * **Data Type:** Integer
   * **Example:** `10`
6. **`Scale_Min_Text:`**&#x54;he text corresponding to the minimum value on the rating scale (e.g., "Definitely not likely").
   * **Data Type:** String
   * **Example:** "`Definitely not likely"`
7. **`Scale_Max_Text`:** The text corresponding to the maximum value on the rating scale (e.g., "Very likely").
   * **Data Type:** String
   * **Example:** `"Very likely"`

***

## Like or Dislike rating

The `Like Dislike Rating` widget provides users with the option to express their preference regarding a chat session by indicating whether they liked or disliked it. Users can also provide specific feedback about what they liked or what could be improved.

<figure><img src="/files/BYXlCbKlTmXYNdnTOT3h" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: Like_Dislike_Rating
  DATA:
    widget:
      description: Did you like our chat?
      isChatInputHidden: true
      submit: Send
      likeForm:
        - enabledOnSelected: true
        - placeholder: Let me know what you liked the most.
      dislikeForm:
        - enabledOnSelected: true
        - placeholder: Let me know what to improve.
```

{% endcode %}

**Configuration Parameters:**

1. **`description`:** A brief description of the purpose, prompting users to indicate whether they liked the chat session, service, information provided etc.
   * **Data Type:** String
   * **Example:** `"Did you like our chat?"`
2. **`isChatInputHidden`:** Determines whether the chat input field is hidden during the rating process.
   * **Data Type:** Boolean
   * **Example:** `true`
3. **`submit`:** The text displayed on the submit button.
   * **Data Type:** String
   * **Example:** `"Send"`
4. **`likeForm`:** Configuration for the form fro users to fill out if they liked the chat.
   * **Data Type:** Array of Objects
   * **Example:**

     ```javascript
     [...]
     likeForm:
       - enabledOnSelected: true
       - placeholder: "Let me know what you liked the most."
     [...]
     ```
   * Sub-Parameters:
     * **`enabledOnSelected`**: Determines whether the form is enabled when the "like" option is selected. Set `true` if you want to show feedback form after the user selected thumb's up :thumbsup:, otherwise set `false`.
     * **`placeholder`**: The placeholder text displayed inside the input field for users to provide feedback on what they liked.
5. **`dislikeForm:`**&#x43;onfiguration for the form users can fill out if they disliked the chat.
   * **Data Type:** Array of Objects
   * **Example:**

     ```javascript
     [...]
     dislikeForm:
       - enabledOnSelected: true
       - placeholder: "Let me know what to improve."
     ```
   * Sub-Parameter&#x73;**:**
     * **`enabledOnSelected`**: Determines whether the form is enabled when the "dislike" option is selected. Set `true` if you want to show feedback form after the user selected thumb's down :thumbsdown:, otherwise set `false`.
     * **`placeholder`:** The placeholder text displayed inside the input field for users to provide feedback on what could be improved.

**Output Variables:**

After the user submitted result to Like or Dislike rating widget, output is always stored in three variables named  `Like_Dislike_Rating_Widget_Result`, `Dislike_Rating_Widget_Dislike_Form` and `Like_Dislike_Rating_Widget_Like_Form`.

* **`Like_Dislike_Rating_Widget_Result`:** Stores the overall rating result chosen by the user ('Like' or 'Dislike').
  * Data Type: String
  * Example: `"like"`
* **`Like_Dislike_Rating_Widget_Dislike_Form`:** Stores the feedback provided by the user in the dislike form.
  * Data Type: String
  * Example: "`The response time was too slow."`
* **`Like_Dislike_Rating_Widget_Like_Form`:** Stores the feedback provided by the user in the like form.
  * Data Type: String
  * Example: `"I liked the helpful responses."`

***

## Checkbox

The `Checkbox` widget provides users with the ability to select a single choice or multiple options from a list using checkboxes. This widget is suitable for collecting responses to single-choice or multiple-choice questions or gathering feedback on various options.

<figure><img src="/files/0SbePSVaKHAUQxQN4n9f" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: Checkbox
  DATA:
    widget:
      checkboxSingleCheck: false
      description: Choose your favourite ice cream flavours.
      checkbox:
        - name: icecream_vanilla
          text: Vanilla
        - name: icecream_chocolate
          text: Chocolate
          textIfChecked: Chocolate is the best!
        - name: icecream_strawberry
          text: Strawberry
        - name: icecream_lemon
          text: Lemon
        - name: icecream_caramel
          text: Salted caramel
      buttons:
        - button_name_1: Submit
          text: Submit
          clickable_if: ''
```

{% endcode %}

**Configuration Parameters:**

1. **`checkboxSingleCheck`:** Determines whether only one option can be selected at a time (`true` for single selection, `false` for multiple selections).
   * **Data Type:** Boolean
   * **Example:** `false` (Multiple selections allowed)
2. **`description`:** Provides additional context or instructions for users regarding the purpose of the checkbox widget.
   * **Data Type:** String
   * **Example:** `"Please selected your favourite ice cream flavours from the checkbox below. Multiple options can be selected."`
3. **`checkbox`:** Defines the list of options available for selection using checkboxes. Each option is defined by one object in the array. Define as many checkbox options as you want.
   * **Data Type:** Array of Objects
   * **Example:**

     <pre class="language-javascript" data-overflow="wrap"><code class="lang-javascript">[...]
     checkbox:
       - name: variable_option_1
         text: Option 1
       - name: variable_option_2
         text: Option 2
         textIfChecked: "This is the text which appears if Option 2 is checked"
       - name: variable_option_3
         text: Option 3
     [...]
     </code></pre>
   * Sub-Parameters:
     * **`name`**: The variable name where the selection status (true/false) of the checkbox will be stored.
     * **`text`**: The text displayed next to the checkbox option.
     * **`textIfChecked`** (Optional): Additional text that appears when the checkbox is checked.
4. **`buttons`:** Defines the button associated with the widget, such as a submit button.
   * **Data Type:** Array of Objects
   * **Example:**

     ```yaml
     buttons:
       - button_name_1: Submit
         text: Submit
         clickable_if: ''
     ```
   * Sub-Parameters:
     * **`text`**: The text displayed on the button. Customize it to your liking.
     * **`clickable_if`** (Optional): Condition for button clickability. Leave empty for unconditional clickability.

{% hint style="info" %}
Additionally, the `name` parameter within the Checkbox widget defines the variable name where the selection status (true/false) of each checkbox option will be stored. This variable can be utilized to drive subsequent scenarios within the chatbot's flow based on the user's selections.\
![](/files/JaAyuBNf5EUMk2pIrlpz)
{% endhint %}

***

## Geolocation

The `Geolocation` widget is a feature designed to enable users to share their precise location or localise precise points/addresses within the chat interface.

<figure><img src="/files/owuTgFIIbPOF735K1idM" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" overflow="wrap" %}

```javascript
'1':
  WIDGET: Geolocation
  DATA:
    widget:
      name: location
      title: Your location
      description: "Please allow GPS localisation in your browser."
      submit_button_text: Find my location
      enableSkipButton:
        enabled: false
        text: Skip
      enableComment:
        enabled: false
        variableName: GeolocationComment
        label: Leave a comment
        placeholder: Type here..
      enable_map_visualization: true
      map_visualization_text: Check the location on map
      map_visualization_submit_button_text: Confirm
      enable_address_retrieval: true
```

{% endcode %}

**Configuration Parameters:**

1. **`name` :** Defines the variable name where the location data will be stored.
   * **Example:** `location`
2. **`title`:** Displayed at the top of the widget, providing context to users.
   * **Data type:** String
   * **Example:** `Your location`
3. **`description`:** A brief instruction guiding users on how to enable GPS localization. Show below the Title of the widget.
   * **Data type:** String
   * **Example:** `Please allow GPS localization in your browser.`
4. **`submit_button_text`:** Text displayed on the button to initiate location retrieval.
   * **Data type:** String
   * **Example:** `Find my location`
5. **`enableSkipButton:`**&#x41;llows users to skip sharing their location if preferred.
   * **Enabled:** `true`/`false`
   * **Text:** Text displayed on the button, eg. `"Skip"`
6. **`enableComment:`** Permits users to leave additional comments or notes along with their location.
   * **`enabled`:** `true/false`
   * **`variableName`:** name of the variable where the comment string will be stored, eg. `GeolocationComment`
   * **`label:`** Label displayed above the comment box, data type: string, eg.:`Leave a note`
   * **`placeholder:`** Text displayed in the comment box until the user starts typing, data type: string, eg. `Type here...`
7. **`enable_map_visualization`:** Option to visualize the location on a map interface for enhanced user experience.
   * **Data type:** Boolean
   * **Example:** `true`
8. **`map_visualization_text:`** Displayed above the map interface to prompt users to explore their location visually.
   * **Data type:** String
   * **Example:** `Check the location on map`
9. **`map_visualization_submit_button_text:`** Text on the button to confirm the selected location on the map.
   * **Data type:** String
   * **Example:** `Confirm`
10. **`enable_address_retrieval:`**&#x4F;ption to retrieve the address corresponding to the selected location, enriching the data collected.
    * **Data type:** Boolean
    * **Example:** `true`

***

## Carousel search

The `Carousel Search` widget presents a carousel of items with images, allowing users to browse through the options and select individual items. This widget enhances user engagement by providing a visually appealing interface for exploring various choices.

Clicking on an item within the carousel sends its name as an utterance to the chatbot, indicating the user's selection.

When enabled, users can filter carousel items by name, facilitating quicker access to specific items. Users can search for items by typing in keywords or starting letters, allowing for efficient navigation through the carousel.

<figure><img src="/files/88a1GT7JDxksMQP4QVmo" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: CarouselSearch
  DATA:
    widget:
      items:
        pikachu: 'https://upload.wikimedia.org/wikipedia/en/a/a6/Pok%C3%A9mon_Pikachu_art.png'
        bulbasaur: 'https://upload.wikimedia.org/wikipedia/en/2/28/Pok%C3%A9mon_Bulbasaur_art.png'
        charizard: 'https://upload.wikimedia.org/wikipedia/en/1/1f/Pok%C3%A9mon_Charizard_art.png'
        squirtle: 'https://upload.wikimedia.org/wikipedia/en/5/59/Pok%C3%A9mon_Squirtle_art.png'
        jigglypuff: 'https://upload.wikimedia.org/wikipedia/en/thumb/2/22/Pok%C3%A9mon_Jigglypuff_art.png/225px-Pok%C3%A9mon_Jigglypuff_art.png'
        psyduck: 'https://upload.wikimedia.org/wikipedia/en/2/2d/Pok%C3%A9mon_Psyduck_art.png'
      search: true
```

{% endcode %}

**Configuration Parameters:**

1. **`items`:** Defines the list of items to be displayed in the carousel, each consisting of a name and an image URL.
   * **Data Type:** Object
   * **Example:**

     <pre class="language-javascript"><code class="lang-javascript"><strong>[...]
     </strong><strong>items:
     </strong>  pikachu: 'https://upload.wikimedia.org/wikipedia/en/a/a6/Pok%C3%A9mon_Pikachu_art.png'
       bulbasaur: 'https://upload.wikimedia.org/wikipedia/en/2/28/Pok%C3%A9mon_Bulbasaur_art.png'

     [...]
     </code></pre>
2. **`search`:** Enables or disables the search functionality, allowing users to filter carousel items by name.
   * **Data Type:** Boolean
   * **Example:** `true` (Search functionality enabled)

***

## Calendar

The `Calendar` widget provides users with the capability to select a date and time conveniently within the chatbot interface.

### Single date selection

<figure><img src="/files/0vKleQOYJJaPY7Yi47D6" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/HpXfDWOrpspIr4a2IdD7" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: Calendar
  DATA:
    widget:
      heading: "Choose day and time"
      submitButtonMessage: Submit 
      chooseTime: true 
      date: 
        name: callback_date
        type: singleDate
      time: 
        name: callback_time
        minTime: "8:00"
        maxTime: "20:00"
```

{% endcode %}

**Configuration Parameters:**

1. **`heading:`**&#x53;pecifies the heading or title displayed above the calendar interface, guiding users to choose a day and time.
   * **Data Type:** String
   * **Example:** "Choose day and time"
2. **`submitButtonMessage`:** Defines the text displayed on the submit button, allowing users to confirm their date and time selection.
   * **Data Type:** String
   * **Example:** "Submit"
3. **`chooseTime:`**&#x44;etermines whether users can select a specific time in addition to the date.
   * **Data Type:** Boolean
   * **Example:** `true` (Time selection enabled)
4. **`date`:** Configures the date selection settings, including the variable name to store the chosen date and the type of date selection.
   * Sub-Parameters:
     * **`name`**: The variable name where the selected date will be stored.
     * **`type`**: Specifies the type of date selection, such as singleDate (single-day selection) or rangeDate (date range selection).
5. **`time`:** Configures the time selection settings, including the variable name to store the chosen time, minimum and maximum time limits.
   * Sub-Parameters:
     * **`name`**: The variable name where the selected time will be stored.
     * **`minTime`**: Specifies the earliest selectable time.
     * **`maxTime`**: Specifies the latest selectable time.

### Date range selection

The `Calendar` widget, configured for date range selection, allows users to specify a range of dates conveniently within the chatbot interface.

{% code title="Example code to copy" %}

```javascript
'1':
  WIDGET: Calendar
  DATA:
    widget:
      heading: "Choose range"
      submitButtonMessage: Submit 
      chooseTime: false
      date: 
        name: callback_date
        type: range
        minDate: 2024-01-01
        maxDate: 2025-12-31
        startDateText: "Start of the range"
        endDateText: "End of the range"
        
```

{% endcode %}

**Configuration Parameters:**

1. **`heading:`**&#x53;pecifies the heading or title displayed above the calendar interface, guiding users to choose a date range.
   * **Data Type:** String
   * **Example:** "Choose range"
2. **`submitButtonMessage:`**&#x44;efines the text displayed on the submit button, allowing users to confirm their date range selection.
   * **Data Type:** String
   * **Example:** "Submit"
3. **`chooseTime:`**&#x44;etermines whether users can select a specific time in addition to the date. In this configuration, time selection is disabled.
   * **Data Type:** Boolean
   * **Example:** `false` (Time selection disabled)
4. **`date:`** Configures the date range selection settings, including the variable name to store the chosen date range, the type of date selection, minimum and maximum date limits, and custom text for the start and end dates.
   * Sub-Parameters:

     * **`name`**: The variable name where the selected date range will be stored.
     * **`type`**: Specifies the type of date selection, in this case, "`range`" for date range selection.
     * **`minDate`**: Specifies the earliest selectable date. YYYY-MM-DD format required.
     * **`maxDate`**: Specifies the latest selectable date. YYYY-MM-DD format required.
     * **`startDateText`**: Custom text displayed for the start date selection.
     * **`endDateText`**: Custom text displayed for the end date selection.

### Multiple date selection

The `Calendar` widget, configured for multiple date selection, presents users with a predefined list of dates as checkboxes, allowing them to choose multiple dates simultaneously within the chatbot interface.

{% code title="Example to copy" %}

```javascript
'1':
  WIDGET: Calendar
  DATA:
    widget:
      heading: "Pick a date"
      submitButtonMessage: Submit 
      chooseTime: false
      date: 
        name: callback_date
        type: multipleDate
        multipleDateValues:
         - 2024-04-01
         - 2024-05-01
         - 2024-06-01
         - 2024-07-01
         - 2024-08-01
     
```

{% endcode %}

**Configuration Parameters:**

1. **`heading:`**&#x53;pecifies the heading or title displayed above the calendar interface, guiding users to pick a date.
   * **Data Type:** String
   * **Example:** "Pick a date"
2. **`submitButtonMessage:`** Defines the text displayed on the submit button, allowing users to confirm their date selection.
   * **Data Type:** String
   * **Example:** "Submit"
3. **`chooseTime:`** Determines whether users can select a specific time in addition to the date. In this configuration, time selection is disabled.
   * **Data Type:** Boolean
   * **Example:** `false` (Time selection disabled)
4. **`date:`**&#x43;onfigures the multiple date selection settings, including the variable name to store the chosen dates, the type of date selection, and a predefined list of selectable dates.
   * Sub-Parameters:
     * **`name`**: The variable name where the selected dates will be stored.
     * **`type`**: Specifies the type of date selection, in this case, "multipleDate" for selecting multiple dates.
     * **`multipleDateValues`**: Predefined list of dates that users can choose from.

***

## Generic form

The `Generic Form` widget offers flexible customization options to create a dynamic form within the chatbot interface, which includes various field types such as text input, dropdown selection, and checkboxes, allowing users to input diverse types of information efficiently.

**Parameter configuration:**

1. **`description`:** This parameter allows you to define a textual description that will be displayed above the form. It can be used to explain the purpose of the form or provide instructions to the user.
   * **Data Type:** String
   * **Example:** "This is a description text, which can be also longer to explain what is happening"
2. **`submit`:** This parameter determines the text displayed on the submit button of the form. Users, by clicking on this button, confirm their inputs and submit the form.
   * **Data Type:** String
   * **Example:** "Submit"

{% code overflow="wrap" %}

```javascript
1:
  WIDGET: Generic_Form
  DATA:
    widget:
      description: This is a description text, which can be also longer to explain what is happening
      submit: Submit
      field: [...]
```

{% endcode %}

Let's explain the `field` parameter, which contains individual fields of the widget. Each field represents an input or selection element in the form, and the name of each field also serves as a variable where the value entered by the user will be stored after the form submission, eg. `order_id_field`, `name_field`, `surname_field`.

#### Field Configuration:

{% code overflow="wrap" %}

```javascript
 1:
     [...]
      field: 
        order_id_field: 
          visible: 'true'
          label: "Field label, eg. Order ID"
          placeholder: "Type order ID here"
          validForSelections:
                - 1
          type: text
          validation:
            pattern:
              value: ^71[2-9][3-9][0-9]{6}$
              error_message: "Wrong format. Order ID starts with 71 and has 10 digits."
            minlength:
              value: '10'
              error_message: Order ID is too short. Must have exactly $value digits.
            maxlength:
              value: '10'
              error_message: Order ID is too logn. Must have exactly $value digits...
        name_field: [...]
        surname_field: [...]
        phone_number_field: [...]
        email_field: [...]
        message_field: [...]
```

{% endcode %}

1. **`order`:** Specifies the order in which the field appears within the form. Lower values appear first.
   * **Data Type:** Integer
   * **Example:** `"order": '1'`
2. **`visible`:** Determines whether the field is visible to the user.
   * **Data Type:** Boolean (true/false)
   * **Example:** `"visible": true`
3. **`label`:** Defines the label or prompt displayed alongside the input field, providing instructions or information about the expected input.
   * **Data Type:** String
   * **Example:** `"label": "Order ID"`
4. **`placeholder`:** Specifies a placeholder text that appears inside the input field when it is empty, giving users a hint about the expected input.
   * **Data Type:** String
   * **Example:** `"placeholder": "Start typing..."`
5. **`type`:** Determines the type of input or selection element for the field.
   * **Data Type:** String
   * **Possible Values:** `"text"`, `"textarea"`, `"tel"`, `"dropdown"`, etc.
   * **Example:** `"type": "text"`
6. **`validation`:** Defines validation rules for the field to ensure that the user input meets specific criteria.
   * **Data Type:** Object
   * **Subparameters:** Can include rules such as `required`, `pattern`, `minlength`, `maxlength`, etc.
7. **`values` (for dropdown type):** Specifies the list of options available for selection in a dropdown field.
   * **Data Type:** Array of strings
   * **Example:**

     ```json
     "values": [
       "the fist option",
       "the second option",
       "the third option",
       "None of above"
     ]
     ```

{% hint style="info" %}
:bulb: For detailed configuration and (sub)parameters of different field types, check-out:

[#selection-buttons](#selection-buttons "mention")\
\
[#text-field](#text-field "mention")&#x20;

[#textarea-field](#textarea-field "mention")&#x20;

[#phone-number-field](#phone-number-field "mention")&#x20;

[#dropdown-selection-field](#dropdown-selection-field "mention")
{% endhint %}

### Selection buttons filter

The `selection` parameter in the Generic Form widget allows users to present initial choices or options to the form respondents. These selections act as a gateway to determine which subsequent fields will be displayed based on the user's choice.

When configuring the `selection` parameter, users define a set of options along with their corresponding labels. Upon rendering the form, these options are presented to the users as buttons.

Based on the option selected by the user, only the fields associated with that particular selection will be displayed, while the rest remain hidden. This mechanism enables the creation of more interactive and context-sensitive forms tailored to the user's choices and preferences.

<figure><img src="/files/RDthEwe84TaGLWTdgTTZ" alt=""><figcaption><p>Upon choosing ice cream, the field for favourite flavour is shown. Steak-specific field is hidden. The field for a favourite drink, common for both options, is shown in the form.</p></figcaption></figure>

<figure><img src="/files/50ysiO8J4uEWceHzxAoK" alt=""><figcaption><p>Upon choosing steak, the field for your favourite ice cream flavour is hidden. Steak-specific field is shown as the first field in the form. The field for a favourite drink, common for both options, is shown in the form.</p></figcaption></figure>

In the provided example, the `selection` parameter offers two options: "Ice cream" and "Steak." Depending on the user's selection, either the field for specifying the favorite ice cream flavor or the field for describing steak preferences will be shown, while the other field remains hidden.&#x20;

To specify which fields are shown for each selection, the `validForSelections` parameter is used within each field.

{% code title="Example code to copy" %}

```javascript
1:
  WIDGET: Generic_Form
  DATA:
    widget:
      description: "Please fill in your personal info, than click on Submit."
      submit: Submit
      selection:
        visible: true
        label: Please select. You rather enjoy...
        values:
          - Ice cream
          - Steak
      field:
        icecream_flavour:
          order: '1'
          visible: 'true'
          label: What's your favourite ice cream flavour?
          validForSelections:
            - 1
          placeholder: Type here
          type: text
          validation:
            required:
              error_message: "Please fill this field."
            pattern:
              value: ^.+$
              error_message: "Please fill this field."
        steak:
          order: '2'
          visible: 'true'
          label: How do you prefer your steak?
          validForSelections:
            - 2
          placeholder: Type here
          type: text
          validation:
            required:
              error_message: Field must be filled
            pattern:
              value: ^.+$
              error_message: Field must be filled.
        drink:
          order: '3'
          visible: 'true'
          label: What's your drink of choice?
          validForSelections:
            - 1 
            - 2
          placeholder: Type here
          type: text
          validation:
            required:
              error_message: Field must be filled
            pattern:
              value: ^.+$
              error_message: Field must be filled.
```

{% endcode %}

**Parameters configuration:**

* **`description`:** Provides a brief description or instruction to users about the purpose of the form.
  * **Data Type:** String
  * **Example Value:** `"Please fill in your personal info, then click on Submit."`
* **`submit`:** Specifies the text displayed on the submit button.
  * **Data Type:** String
  * **Example Value:** `"Submit"`
* **`selection`:** Defines the selection options presented to users at the beginning of the form.
  * **Data Type:** Object
  * Subparameter&#x73;**:**
    * **`visible`:** Determines whether the selection options are visible to users.
      * **Data Type:** Boolean
      * **Example Value:** `true`
    * **`label:`** Provides a label or prompt for the selection options.
      * **Data Type:** String
      * **Example Value:** `"Please select. You rather enjoy..."`
    * **`values`:** Specifies the options users can choose from.
      * **Data Type:** Array of Strings
      * **Example Value:** `["Ice cream", "Steak"]`
  * **`field` :** Contains individual fields of the widget. Each field represents an input or selection element in the form
    * **Data type:** Object
    * Subparametres:
      * **`order`:** Specifies the order in which the field appears in the form.
        * **Data Type:** String or Number
        * **Example Value:** `"1"`
      * **`visible:`**&#x44;etermines whether the field is visible to users.
        * **Data Type:** Boolean
        * **Example Value:** `"true"`
      * **`label:`** Provides a label or prompt for the field.
        * **Data Type:** String
        * **Example Value:** `"What's your favourite ice cream flavour?"`

{% hint style="info" %}
The `selection` parameter offers initial choices to users, determining which fields appear next. When a user makes a selection, only the fields relevant to that choice are displayed, optimizing the form-filling experience.

Field ordering, denoted by the `order` parameter within each field, influences the sequence in which fields are displayed. Lower numerical values indicate earlier display positions. Ensure that fields crucial for initial selections have lower order values to appear first and guide users efficiently through the form.
{% endhint %}

### Text field

The field type `text` allows users to create customizable forms with various input fields to collect specific information.

<figure><img src="/files/SXQayhin6UcYoB9VY9WC" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
1:
  WIDGET: Generic_Form
  DATA:
    widget:
      description: "Please fill in your personal info, than click on Submit."
      submit: Submit
      field:
        person_name:
              order: '1'
              visible: 'true'
              label: Your name.
              validForSelections:
                - 1
                - 2
              placeholder: Type here
              type: text
              validation:
                required:
                  error_message: Name must be filled.
                pattern:
                  value: ^[a-zA-Zá-žÁ-Ž][a-zA-Zá-žÁ-Ž\s-]*$
                  error_message: Cannot use digits or special characters.
        person_surname:
          order: '2'
          visible: 'true'
          label: Your surname.
          validForSelections:
            - 1
            - 2
          placeholder: Type here
          type: text
          validation:
            required:
              error_message: Surname must be filled
            pattern:
              value: ^[a-zA-Zá-žÁ-Ž][a-zA-Zá-žÁ-Ž\s-]*$
              error_message: Cannot use digits or special characters.
```

{% endcode %}

**Parameters Configuration:**

* **`description`:** Provides a brief description or instruction to users about the purpose of the form.
  * **Data Type:** String
  * **Example Value:** `"Please fill in your personal info, then click on Submit."`
* **`submit:`** Specifies the text displayed on the submit button.
  * **Data Type:** String
  * **Example Value:** `"Submit"`
* **`field:`**&#x43;ontains individual fields of the widget. Each field represents an input or selection element in the form.
  * Subparametres:
    * **`order`:** Specifies the order in which the field appears in the form.
      * **Data Type:** String or Number
      * **Example Value:** `"1"`
    * **`visible`:** Determines whether the field is visible to users.
      * **Data Type:** Boolean
      * **Example Value:** `"true"`
    * **`label`:** Provides a label or prompt for the field.
      * **Data Type:** String
      * **Example Value:** `"Your name."`
    * **`validForSelections`:** Specifies the selections for which the field is valid.
      * **Data Type:** Array of Numbers
      * **Example Value:** `[1, 2]`
    * **`placeholder:`** Displays a placeholder text within the input field.
      * **Data Type:** String
      * **Example Value:** `"Type here"`
    * **`type:`**&#x44;efines the type of input field (e.g., text, tel, dropdown).
      * **Data Type:** String
      * **Example Value:** `"text"`
    * **`validation:`**&#x44;efines validation rules for the input field.
      * **Data Type:** Object
      * Subparametres:
        * **`required:`**&#x53;pecifies whether the field is required.
          * **Data Type:** Object
          * **Example Value:**

            ```json
            "required": 
              "error_message": "Name must be filled."
            ```
        * **`pattern`:** Defines a regular expression pattern for validating the input value.
          * **Data Type:** Object
          * **Example Value:**

            ```json
            "pattern": 
              "value": "^[a-zA-Zá-žÁ-Ž][a-zA-Zá-žÁ-Ž\s-]*$",
              "error_message": "Cannot use digits or special characters."
            ```

### Textarea field

Unlike a single-line text field, a `textarea`  field type provides a larger space for users to input longer free-form text, suitable for messages, event descriptions, notes, and more.

<figure><img src="/files/rpY92PzZ6Jnumdlcil9R" alt=""><figcaption></figcaption></figure>

{% code title="Example code to copy" %}

```javascript
"1":
  WIDGET: Generic_Form
  DATA:
    widget:
      description: Leave your message here.
      submit: Send
      field:
        message_field:
          order: "1"
          visible: "true"
          label: Message
          placeholder: Type here
          type: textarea
          rows: 5
          validation:
            required:
              error_message: Please fill in your message. Max. lenght is 3000 characters.
            minlength:
              value: "10"
              error_message: Min. $value characters!
            maxlength:
              value: "3000"
              error_message: Max. $value characters!

```

{% endcode %}

**Parameters configuration:**

* **`description`**: A brief instruction or description guiding users on what to input in the form.
  * Data Type: String
  * Example: `"Leave your message here."`
* **`submit`**: The text displayed on the form's submit button.
  * Data Type: String
  * Example: `"Send"`
* **`field`**&#x20;
  * Contains individual fields of the widget. Each field represents an input or selection element in the form. Field are defined by subparametres.
  * **`order`**: Specifies the order in which the field appears within the form.
    * Data Type: Integer
    * Example: `"1"`
  * **`visible`**: Determines whether the field is visible to users.
    * Data Type: Boolean (true/false)
    * Example: `"true"`
  * **`label`**: The label displayed above the text area field, indicating its purpose.
    * Data Type: String
    * Example: `"Message"`
  * **`placeholder`**`:` A temporary text displayed within the text area field, providing a hint or example of the expected input.
    * Data Type: String
    * Example: `"Type here"`
  * **`type`**: Specifies the type of field, in this case, a text area.
    * Data Type: String
    * Example: "`textarea`"
  * **`rows`**`:` Determines the number of visible lines (rows) in the text area field.
    * Data Type: Integer
    * Example: `5`
  * **`validation`:**
    * **`error_message`**: The message displayed to users when validation conditions are not met.
    * Data Type: String
    * Example: "`Please fill in your message. Max. length is 3000 characters."`

### Phone number field

The field type `tel` in the Generic Form widget allows users to input their phone numbers.

<figure><img src="/files/cC4ac4dGY7Fygmsuyt3w" alt=""><figcaption></figcaption></figure>

{% code title="Example to copy" %}

```javascript
1:
  WIDGET: Generic_Form
  DATA:
    widget:
      description: Fill in your phone number, than click on Submit.
      submit: Submit
      field:
        person_phone:
              order: '1'
              visible: 'true'
              label: Phone number
              validForSelections:
                - 1
                - 2
              placeholder: Type here
              type: tel
              data:
                prefix: '+420'
                editable: 'True'
                validation:
                  required:
                    error_message: Make sure prefix is filled too.
                  pattern:
                    value: ^\+[0-9]*$
                    error_message: Wrong format of prefix.
                  minlength:
                    value: '3'
                    error_message: "Too short. Prefix must be +01, or +012"
                  maxlength:
                    value: '4'
                    error_message: Too long. Prefix must be max. 4 characters.
              validation:
                required:
                  error_message: Phone number has to be filled.
                pattern:
                  value: ^[0-9]*$
                  error_message: Wrong format.
                minlength:
                  value: '8'
                  error_message: Too short. Phone number must be at least $value digits.
                maxlength:
                  value: '12'
                  error_message: Too long. Phone number must be max. $value digits.
```

{% endcode %}

**Parameters Configuration:**

* **`description`:** Provides a brief description or instruction to users about the purpose of the form.
  * **Data Type:** String
  * **Example Value:** `"Fill in your phone number, then click on Submit."`
* **`submit`:** Specifies the text displayed on the submit button.
  * **Data Type:** String
  * **Example Value:** `"Submit"`
* **`field:`** An object containing all the widget fields. The sub-object /field name, eg. `phone_number` , is also a variable where the entered value from the form will be stored.
  * **`order:`**&#x53;pecifies the order in which the field appears in the form.
    * **Data Type:** String or Number
    * **Example Value:** `"1"`
  * **`visible:`**  Determines whether the field is visible to users.
    * **Data Type:** Boolean
    * **Example Value:** `"true"`.
  * **`label`:** Provides a label or prompt for the field.
    * **Data Type:** String
    * **Example Value:** `"Your phone number:"`
  * **`validForSelections:`**&#x53;pecifies the selections for which the field is valid.
    * **Data Type:** Array of Numbers
    * **Example Value:** `[1, 2]`
  * **`placeholder`:** Displays a placeholder text within the input field.
    * **Data Type:** String
    * **Example Value:** `"Type here"`
  * **`type:`** Defines the type of input field (e.g., text, tel, dropdown).
    * **Data Type:** String
    * **Example Value:** `"tel"`
  * **`data`:** Additional data configuration for specific field types.
    * **Data Type:** Object
      * **`prefix` (optional):** Specifies a prefix for the input field, such as a country code.
        * **Data Type:** String
        * **Example Value:** `"+420"`
      * **`editable` (optional):** Determines whether the input field is editable.
        * **Data Type:** Boolean
        * **Example Value:** `true`
      * **`validation`:** Defines validation rules for the input field.
        * **Data Type:** Object
        * **`required`:** Specifies whether the field is required.
          * **Data Type:** Object
          * **Example Value**:
            * ```javascript
              "required":
                "error_message": "Phone number has to be filled."
              ```
        * **`pattern`:** Defines a regular expression pattern for validating the input value.
          * **Data Type:** Object
          * **Example Value:**

            ```javascript
            "pattern": 
              "value": "^[0-9]*$",
              "error_message": "Wrong format."
            ```
        * **`minlength`:** Specifies the minimum length of the input value.
          * **Data Type:** Object
          * **Example Value:**

            <pre class="language-javascript" data-overflow="wrap"><code class="lang-javascript">"minlength":
              "value": "8",
              "error_message": "Too short. Phone number must be at least 8 digits."
            </code></pre>
        * **`maxlength`:** Specifies the maximum length of the input value.
          * **Data Type:** Object
          * **Example Value:**

            <pre class="language-javascript" data-overflow="wrap"><code class="lang-javascript">"maxlength": 
              "value": "12",
              "error_message": "Too long. Phone number must be max. 12 digits."

            </code></pre>

### Dropdown selection field

This example demonstrates the configuration of the Generic Form widget to create a simple dropdown menu.

<figure><img src="/files/e4VpPDyixnkh69mGjK6r" alt=""><figcaption></figcaption></figure>

{% code title="Example to copy" %}

```javascript
1:
  WIDGET: Generic_Form
  DATA:
    widget:
      description: Enter your adventurous journey with a starter buddy!
      submit: Submit
      field:
        dropdown_value_variable:
          order: '1' 
          visible: 'true'
          label: Choose your starter pokémon champion!
          placeholder: Click here
          type: dropdown
          validation:
            required:
              error_message: You must select a champion
          values:
            - bulbasaur
            - charmander
            - squirtle
            - pikachu
```

{% endcode %}

**Configuration Parameters:**

1. **`description`:** This parameter defines the descriptive text displayed above the form, guiding users on the widget's purpose or instructions.
   * **Data Type:** String
   * **Example Value:** `"Enter your adventurous journey with a starter buddy!"`
2. **`submit`:** This parameter specifies the text displayed on the submission button within the form, allowing users to submit their selections.
   * **Data Type:** String
   * **Example Value:** `"Submit"`
3. **`field`:**
   * **`dropdown_value_variable`:** This is the name of the variable where selected value will be stored. Also, other subparameters under this object must be defined.
     * **`order`:** This parameter determines the order in which the form field appears within the widget, influencing its position relative to other fields if multiple are present.
       * Data Typ&#x65;**:** Integer
       * Example Valu&#x65;**:** `1`
     * **`visible`:** This parameter controls the visibility of the form field, indicating whether it is displayed to users.
       * Data Typ&#x65;**:** Boolean
       * Example Valu&#x65;**:** `true`
     * **`label:`** This parameter specifies the label or prompt associated with the form field, providing context or instructions for users.
       * Data Typ&#x65;**:** String
       * Example Valu&#x65;**:** "`Choose your starter Pokémon champion!"`
     * **`placeholder`:** This parameter defines the placeholder text displayed within the form field when it is empty, guiding users on what to input.
       * Data Typ&#x65;**:** String
       * Example Valu&#x65;**:** `"Click here"`
     * **`type`:** This parameter sets the type of form field to create, such as dropdown, text input, or textarea.
       * Data Typ&#x65;**:** String
       * Example Valu&#x65;**:** `Dropdown`
     * **`validation:`**
       * **`required:`** This parameter specifies whether the form field must be filled out before submission, enforcing user input.
         * Data Typ&#x65;**:** Boolean
         * Example Valu&#x65;**:** true
     * **`values:`**&#x54;his parameter provides a list of options for the dropdown menu, allowing users to select from predefined choices.
       * Data Typ&#x65;**:** List of Strings
       * Example Valu&#x65;**:** \[bulbasaur, charmander, squirtle, pikachu]

{% file src="/files/I7tlJDRXoRDYW0TKHwfM" %}

{% hint style="info" %}
:tada:**Pro-tip!**\
Within one **Generic Form** widget, you have the flexibility to **combine various types of fields** according to the needs of your form. <br>

Each field can be individually tailored, whether it's a single-line text field, a textarea for longer descriptions, an input field for phone numbers, or even a dropdown menu for selecting from predefined options. Thanks to this flexibility, you can create forms that precisely match your requirements and user needs. Your imagination is the only limit!
{% endhint %}


# Introduction

This section will enable you to understand the basics of creating and managing your first insight project.

### [Workspace](/insights/workspace)

Learn more about individual elements of the Insights product UI.&#x20;

### [Basic workflow](/insights/building-new-projects/analysis-project)

Basic analysis of the data files:

1. Create a project based on the content of the analysis (text or audio)
2. Create parameters based on the data that you want to analyze
3. Create prompts using the defined parameters
4. Upload content data or integrate a data source &#x20;
5. Create a dashboard to visualise and to be able to access the outputs of prompts

### ⚙️ [Advanced workflow](/insights/building-new-projects/advanced-analysis-project-using-flow)

Analysis of the data files and passing data from Insight to the Digital Agent for further processing and back:

1. Create a project based on the content of the analysis (text or audio)
2. Create parameters based on the data that are required to obtain
3. Create prompts using the defined parameters
4. Create a prompt using the **flow connector parameter**
5. Upload content data or integrate a data source
6. Create a dashboard to visualise and to be able to access the outputs of prompts

### Legend

Icon ⚙️ indicates advanced features.&#x20;

"Flow project" means Digital Agent project.

### Quick links for you

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/peBnFFbI5xmBLyhA78JB">/pages/peBnFFbI5xmBLyhA78JB</a></td><td>Understand the Digital Studio Workspace to manage and oversee your  insight projects.</td><td></td><td><a href="/pages/peBnFFbI5xmBLyhA78JB">/pages/peBnFFbI5xmBLyhA78JB</a></td></tr><tr><td><a href="/pages/8xS3Frv2Vd53zb2XPYZi">/pages/8xS3Frv2Vd53zb2XPYZi</a></td><td>Learn how to create a new Insights project from scratch. </td><td></td><td></td></tr></tbody></table>


# Workspace

Master the fundamentals of the Digital Studio Insight Workspace

## Select your page or tap the navigation bar.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/lWoXtkJu5xoSCs1i9TI6">Design</a></td><td>This module is for Insights configuration - specifying parameters and categories that are then grouped in the prompts and used for analysis. </td></tr><tr><td><a href="/pages/pA8ts9dngDs04K5uro23">Upload</a></td><td>This module is for uploading data that is to be analysed.</td></tr><tr><td><a href="/pages/wJVJlCKsQmEM8PN7o1x2">Process</a></td><td>This module is for following the progress of the data processing and rerunning the analysis if any changes are made to the settings or new files are uploaded. </td></tr><tr><td><a href="/pages/33GvCyrX6cO9RzfR39Kc">Analyse</a></td><td>This module displays the dashboards with analysed data and gives possibility to create/adjust the dashboards or data showed in player link.</td></tr></tbody></table>


# Design

This module is for specifying parameters and categories that are then grouped in the prompts and used for analysis.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/FGFqwOX7Zgz4DQ2eUh9C">Parameters</a></td><td>This module is for creating and managing parameters that are later used by prompts.</td></tr><tr><td><a href="/pages/pErr90fBujYeVz6QBPF7">Categories</a></td><td>This module is for creating and managing categories that are then used for the categorisation of the processed text or audio from data sources. </td></tr><tr><td><a href="/pages/wIf2aHuqMV2t89dvMv7T">Prompts</a></td><td>This module is for creating and managing Prompts. They pair parameters into wholes that are then used for processing audio (transcriptions) and text inputs.</td></tr><tr><td><a href="/pages/d9UBGbfx5WksCOYanbyK">User feedback</a></td><td>This module is for noting individual audio records in the player. You can find the defined question and answers there in the Evaluate button.</td></tr></tbody></table>


# Parameters

This module is used for creating and managing parameters that are later used by prompts.

### Types and configuration fields

#### Custom

Their purpose is to obtain data of interest as their variables from the files of the selected [Data sources](/insights/workspace/upload/data-sources-audio#data-sources). They are later combined and used by [Prompts](#prompts).&#x20;

<figure><img src="/files/bSI2N96WxItKFnXixK6Z" alt="" width="375"><figcaption></figcaption></figure>

On-screen elements:

* **Type**: drop-down field with values "[Custom](#custom)" and "[Flow connector](#flow-connector)" for the change of the parameters type
* Bin icon: button for the deletion of the parameter
* **Details:**
  * **Name**: input field of the parameter&#x20;
  * **Language**: drop-down field, for selecting parameter processing language. If "Universal" is selected, the model decides for itself, using the language in the instructions.
  * **Global**: switch, if enabled, the parameter can be used in the other projects within the organisation
  * **Definition**: input field for a parameter instruction that is later passed as a prompt to obtain a value
  * **Output format**: buttons for choosing the right output format of "String" (text), "Number", or "Boolean" (true or false) type &#x20;
* **Settings:**
  * **Fallback value**: input field for providing a filled-in output value in case there is an error in the evaluation of the "Definition", and none of the values from the "List of values" are chosen
  * **Enforce**: switch for enforcing fallback value. It can be turned on only if there is a value in the "List of values" field.&#x20;
  * **List of values**: input field for defining values that should be used as an output of the "Definition" evaluation. Values are input individually (use enter for input).
  * **Custom categories**: drop-down field for selecting the user-defined categories of a [custom type and AI category suggestions](#categories). After the selection, the result of the parameter will then fall into the category.
  * **Constraint**: input field for describing the format validation of the output
  * ⚙️ **Multi prompt behaviour**: drop-down field with processing strategies for aggregating results from multiple prompts, since some of the prompts used to be parsed and sent to bypass context window limits.&#x20;
  * ⚙️ **Weighted table**: drop-down field. It is enabled once "WEIGHTED\_VALUE" is chosen as a value in the "Multi prompt behavior" field. It displays options for how to process multi-prompt aggregation using a weighted table strategy.&#x20;

<details>

<summary>Context windows examples</summary>

```
GPT 5 (all models): 400k context window, 100k output tokens
GPT 4o mini:          128k context window, 16k output tokens
GPT 4o:               128k context window, 16k output tokens

In English, each token has an average of 4 characters.

max_chunk_size: int = 110_000, ← any output equal to or bigger than this number (in tokens) will be chunked 
```

</details>

{% hint style="info" %}
Multi prompt setups are used to decompose a single complex task into smaller prompt segments because language models have limited context windows. Dividing input text or audio transcriptions into several prompts allows handling large documents or recordings without truncation. Each prompt processes part of the content, and the system later aggregates the partial outputs into a unified response.

This is relevant only for very long audio/text inputs (ie >1h recording).
{% endhint %}

* **Normalization:** of the parameter\`s output
  * **Letter case conversation**: radio buttons for changing the output to be Lowercased, Uppercased, or Capitalized, or none of these, based on the selected value&#x20;
  * **Remove diacritics**: radio buttons for removing diacritics from the output value if "Yes"&#x20;
  * **Apply underscore**: radio buttons for applying underscore from the output value if "Yes"
* **Save:** floating button for saving the settings to the parameter

#### Flow connector

These parameters are used for the connection with the [flows](/digital-agent/conversation-flow) defined in the [Digital Agent](/digital-agent/introduction) project type. Once connected, you can pass insight data to flow for further processing and then retrieve it.&#x20;

<figure><img src="/files/MR7l3EEEskqv9n200WgC" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Type**: drop-down field with values "[Custom](#custom)" and "[Flow connector](#flow-connector)" for the change of the parameters type
* Bin icon: button for the deletion of the parameter
* **Details**:
  * **Select project to connect**: drop-down field for a selection of the "Digital agent" flow project
  * **Select trained version**: drop-down field for a selection of a version of the selected project
  * **Name**: input field of the flow connector
  * **Global**: switch, if enabled, the parameter can be used in the other projects within the organisation&#x20;
  * **Definition (auto-generated)**: field displaying the hash ID of the selected Digital agent project and version (each version has unique hash ID)
  * **Output variables**: input field for defining what the output variables of this parameter will be. Once defined, only these variables will be pulled out of the connected flow. Input the variables individualy exactly as defined in Flow, escape with enter.

{% hint style="success" %}
Pro Tip:\
Send relevant data from Digital Agent back to Insights -> you can them use them in your Dashboards easily.
{% endhint %}

* **Send results from previous prompts to the flow**: switch
  * If **disabled** (default state), only transcription (of audio files) or parsed emails will be passed to the flow
    * Transcriptions or emails are then sent one by one into the flow\`s "current\_utterance" variable
  * If **enabled**, along with the data, it also publishes all previous prompts and their values/results listed **above the prompt containing this flow connector parameter.**&#x20;
    * The previous prompt's value/result can then be accessed in the flow using the name convention \<previous\_prompt>\_\<parameter>
* **Should process email attachments**: switch to enable processing email attachments in the flow&#x20;
* **Save:** floating button for saving the settings to the parameter

{% hint style="warning" %}
Consider creating and selecting a proxy project in the "**Select project to connect**" field, so you do not need to re-select the target flow project after each (re)training. Please see more [here](/insights/building-new-projects/advanced-analysis-project-using-flow/1.-create-digital-agent-flow-projects).
{% endhint %}

### Management

<figure><img src="/files/niqB8jEt9DWlBjU1cwr1" alt=""><figcaption></figcaption></figure>

On-screen elements:

* Upper part:
  * **Search parameters**: bar for searching parameters based on their name
  * Filters (below search bar):
    * **All**: button for displaying all parameters
      * **Global**: button for displaying only the global parameters of both flow or custom types
      * **Custom**: button for displaying only custom parameters (not global)
      * **Flow**: button for displaying only flow parameters&#x20;
  * **Select**: button for selecting multiple parameters in their list at once, and then for following self-describing actions like "Duplicate" and "Delete"
* List of parameters:\
  *(Elements are listed from the left)*
  * **Parameter name**
  * **Pencil**: icon button for editing the parameter
  * **Language**: displaying selected language for the parameter processing&#x20;
  * **Parameter type**: displaying either "Custom" or "Flow connector" value
  * **Prompt preview**: displaying a value of the parameters "Definition" field
* Floating buttons:
  * **Export**: for exporting all parameters in a JSON-formatted file
  * **Import**: for importing parameters in a JSON-formatted file


# Categories

This module is for creating and managing categories that are then used for the categorisation of the processed text or audio from data sources.

### Types, configuration, and management of the fields

#### Custom

It is a basic type that needs to be defined manually. These custom categories are then selectable in [parameters](#parameters) settings and serve for categorisation of audio or text files.&#x20;

<figure><img src="/files/aFCizWCT4SMSKDC4sp2Q" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Type switch**: in the upper part of the screen, with options "Custom" and "AI category suggestions" for switching the creation category type
* **"+"**: button for creating a new category, fields below are displayed after clicking:
  * **Name**: input field of a new category is displayed only after using the "+" button
    * Bin icon: for deleting the category
  * **+ Add subcategory**: button for creating a new subcategory&#x20;
  * **Sub-category 1**: name input field is displayed only after using "+ Add subcategory"&#x20;
    * Bin icon: for deleting the sub-category
* **Save:** floating button for saving the settings to the category

#### AI category suggestions

This feature uses [prompts](#prompts) as its input and, based on them, suggests categories.&#x20;

<figure><img src="/files/8BGAkLOkv6Q2l0DcaQY8" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Type switch**: in the upper part of the screen, with options "Custom" and "AI category suggestions"
* **Input**: drop-down field containing [prompts](#prompts) displayed in combination with their individual parameters.\
  ie, \<prompt1>\_\<parameter1>, \<prompt1>\_\<parameter2>, ... \<prompt1>\_\<parameterx> \
  ie, “basic\_summary”, which, after the selection, will categorize processed text or audio based on the summary&#x20;
* **Category count**: input field for defining the number of categories that should be suggested. You can specify multiple values, for example, 5, 10, 15 at once.
* **Version**: dropdown field with values representing versions of [reruns](/insights/workspace/process#rerun) on which the AI category suggestions will be applied
* **From (UTC)** + **To (UTC)**: date fields for delimiting the timeframe of text or audio records used for categorisation
* **Instructions**: input field for additional prompt specifics. E.g., output file type, processing specifics, structure requirement, etc. It is mainly used in some specific cases to fine-tune the output.&#x20;
* **Check**: button for validating how many text or audio record results will be categorized after using the "Suggest" button. The number will be displayed below the button.&#x20;

<figure><img src="/files/mX2pn8UyyHlnk4ONkvsb" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}
Use "Check" to check how many results (interactions, recordings, emails...) will be used for suggesting categories - if the number is too small (<10), the results might not represent the sample well. If the number is too big (>500), the suggestion will take some time. For the best results, we recommend using a sample of around 100.
{% endhint %}

* **Suggest**: button for running the AI category suggestions. Suggested categories are displayed on the right side. If not, use a "Refresh" button.
* **Refresh**: button for displaying the suggested categories after using the "Suggest" button
* **Save:** floating button for saving the settings to the AI category suggestor&#x20;


# Prompts

This module is for creating and managing Prompts. They pair parameters into wholes that are then used for processing audio (transcriptions) and text inputs.

### Configuration

<figure><img src="/files/9hmeTMxwYNDU5WHxAshx" alt="" width="375"><figcaption></figcaption></figure>

On-screen elements:

* **Details**:
  * **Name**: input field of the prompt
  * **Language**: drop-down field for processing the prompt
  * **Prompt state**: dropdown field for changing the state to one of these: "Enabled", "Disabled for all" (completely disabled), or "Disabled for rerun" (disabled only for any of the following reruns) states
  * **Multi-segment analysis (input longer than 110k tokens, ie >10 hours of speech or 40k words in an email)**: radio buttons for choosing which part of a long, multi-chunk record this prompt should read: use "Each" chunk (for sentiment analysis), only the "First" chunk (for greetings), or only the last chunk (for farewell).&#x20;

{% hint style="info" %}

#### Why the Multi-segment analysis setting exists

In the past, the LLM models used to have smaller "context" - ie the length of audio or text which we sent for analysis had to be broken into several chunks before processing, analysed in sequence and summarized.

However!

Nowadays models have no problem with long context. The chunking is only applied in these situations:

* recordings longer than cca 10 hours
* emails longer than 30-50k words (depends on the content, images, email structure)
* texts longer than 80k-90k words

In case you are using such long inputs, the Multi-segment analysis control gives you a say in how a prompt reacts to that split: it lets you decide whether the prompt should read every chunk, just the opening segment, or only the final one.<br>
{% endhint %}

* **Parameters**:
  * **Predefined parameter group**: input field for selecting already predefined hardcoded parameter groups. Once any of them is selected,  its predefined, hardcoded parameters are then listed in the "Parameters" field below.
  * **Parameters**: input field for selection of parameters (custom-made or predefined)

<details>

<summary>Predefined (hardcoded) parameters list and their description</summary>

<table data-header-hidden><thead><tr><th valign="top">Parameter</th><th valign="top">Definition</th><th valign="top">Constraint</th><th valign="top">Values</th><th valign="top">Output type</th><th valign="top">Fallback value</th><th valign="top">Multi Prompt Behaviour</th></tr></thead><tbody><tr><td valign="top">addressing</td><td valign="top">Value YES if the Agent used the Client’s first name or last name in the conversation. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">benefit</td><td valign="top">Did the agent mention the product benefit?</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">N/A</td><td valign="top">FIRST</td></tr><tr><td valign="top">call_script_summarization</td><td valign="top">Agent summarized Client's request to check if he understood correctly</td><td valign="top"><br></td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">call_script_telco_offering_accepted</td><td valign="top">Client accepted mobile phone service, package or tariff that Agent offered to him</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">call_script_telco_offering_value</td><td valign="top">Name of the offering, service, package or tariff that Agent offered to Client to buy, add or activate</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">category</td><td valign="top">Most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">category_product</td><td valign="top">categorize a product of selling</td><td valign="top"><br></td><td valign="top">insurance, savings, loans, investment, credit card</td><td valign="top">string</td><td valign="top">other</td><td valign="top">FIRST</td></tr><tr><td valign="top">client_behaviour_goodbye</td><td valign="top">Client's goodbye</td><td valign="top">Value YES if client said goodbye, else value NO</td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">client_behaviour_thanks</td><td valign="top">Client's client_behaviour_thanks</td><td valign="top">Value YES if client thanked for help, else value NO</td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">cross_sell</td><td valign="top">Value YES, if the Agent tried to sell more than just 1 product, or tried to cross sell, upsell another product. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">empathetic</td><td valign="top">Value YES if the Advisor responds empathetically to the Clients concerns and questions. Value NO otherwise.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_customer_contract_number</td><td valign="top">Client's customer number or customer contract number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_email</td><td valign="top">Client's email</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_first_name</td><td valign="top">Client's first name</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_insurance_number</td><td valign="top">Client's insurance number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_last_name</td><td valign="top">Client's surname</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_phone_number</td><td valign="top">Client's phone number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_service_number</td><td valign="top">Client's service number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">farewell</td><td valign="top">Value YES if the Agent said goodbye or wished the Client a nice day. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">future_interest</td><td valign="top">Value YES if the Client has expressed interest in a certain banking product in a certain time frame, such as another day, later, another time, sometimes in a few weeks, months, in half a year etc. Value NO if the Client has no interest in any banking product at all and when client does not mention interest then value No interest mentioned</td><td valign="top"><br></td><td valign="top">another day, later, another time, sometimes in a few weeks, months, in half a year, No interest</td><td valign="top">string</td><td valign="top">No interest mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">future_interest_ii</td><td valign="top">Value YES if the Client has expressed interest in a certain banking product in a certain time frame, such as another day, later, another time, sometimes in a few weeks, months, in half a year etc. Value NO if the Client has no interest in any banking product at all and when client does not mention interest then value No interest mentioned</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">gathered_category</td><td valign="top">Choose category that fit this conversation the most</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">greeted</td><td valign="top">The value YES, if the agent greeted, introduced himself, said the name of the company. The value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">greeted_end_of_the_call</td><td valign="top">Yes , if agent greeted at the end of the call, otherwise NO</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">handle_it</td><td valign="top">How well did the agent handle these objections? categorize it </td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">handle_objections</td><td valign="top">Value YES if the Agent is able to handle Customers objections well. NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">identification</td><td valign="top">Value YES if the Client’s first name, last name and date of birth were mentioned in the conversation. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">ideology_ukraine</td><td valign="top">True if message supports Ukraine or is againts Russia. False if message supports Russia or is againts Ukraine. Neutral if message is neutral about this topic.</td><td valign="top"><br></td><td valign="top">False, True, Neutral</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">interest</td><td valign="top">rate the clients interest about product and categorize it</td><td valign="top"><br></td><td valign="top">High, Moderate, Low</td><td valign="top">string</td><td valign="top">No interest</td><td valign="top">FIRST</td></tr><tr><td valign="top">interested_when</td><td valign="top">When will the Client be interested in the selected banking product? Return exactly one of the following options that is closest to what the Client said: Days, Week, 2 weeks, A few weeks, 3 weeks, Month, A few months, 2 months, 6 months, Year.</td><td valign="top"><br></td><td valign="top">Days, Week, 2 weeks, A few weeks, 3 weeks, Month, A few months, 2 months, 6 months, Year, Tomorrow</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">introduction</td><td valign="top">Value YES if the Agent introduced themselves with their first name, last name, and company name. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">mifid_financial_products</td><td valign="top">Financial products that where mentioned or discussed in this Conversation by Agent of Client</td><td valign="top">string with values separated by comma</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">mifid_financial_products_explained</td><td valign="top">If Agent explained risks or details about discussed financial products</td><td valign="top"><br></td><td valign="top">False, True</td><td valign="top">string</td><td valign="top">FALSE</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">mifid_relevant</td><td valign="top">True if conversation included any information that needs to be Mifid II regulated</td><td valign="top"><br></td><td valign="top">False, True</td><td valign="top">string</td><td valign="top">FALSE</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">obscene</td><td valign="top">All profanity, obscene words that are in the transcript. NOT_FOUND if none occur.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">other_help</td><td valign="top">Value YES if the Agent asked the Client whether they had any other requests or if there was any other way they could help. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">personalizing_offer</td><td valign="top">Value YES if the Agent tried to personalizing the offer to Clients needs/situation, rather then just presenting product as on a leaflet. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">react_to_offer</td><td valign="top">How did the customer react to the offer? categorize it</td><td valign="top"><br></td><td valign="top">Positive, Interest, Disinterested, Disappointed, Polite, Neutral</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">recapitulation</td><td valign="top">Value YES if the Agent summarized the conversation and verified the contact details with the customer. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">rejection</td><td valign="top">List the main reason why the client does not want to purchase the product or service, why they are not interested.</td><td valign="top"><br></td><td valign="top">Price Objection, Lack of Need, Competitor Preference, Budget Constraints, Lack of Understanding, Not the right time</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">rejection_reason_description</td><td valign="top">Summarize the main reason why the client does not want to purchase the product or service, why they are not interested.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">selling</td><td valign="top">Did the agents sell the product?</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">N/A</td><td valign="top">FIRST</td></tr><tr><td valign="top">sentiment_agent</td><td valign="top">Agent's sentiment at start of conversation</td><td valign="top"><br></td><td valign="top">Helpful, Friendly, Unfriendly, Aggresive, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">sentiment_client_end</td><td valign="top">Client's sentiment at end of conversation</td><td valign="top"><br></td><td valign="top">Relief, Gratitude, Frustration, Confusion, Anger, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">LAST</td></tr><tr><td valign="top">sentiment_client_start</td><td valign="top">Client's sentiment at start of conversation</td><td valign="top"><br></td><td valign="top">Relief, Gratitude, Frustration, Confusion, Anger, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">FIRST</td></tr><tr><td valign="top">subcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">subsubcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">suggest_category</td><td valign="top">Most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">suggest_subcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">summary</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 20 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">summary_long</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 40 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">summary_short</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 10 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">topic_dominant</td><td valign="top">Most dominant topic this Conversation was about</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">topic_first</td><td valign="top">First topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">topic_nondominant</td><td valign="top">Second most dominant topic this Conversation was about</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr></tbody></table>

</details>

* **Previous parameter**: input field. If any parameter is selected, then its outcome is used as an input for this prompt. \
  *Example: summary of the audio record (prompt\_summary)*

{% hint style="info" %}
You can only select parameters that are used by other prompts. Thus, the naming convention is in this format: \<prompt>\_\<parameter>.
{% endhint %}

* **Instructions**: input field for additional prompt specifics. E.g., output file type, processing specifics, structure requirement, etc. It is mainly used in some specific cases to fine-tune the output.&#x20;
* **Conditions**: section for specifying cases, based on values of already processed parameters, on which the current prompt should be applied:
  * **Condition**: dropdown field for selection of logical operators "AND" and "OR".
  * **Add new condition**: link displays upon clicking the following fields below. You can add multiple conditions at once.&#x20;
    * **Parameter**: dropdown field for selection of parameters from other prompts in the format \<prompt>\_\<parameter>
    * **Value**: input field displaying values based on the selected parameter
* **Temperature**: input field for changing the creativity of the model output. \
  Lower values (closer to 0) make output more deterministic, focused, and consistent (sometimes called “stricter”).\
  Higher values (such as 0.7 or 1) increase creativity and diversity, making the model more exploratory in its responses.
* **⚙️ Provider**:&#x20;

  <figure><img src="/files/XY80qiKnksBzpLBJrZ0u" alt=""><figcaption></figcaption></figure>

  * **Create provider**: button for opening a form for the selection of LLMs that will be used for processing\
    ![](/files/4kNFQ22jNpZjQI29yZLx)
    * **Provider:** dropdown menu with options representing LLM providers (Azure OpenAI, Anthropic, Gemini, Groq, or OpenAI)
    * **API Key**: input field
    * **Model name**: input field
    * **API base**: input field for entering URL
    * **API version**: inout field for&#x20;
  * **Remove**: button
* **Create**: button for creating the prompt with the latest configuration

{% hint style="info" %}
Tip: Use the predefined parameters for inspiration, but add little details for your individual use-case. (Ie exact call script for your agents to introduce to customers, like: The value YES, if the agent greeted, introduced himself and asked "How can I help you?". The value NO otherwise.

vs. the default:

The value YES, if the agent greeted, introduced himself, said the name of the company. The value NO otherwise.
{% endhint %}

### Management

* The order of prompts defines their running order.&#x20;

<figure><img src="/files/3SaOlHINN1ddi0KLOJOT" alt=""><figcaption></figcaption></figure>

On-screen elements:

* Upper part:
  * **Search prompts**: bar for searching parameters based on their name
  * **+ Create**: button for creating a new prompt
  * **Select**: button for selecting multiple parameters in their list at once, and then for the following actions:
    * **Prompt state**: dropdown field for changing the state to one of these: "Enabled", "Disabled for all" (completely disabled), or "Disabled for rerun" (disabled only for any of the following reruns) states
    * **Delete**: button for deleting the selected prompt(s)
* List of prompts:\
  *(Elements are listed from the left)*
  * **Name**: of the prompt
  * **Pencil**: icon button for editing the prompt
  * **Command line**: icon indicating the prompt state
  * **Language**: used for processing the prompt
  * **Prompt provider type**: displaying either "Default provider" or any other, as per the provider configuration
  * **Parameters preview**: displaying a preview of the parameters used by the prompt, upon hovering over them, their definition is displayed
* Floating buttons:
  * **Export**: for exporting all prompts in a JSON-formatted file
  * **Import**: for importing prompts in a JSON-formatted file
  * **Save**: for saving prompt changes


# User feedback

This module is for noting individual audio records or texts in the player for the dashboards users. You can configure the questions in the Evaluate button.

### Configuration and management

<figure><img src="/files/pfvkaGeYh3ygE1rSATNk" alt=""><figcaption></figcaption></figure>

* **+ Text Evaluation**: button for opening new grouped fields below:
  * **Question**: input field. Its value is visible on the right "Preview" side of the screen, above the "Answer" field.
  * **Answer**: preview only field&#x20;
  * Bin icon: for removing both the question and the related answer fields
* **+ Text Evaluation by selection of values**: button opens new grouped fields below:
  * **Question**: input field. Its value is visible on the right "Preview" side of the screen, above the two options.
    * Bin icon: for removing the question and all related options
  * **Option 1**: input field. Its value is visible on the right "Preview" side of the screen, below the "Question" name.
    * Bin icon: for removing the option
  * **Option 2**: input field. Its value is visible on the right "Preview" side of the screen, below the "Option 1" name.
    * Bin icon: for removing the option
  * **+ Add option**: link after clicking adds a new option underneath the existing ones
* **Save:** floating button for saving the settings to the User Feedback


# Upload

This module is for uploading data that is to be analysed.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/mbjnR70qG44mIHuAqYer">Data sources (Audio)</a></td><td>This module is used for audio data sourcing using the manual upload option or integration with other data sources.</td></tr><tr><td><a href="/pages/YWL1Ma4zSnWvZ1kGUkhE">Data sources (Text)</a></td><td>This module is used for text data sourcing using the manual upload option or integration with other data sources.</td></tr></tbody></table>


# Data sources (Audio)

This section is used for data sourcing using the manual upload option or integration with other data sources.

<figure><img src="/files/2WZ6ZQh88AYlPOlY9qGh" alt=""><figcaption></figcaption></figure>

On-screen elements:

### Sourcing from Azure

* **Sourcing from Azure**: switch for enabling sourcing from Born Digital's Azure bucket, also called blob storage.&#x20;
* **Provider**: drop-down field with values "Azure", "Azure Premium", "ElevenLabs" for processing of audio files described below

<details>

<summary>Processing options</summary>

* **Azure**: excels in processing dual-channel recordings&#x20;
* **Azure Premium**: is an expanded version of the Azure option
* **ElevenLabs**: excels in processing single-channel recordings

</details>

* **Display type**: drop-down field with values "lexical", "display", "itn", "maskedITN" described below

<details>

<summary>Transcription types</summary>

* **lexical**: is the raw text exactly as recognized, without punctuation, capitalization, or formatting
  * *Example: “I spent twenty dollars” → “i spent twenty dollars”*
* **display**: is the most human-readable version—it includes punctuation, capitalization, and applies ITN plus additional formatting.
  * *Example: “i spent twenty dollars” → “I spent $20.”*
* **itn**: converts spoken words to their symbolic or numeric equivalents.
  * *Example: turning “twenty dollars” into “$20” or “two o’clock” into “2:00”.*
* **maskedITN**: is similar to ITN but hides or redacts sensitive elements, such as numbers or personally identifiable information (PII).
  * *Example: “I spent $20 on 555-1234” → “I spent $\*\* on -\*”*

</details>

***

### **Upload audio files**

feature is suitable for uploading a smaller batch of recordings (ca up to 50), rather for testing or POC cases.

* **Upload**: button for manual upload of data files for processing in formats .wav, .mp3, .ogg, .flac
* **Metadata**: switch for displaying a JSON metadata editor underneath it. Once activated, the editor's value applies exclusively to a single audio file for upload.

{% hint style="info" %}
Metadata accompanies uploaded audio files, resulting in improved visibility and extending filter options in dashboards; its data can also be utilized in [parameter conditions](/insights/workspace/design/parameters) and [Digital Agent flows](/digital-agent/conversation-flow).&#x20;
{% endhint %}

***

### **Copy data from another project**

{% hint style="success" %}
Use this feature to fine-tune your parameters or prompts without interfering with your main project!
{% endhint %}

* **Project**: drop-down field for a selection of the "Insight" → "Audio" project if the current project is of the "Audio" type
* **Version**: drop-down field for selecting a version of the selected project
* **From (UTC)** + **To (UTC)**: date fields for delimiting the timeframe of audio records that are to be copied from the selected project
* **Floating buttons:**
  * **Check**: button for validating how many emails will be copied after using the "Copy" button. The number will be displayed below the "From (UTC) + To (UTC)" date fields.<br>

    <figure><img src="/files/pZ6o2J8wgYYJPIMl2HxA" alt=""><figcaption></figcaption></figure>
  * **Copy**: button for initiation of copying audio records from the selected project
  * **Save:** button for saving the settings

{% hint style="warning" %}
Make sure you have access to the project of interest; otherwise, you will not be able to copy any files.&#x20;
{% endhint %}


# Data sources (Text)

This section is used for data sourcing using the manual upload option or integration with other data sources.

<figure><img src="/files/dN1v0x1uNZBCKRoozql8" alt=""><figcaption></figcaption></figure>

On-screen elements:

### Custom mailbox

* **Configure O365**: feature for connecting with an Office 365 mailbox account. You can use  "Client secret", “Refresh token”, “Certificate”, or "Azure Connect" as per your needs.
  * **1) Client details**: for "Client secret", “Refresh token”, “Certificate” authentications:
    * **Client ID**: input field. Fill in a value as per: \
      Azure Portal → Microsoft Entra ID (Azure AD) → App registrations → Application details
    * **Tenant ID**: inout field. Fill in a value as per: \
      Azure Portal → Microsoft Entra ID → Overview or organization properties
    * **Client secret** or **Refresh token** or **Thumbprint** (Certificate): input field
      * **Client secret**: fill in a value as per: \
        Azure Portal → Microsoft Entra ID → App registrations → Certificates & secrets → “New client secret”
      * **Refresh token:** fill in a value as per:\
        After an OAuth2 login using grant\_type: authorization\_code flow, retrieved via your app or a tool like Postman
      * **Thumbprint** (certificate)**:** Generate a certificate and then upload it using the button below. \
        Azure Portal → Microsoft Entra ID → App registrations → Certificates & secrets → Upload or generate a certificate
        * **Upload**: button for Certificate option to upload the certificate
    * **Mailboxes**: section for the specification of the email address(es) from the connected email group (via Client ID and Tenant ID) that are to be connected and used as an email source for further analysis&#x20;
      * **+**: button for the addition of a new email address.&#x20;
        * **Email**: input field for an email address&#x20;
        * **Folder ID**: input field for additional specification of an email source, this is for choosing a folder of the email address mentioned above.
    * **Schedule sourcing**:
      * **From (UTC)** + **To (UTC)**: date fields for delimiting the timeframe of emails that are to be copied from the defined mailboxes
      * **Minutes for sourcing**: numbers input field for telling the worker how often new emails should be fetched from the defined mailboxes
      * **Should download unread e-mails only**: checkbox for defining whether only unread emails are to be downloaded from the defined mailboxes
  * 2\) **Client details**: for "Azure Connect"
    * **Connect**: button for connecting a mailbox via Microsoft email authentication

{% hint style="danger" %}
Make sure that you have chosen the correct mailbox; if none is selected, all emails (to which the Client has access) from the mail server are fetched!
{% endhint %}

***

### Default mailbox

* **Default mailbox**:&#x20;
  * **Is active**: switch for activating the possibility to send an email from your email client to your project email address (always in a format of <analytics-project_id@analytics.borndigital.ai>)
  * **Use attachments**: switch for processing the attachments. Attachments are then downloaded and usable in the Digital Agent flow project.
    * **Max attachments**: input field for capping the number of attachments that can be downloaded
    * **Max size in bytes**: input field for capping the size of one attachment.
    * **Max pages**: input field for capping the number of pages of one attachment.&#x20;

***

### Upload

A feature for uploading email files for analysis.

* **Upload**: button for manual uploading of CSV data files for processing. Once uploaded, a "Content preview" window is displayed.
* **Content preview**: window displaying parsing and analysing options

  <figure><img src="/files/VcinNklbpaIa5bWqlTIr" alt=""><figcaption></figcaption></figure>

  * Statistics:
    * **Total Rows**: number representing rows identified in the uploaded file
    * **Preview Rows**: number representing rows currently displayed
  * **Column to analyse**: dropdown menu for selection of a column that is to be analysed
  * ⚙️ **Quotechar**: input field with default value " " " used to enclose text containing special characters like semicolon, ensuring that the semicolon within the text is not read as a column separator "Delimiter".
    * Example: “New York; NY” will be intact and not parsed into columns even though it contains a semicolon = ;
  * ⚙️ **Delimiter**: input field with default value ";" that is used for parsing of the CSV file into columns
  * ⚙️ **Encoding**: input field with default value "utf-8-sig" used for text encoding of the uploaded CSV file
  * **Preview table**: displays parsed file as per settings above
  * **Import**: button for importing the file for the analysis&#x20;

***

### Send text

Feature alternating CSV "Upload" feature with direct email sending from the Digital Studio platform. It is mainly used for testing or demo purposes.&#x20;

<figure><img src="/files/C6VceFVcJGHJMCNw3Y6f" alt=""><figcaption></figcaption></figure>

* **Send text as an email for analysis**:&#x20;
  * **Email address**: to which any of the emails can be sent using directly the Digital Studio UI. Email is unique for each project in a format <analytics-project_id@analytics.borndigital.ai>.
* **Type email text for analysis**:
  * **Email text**: input field for simulation of the email body
  * ⚙️ **Advanced options**: switch enabling additional features listed below
    * **Attachments**: feature for the addition of attachments to an email that is to be sent
      * **Supported document types**: pdf, word dosc, csv, txt, png, jpg, webp, tiff
    * **Upload**: button for uploading attachments
      * **Metadata (JSON)**: editor for accompanying the "Email text" with additional metadata, like a subject, in JSON format&#x20;
  * **Send**: button for sending the email

{% hint style="warning" %}
Make sure to toggle the "Is active" switch of the "Default mailbox" type if you want to send an email from your email client. For sending directly with "Type email for analysis" button, you do not need the switch to be turned on.
{% endhint %}

***

### Copy data from another project

{% hint style="success" %}
Use this feature to fine-tune your parameters or prompts without interfering with your main project!
{% endhint %}

* **Project**: drop-down field for a selection of the "Insight" → "Text" project if the current project is of the "Text" type
* **Version**: drop-down field for selecting a version of the selected project
* **From (UTC)** + **To (UTC)**: date fields for delimiting the timeframe of emails that are to be copied from the selected project
* **Floating buttons:**
  * **Check**: button for validating how many emails will be copied after using the "Copy" button. The number will be displayed below the "From (UTC) + To (UTC)" date fields.

    <figure><img src="/files/pZ6o2J8wgYYJPIMl2HxA" alt=""><figcaption></figcaption></figure>
  * **Copy**: button for initiation of copying emails from the selected project
  * **Save:** button for saving the settings

{% hint style="warning" %}
Make sure you have access to the project of interest; otherwise, you will not be able to copy any files.&#x20;
{% endhint %}


# Process

This module is for following the progress of the data processing and rerunning the analysis if any changes are made to the settings or new files are uploaded.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/ZqZgjO6yNfXOLw8Iu3DG">Unprocessed</a></td><td>This module serves to display the status of processing files after their manipulation, ie, data upload, copy, rerun, etc.</td></tr><tr><td><a href="/pages/cZMlR3twJtBIRvQZRScu">Batch jobs</a></td><td>This module is used for displaying all batch jobs, ie, using prompts (suggesting topics, etc.) and reruns.</td></tr><tr><td><a href="/pages/oagT8bAMAHFblwWffCpH">Rerun</a></td><td>This feature is used for re-running the processing/analysis of files after any changes to the configuration of parameters, prompts, or uploading new files, changing providers, adding metadata, etc.</td></tr></tbody></table>


# Unprocessed

This module serves to display the status of processing files after their manipulation, ie, data upload, copy, rerun, etc.

<figure><img src="/files/HHrCtah4BgcvAFJOzlrP" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Refresh**: button
* **Table options**:
  * **Columns**: button with a dropdown menu with options to display or hide columns in the table, as per the selection&#x20;
  * **Filters**: button for displaying a floating window with options below for creating filtering conditions:
    * **Columns**: dropdown menu displaying all available columns
    * **Operator**: dropdown menu displaying all possible operators&#x20;
    * **Value**: input field for specifying a value based on which to filter &#x20;
  * **Density**: button with a dropdown menu with text size display options of the rows from smallest to biggest: "Compact", "Standard", "Comfortable"

<details>

<summary>Available operators</summary>

* Contains
* Does not contain
* Equals
* Does not equal
* Starts with
* Ends with
* Is empty
* Is not empty
* Is any of

</details>

* **Table columns**:
  * **Id**: column displaying file id
  * **Created At**: column displaying the date and time of the file addition to the queue&#x20;
  * **Updated At**: column displaying the date and time of the file update
  * **Rerun**: column displaying info whether the cron job is of rerun type or not (True or False)
  * **Status**: column displaying whether the status is "Waiting" or "Processing" state
  * **Name**: column displaying the name of the file that is being processed&#x20;
  * **Type**: column displaying the name of the codec used for processing the audio file
  * **STT provider**: column displaying the name of the [STT provider](/insights/workspace/upload/data-sources-audio#processing-options) used for the file processing
  * **Step**: column displaying the pipeline stage, like ingestion, transcription, enrichment
* **Rows per page**: dropdown with options 10, 25, 100 for displaying the corresponding number of rows in the table
* **0-0 of 0**: Number of ítems displaying on a page. E.g., "1-8 of 8"
* **<** + **>:** buttons


# Batch jobs

This module is used for displaying all batch jobs, ie, using prompts (suggesting topics, etc.) and reruns.

<figure><img src="/files/TsunvHdRPaMqkPmpxe0D" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Refresh**: button
* **Table options**:
  * **Columns**: button with a dropdown menu with options to display or hide columns in the table, as per the selection&#x20;
  * **Filters**: button for displaying a floating window with options below for creating filtering conditions:
    * **Columns**: dropdown menu displaying all available columns
    * **Operator**: dropdown menu displaying all possible operators&#x20;
    * **Value**: input field for specifying a value based on which to filter &#x20;
  * **Density**: button with a dropdown menu with text size display options of the rows from smallest to biggest: "Compact", "Standard", "Comfortable"
* **Table columns**:

  * **Id**: column displaying batch job id
  * **Created At**: column displaying the date and time of the batch job addition to the queue&#x20;
  * **Updated At**: column displaying the date and time of the batch job update
  * **Operation**: column displaying the name of the batch job operation, like "rerun\_call"
  * **Status**: column displaying whether the status is "New", "Processing", "Error", or "Done" state
  * **Triggered by**: column displaying an email address of the initiator of the operation
  * **Processed**: column displaying the number of audio records that are processed
  * **Total**: column displaying the total number of audio records that are to be processed (queued)
  * **Progress**: column displaying the current progress of the cron job in percentages (Done / Total)
  * **Configuration**: column displaying an icon button opening a window with a text editor displaying the configuration in JSON format

  <figure><img src="/files/nirwfxi3aD8eR60iGm31" alt=""><figcaption></figcaption></figure>


# Rerun

This feature is used for re-running the processing/analysis of files after any changes to the configuration of parameters, prompts, or uploading new files, changing providers, adding metadata, etc.

<figure><img src="/files/CzjngBZYETpJ2zBBWb9R" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Version**: dropdown menu with a selection of a re-run version of the project that is to be rerun
* **Dry rerun**: switch for turning off prompts for the rerun. This is used for enriching input files with metadata.
* **From (UTC)** + **To (UTC)**: date fields for delimiting the timeframe of text or audio records affected by rerun
* **Floating buttons**:
  * **Check**: button for validating how many text or audio record results will be reran after using the "Rerun" button. The number will be displayed below the date fields.

{% hint style="danger" %}
Pay attention to how many results will be re-analyzed as these results into additional costs!
{% endhint %}

* **Rerun**: button for initiating a rerun based on the configuration values


# Analyse

This module is meant for the visualisation of the data that was analysed.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/w8to9iiE2gU2dacYuIDu">Settings</a></td><td>This module is for the addition of the metadata stored in the JSON file to the uploaded files for further analysis.</td></tr><tr><td><a href="/pages/YCXormbJwuxRNFG2x1aK">Dashboard</a></td><td>In this module, you can create and manage Kibana dashboards that display analyzed data.</td></tr></tbody></table>


# Settings

This module is for adjusting showed fields in player (used for playing recordings or seeing html emails).

<figure><img src="/files/LQhGLp2PYpe6ZwHlVza5" alt=""><figcaption></figcaption></figure>

On-screen elements:

* **Player metadata**:
  * **Parameter**: input field for specifying the path to the exact parameter in the existing JSON metadata file. \
    Example: analysis.customer.accountNumber
  * **Label**: input field serves to display the parameter in a human-readable format. \
    Example: Account Number
* **Save**: floating button for saving the settings to the Player metadata&#x20;


# Dashboards

In this module, you can create and manage Kibana dashboards that display analyzed data.

<figure><img src="/files/d7daEi0pvAaC4rEuwrBV" alt=""><figcaption><p>List of dashboards</p></figcaption></figure>

On-screen elements:

* **Conversation Dashboard**: list displays dashboards that can be accessed&#x20;
  * **Name of the dashboard**: once clicked on, the Kibana dashboard is displayed inside the window:

    <figure><img src="/files/JzOsrFV5mVDOsgJd6eTr" alt=""><figcaption><p>Individual dashboard preview</p></figcaption></figure>
* **+ New Dashboard**: button for creating a new Kibana dashboard

{% hint style="info" %}
Only the Organization administrator user can edit the dashboard.&#x20;
{% endhint %}


# Building new projects

Welcome aboard! This guide will walk you through the effortless steps to craft a basic and adva Isights analysis project. Follow along this step-by-step tutorial to create an Isights analysis project.

Choose the project

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><a href="/pages/GuhHxbhyXpTg991NZ54e">/pages/GuhHxbhyXpTg991NZ54e</a></td><td>In this chapter, you will learn how to build a basic project for analysing audio recordings or emails.</td></tr><tr><td><a href="/pages/SA83Pe9ZMd5dgH1yRPaz">/pages/SA83Pe9ZMd5dgH1yRPaz</a></td><td>Here, we will deep-dive into a more complex solution using the flow connector.</td></tr></tbody></table>


# Analysis project

In this chapter, you will learn how to build a basic project for analysing audio recordings or texts.

## Overview

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/hyfjYRAXSMUmGAwNwN8v">/pages/hyfjYRAXSMUmGAwNwN8v</a></td><td>Create the project, pick a name and language</td><td></td></tr><tr><td><a href="/pages/Vl1ASj5wAAvDGamSZTu4">/pages/Vl1ASj5wAAvDGamSZTu4</a></td><td>Define what you want to analyze, using pre-made definitions or create your own</td><td></td></tr><tr><td><a href="/pages/lN0Qo37ogfS0VEExIL0m">/pages/lN0Qo37ogfS0VEExIL0m</a></td><td>Upload data  you want to analyze</td><td></td></tr><tr><td><a href="/pages/6d6064WMlxWtlmv5VCIv">/pages/6d6064WMlxWtlmv5VCIv</a></td><td>Visualize the results and draw insights</td><td></td></tr></tbody></table>

### Try to import the project yourself


# 1. Create your first Insights project

Here you will learn how to step-by-step create a new analytical project.

**Navigate to the Insight project creation:**

{% stepper %}
{% step %}

### Digital Studio - Insights product

After logging into the Digital Studio platform, select the **Insights** product for analysis.

<figure><img src="/files/i9Z5xvIELFnNOfqnoqmM" alt=""><figcaption><p>Choose product</p></figcaption></figure>

Or, if you are already in the Digital Studio, you can easily switch to the **Insights** product in the upper left dropdown menu.&#x20;

<figure><img src="/files/idf5H8MwqEj5PHZEYcPr" alt="" width="233"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Create a project

<figure><img src="/files/rk89QKOw5EPC6cPbBUdY" alt=""><figcaption></figcaption></figure>

1. Click on the **+ Create** button
2. Fill in the **Name** of the project
3. Select the **Project type** of:
   1. **Audio** value for analyzing audio recordings
   2. or the **Text** value for analyzing texts
4. Select the primary **Language** in the analysis will be done
   1. You can also select multiple **Secondary languages** if you already know that some of the data may be in them.

{% hint style="info" %}
This language will be used for Speech to Text in case of Audio recordings.
{% endhint %}

1. Click on **Create project**

<figure><img src="/files/btGSNjLjwOvWj7dqG7X2" alt=""><figcaption></figcaption></figure>

Now that you are in a new analytical project, continue with the creation of parameters and prompts.
{% endstep %}
{% endstepper %}


# 2. Configure parameters and prompts

Now that we have created the new project, it's time to prepare it for the analysis phase by defining parameters and prompts for the data files analysis.

## Defining parameters

Parameters are responsible for analyzing data using AI.&#x20;

1. **Open the** [**Parameters**](/insights/workspace/design/parameters) **module**
2. **Create or import Parameters**
   1. Creating new parameters&#x20;
      1. Choose type **Custom**
      2. **Name** the parameter
      3. Select the **language** in which the definition will be written
      4. Write a **definition** that will be used for the analysis
      5. Select the expected **output** **type** of the analysis
      6. Write a **list of values** that should be used as an output. Each of them needs to be confirmed using the "Enter" keyboard key.&#x20;
      7. Write a **fallback value** for cases where the analysis will fail and will not produce the desired output, using the list of values
   2. Importing parameters
      1. Use the **import** button
      2. Select the parameters file you want to import

## **Defining Prompts**

Prompts combine parameters into logical groups.&#x20;

1. **Open the** [**Prompts**](/insights/workspace/design/prompts) **module**
2. **Create or import Prompts**
   1. Creating new Prompts&#x20;
      1. **Name** the parameter
      2. Select the **language** in which the prompt should be processed
      3. Selected previously created, imported or default **parameters**
   2. Importing prompts
      1. Use the **import** button
      2. Select the prompts file you want to import


# 3. Data upload

Since we already have parameters and prompts defined, we can now use them to analyse data, but first, we need to upload them.

## Uploading data or connecting data sources

1. **Open the** [**Upload**](/insights/workspace/upload) **module**
2. **Based on your new project type (Audio or Text), you will see:**
   1. [Data sources (Audio)](/insights/workspace/upload/data-sources-audio)
      1. Select the data sourcing of your preference:
         1. Manual
         2. Copying from another project
         3. Sourcing from Azure
      2. Select the **provider** as per your needs (single or dual channel recordings)
   2. [Data sources (Text)](/insights/workspace/upload/data-sources-text)
      1. Select the data sourcing of your preference:
         1. Custom mailbox (O365)
         2. Default mailbox
         3. Upload (manual)
         4. Send text (testing purposes)
         5. Copy data from another project<br>


# 4. Data visualisation (dashboard)

Since we have already prepared all crucial parts, only the visual data representation in the dashboard is pending.

### Creating a new dashboard

1. Open the [Analyse](/insights/workspace/analyse) module
2. Open the [Dashboards](/insights/workspace/analyse/dashboards) sub-module
3. Create a **New Dashboard**


# Advanced analysis project using flow

In this chapter, you will learn how to build an advanced Insight analysis project and pass data from Insight to the Digital Agent (flow) for further processing and back.

## Overview

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/x7mShbc1LjNzsbIZGuoZ">/pages/x7mShbc1LjNzsbIZGuoZ</a></td><td>Connect Insights with complex processes using Digital Agent capabilities</td><td></td></tr><tr><td><a href="/pages/VKbAejzHZHvAfNVampwr">/pages/VKbAejzHZHvAfNVampwr</a></td><td>Start with creating the base - Insights project</td><td></td></tr><tr><td><a href="/pages/vNv3LrVng83SpUjoBIMw">/pages/vNv3LrVng83SpUjoBIMw</a></td><td>Configure less complex parameters and prompts in Insights</td><td></td></tr><tr><td><a href="/pages/DMhxIRC3XyRhOv1aSsZU">/pages/DMhxIRC3XyRhOv1aSsZU</a></td><td>Upload your data (audio, text...)</td><td></td></tr><tr><td><a href="/pages/sBKdnBK04XxuAlAkeYhd">/pages/sBKdnBK04XxuAlAkeYhd</a></td><td>Switch between the 2 products (Insights and Digital Agent) as you need - using the best of both worlds</td><td></td></tr><tr><td><a href="/pages/uIWJxDc2ny8OjLdN7hQH">/pages/uIWJxDc2ny8OjLdN7hQH</a></td><td>Visualize the analytical findings, the process and draw conclusions</td><td></td></tr></tbody></table>

### Try to import the project yourself


# 1. Create Digital Agent flow projects

{% stepper %}
{% step %}

### Create a target flow project&#x20;

Please follow the steps as mentioned in this [guide](/digital-agent/building-new-projects).
{% endstep %}

{% step %}

### Create a proxy flow project

1. Create DA project
2. Add transfer node&#x20;
3. Select the target flow project created earlier
4. Connect the transfer node with the start node

{% hint style="info" %}
The proxy flow project serves as a middleman between the Insight project and the Digital Agent (flow) project. Unlike the "Selected project to connect" feature in the [insight flow connector parameter](/insights/workspace/design/parameters#flow-connector), the proxy flow project can handle changes of the hash ID of the connected project, which happens after every (re)training of the target flow project -> proxy projects always point to the last trained and deployed version of Flow.
{% endhint %}
{% endstep %}
{% endstepper %}


# 2. Create Insights project

Here you will learn how to step-by-step create a new analytical project.

**Navigate to the Insight project creation:**

{% stepper %}
{% step %}

### Digital Studio - Insights product

After logging into the Born Digital website, select the **Insights** product for analysis.

<figure><img src="/files/i9Z5xvIELFnNOfqnoqmM" alt=""><figcaption><p>Choose product</p></figcaption></figure>
{% endstep %}

{% step %}

### Create a project

<figure><img src="/files/rk89QKOw5EPC6cPbBUdY" alt=""><figcaption></figcaption></figure>

1. Click on the **+ Create** button
2. Fill in the **Name** of the project
3. Select the **Project type** of:
   1. **Audio** value for analyzing audio recordings
   2. or the **Text** value for analyzing texts
4. Select the primary **Language** in the analysis will be done
   1. You can also select multiple **Secondary languages** if you already know that some of the data may be in them.
5. Click on **Create project**

<figure><img src="/files/btGSNjLjwOvWj7dqG7X2" alt=""><figcaption></figcaption></figure>

Now that you are in a new analytical project, continue with the creation of parameters and prompts.
{% endstep %}
{% endstepper %}


# 3. Configure parameters and prompts

Now that we have created the new project, it's time to prepare it for the analysis phase by defining parameters and prompts for the data files analysis.

## Defining parameters

Parameters are responsible for analyzing data using AI.&#x20;

1. **Open the** [**Parameters**](/insights/workspace/design/parameters) **module**
2. **Create or import Parameters**
   1. Creating new parameters&#x20;
      1. Choose type **Custom**
      2. **Name** the parameter
      3. Select the **language** in which the definition will be written
      4. Write a **definition** that will be used for the analysis
      5. Select the expected **output** **type** of the analysis
      6. Write a **list of values** that should be used as an output. Each of them needs to be confirmed using the "Enter" keyboard key.&#x20;
      7. Write a **fallback value** for cases where the analysis will fail and will not produce the desired output, using the list of values
   2. Importing parameters
      1. Use the **import** button
      2. Select the parameters file you want to import

### Defining the flow connector parameter

This parameter passes values from the Insight project to the flow.

1. **Open the** [**Parameters**](/insights/workspace/design/parameters) **module**
2. Create a **new parameter**
3. Choose type **Flow parameter**
4. Select a **project to connect** (it is highly recommended to select a [proxy flow project](/insights/building-new-projects/advanced-analysis-project-using-flow/1.-create-digital-agent-flow-projects#create-a-proxy-flow-project)) to which you would like to pass data&#x20;
5. **Select trained version** that is to be used for the analysis (usually, the latest is enough)
6. **Name** the flow connector parameter to be referred to from the selected flow project
7. (Optional): Specify **output variables** if you need the passed data processed by the flow and then used back in the Insights part (visualisation, etc.)
8. (Optional): Enable **send from previous prompts to the flow** if you want to publish previous prompts and their values to the flow, but not transcription or the mail text
9. (Optional): Enable **should process email attachments** to let the flow inspect and use email attachments

## **Defining Prompts**

Prompts combine parameters into logical groups.&#x20;

1. **Open the** [**Prompts**](/insights/workspace/design/prompts) **module**
2. **Create or import Prompts**
   1. Creating new Prompts&#x20;
      1. **Name** the parameter
      2. Select the **language** in which the prompt should be processed
      3. Select **parameters** individually (user-created, imported, or predefined/hardcoded ones)**,** or optionally use any of the **predefined parameter group**s
      4. (Optional): Select the **previous parameter** if you wish to pass a value of the selected parameter (for example, a summary of the transcription or a text) as input for this prompt
      5. (Optional): Change **instructions** if you need to change output specifics
      6. (Optional:) Add any **condition** to run the prompt based on the selected parameters and values
      7. (Optional:) Change a **temperature** value if you want the output to be stricter or more creative
      8. (Optional:) Change the model **provider** if you need to use a different one
   2. Importing prompts
      1. Use the **import** button
      2. Select the prompts file you want to import


# 4. Data upload

Since we already have parameters and prompts defined, we can now use them to analyse data, but first, we need to upload them.

## Uploading data or connecting data sources

1. Open the [**Upload**](/insights/workspace/upload) module
2. Based on your new project type (Audio or Text), you will see:
   1. [Data sources (Audio)](/insights/workspace/upload/data-sources-audio)
      1. Select the data sourcing of your preference:
         1. Manual
         2. Copying from another project
         3. Sourcing from Azure
      2. Select the **provider** as per your needs (single or dual channel recordings)
   2. [Data sources (Text)](/insights/workspace/upload/data-sources-text)
      1. Select the data sourcing of your preference:
         1. Custom mailbox (O365)
         2. Default mailbox
         3. Upload (manual)
         4. Send text (testing purposes)
         5. Copy data from another project<br>


# 5. (Optional) Calling Insight parameters from the flow

If you decided to pass the values/results from the previous prompts, here you can find how you can use them in the flow.

1. Open **Digital Agent project**
2. Open a **node** of your preference (Answer, Function, or AI node)
3. Add the insight prompt parameter following this name convention: \<insight\_previous\_prompt>\_\<parameter>:
   1. For the **Answer** node, add the parameter by selecting it in the "Entities" → "Name" dropdown field.&#x20;
   2. For the **Function** node, you can refer to the parameter in "variables", or you can add a tool and specify the parameter name in "optional parameters".
   3. For the **AI** node, you can refer to this in the "Behaviour" window

{% hint style="success" %}
Tips:

Use this, if you want your voicebot/emailbot/chatbot/back-office bot to work with the analyzed data, you can send all these data into DA together with current\_utterance as metadata.
{% endhint %}


# 6. Data visualisation (dashboard)

Since we have already prepared all crucial parts, only the visual data representation in the dashboard is pending.

### Creating a new dashboard

1. Open the [Analyse](/insights/workspace/analyse) module
2. Open the [Dashboard](/insights/workspace/analyse/dashboards) sub-module
3. Create a **New Dashboard**


# Conversation design tips

Welcome to Born Digital's Tips & Tricks - useful in depth tips from our experts.

### Quick links for you

{% content-ref url="/pages/VxMHtq7h97k990EEPYW4" %}
[Customizing speech synthesis](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis)
{% endcontent-ref %}

{% content-ref url="/pages/R5p6ACakIP15613Qesks" %}
[Customizing text output](/for-advanced-users/conversation-design-tips/customizing-text-output)
{% endcontent-ref %}

{% content-ref url="/pages/iewHAJAAbfxc9WLAfgZL" %}
[Customizing smart functions output](/for-advanced-users/conversation-design-tips/customizing-smart-functions-output)
{% endcontent-ref %}

{% content-ref url="/pages/YRjH4tqZrhNXClOssDCo" %}
[Randomizing  message content](/for-advanced-users/conversation-design-tips/randomizing-message-content)
{% endcontent-ref %}

{% content-ref url="/pages/Otdk6Ugb6NOrdVJlrs57" %}
[Setting time-based greetings](/for-advanced-users/conversation-design-tips/setting-time-based-greetings)
{% endcontent-ref %}

{% content-ref url="/pages/Ek4Z9JoaMBory3PEAcTi" %}
[Personalised URL links](/for-advanced-users/conversation-design-tips/personalised-url-links)
{% endcontent-ref %}

{% content-ref url="/pages/kTZs3d5ZK8lPp3fMnYfj" %}
[Custom business statuses with variables](/for-advanced-users/conversation-design-tips/custom-business-statuses-with-variables)
{% endcontent-ref %}

{% content-ref url="/pages/kAkSD4bIJoTTzFtsoEB7" %}
[String slicing](/for-advanced-users/conversation-design-tips/string-slicing)
{% endcontent-ref %}

{% content-ref url="/pages/S4nHWyLWaZcRLkftAQte" %}
[Implementing chat buttons](/for-advanced-users/conversation-design-tips/implementing-chat-buttons)
{% endcontent-ref %}


# Customizing speech synthesis

Tailor your assistant's speech to echo your brand's unique tone and personality. With a suite of customization tools, you can fine-tune pitch, speed, accents, and even add a sprinkle of emotion.​

## Let´s start with it

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbV12F3FDAxj6R0wPr0Xx%2Fuploads%2FZFwFIE18CY6SdFbWnfSm%2FMSG_speech_input.gif?alt=media&#x26;token=fc5f7082-a865-46a4-854d-f5cfb758d219" alt=""><figcaption></figcaption></figure>

Craft compelling texts for your digital voice assistant. Insert your message into the *Speech* text window in the Message node.

<details>

<summary>Expand to learn more</summary>

Text in the *Speech* window will be used as input for speech synthesis. Customize your text with [SSML](#speech-synthesis-markup-language-ssml) for even better results.

For top-notch voice synthesis, we've got some copywriting secrets up our sleeve! Check out our [tips and tricks](#tips-and-trick) on crafting texts that convert beautifully into speech.<br>

:robot: Provider of text-to-speech technology and choice of neural voice depends on your project configuration. Typically, we rely on Microsoft Azure as our primary text-to-speech provider. However, we're not limited to just one option! We also work with Google and other text-to-speech services, offering the possibility of custom neural voices for that extra touch of uniqueness.&#x20;

</details>

***

## Speech synthesis markup language (SSML)

**Get ready to fine-tune your digital assistant's voice with some SSML magic!**  :magic\_wand: **Let's play with pitches, pauses, and personalities.**&#x20;

**SSML** stands for Speech Synthesis Markup Language, and it is an XML-based markup language used to **control the synthesis of text-to-speech output**. SSML provides a way to specify the pronunciation, intonation, and other aspects of the synthesized speech, giving developers fine-grained control over how the text is spoken.

Some examples of what can be controlled with SSML include:

* **Voice selection**: You can choose from a variety of pre-defined voices, including different genders, accents, and languages, or even specify a custom voice using SSML.\
  SSML is used in a variety of applications, such as voice assistants, text-to-speech software, and automated voice response systems, to provide a more natural and user-friendly experience for users.
* **Pronunciation**: You can specify the pronunciation of a word or phrase, including how individual phonemes should be pronounced.
* **Prosody**: You can control the pitch, volume, and rate of the speech, as well as insert pauses, emphasis, and other effects to give the synthesized speech a more natural-sounding intonation and rhythm.

***

## SSML tags

In the context of SSML, tags are elements of XML markup language that are used to provide instructions for controlling the synthesis of text-to-speech output. These tags are **enclosed within angle brackets** (**<** and **>**), and are used to define specific elements or attributes that are recognized by SSML processors.

### Generally, there are two types of tags:

{% tabs %}
{% tab title="Pair tags" %}
Pair tags, also known as start tags and end tags, consist of **two tags that surround a block of content**. The first tag is the **start tag**, and it begins with the name of the element enclosed in angle brackets (**<** and **>**). The second tag is the **end tag**, which begins with a forward slash (**/**) followed by the name of the element enclosed in angle brackets.&#x20;

Pair tags define an element that has a beginning and an end, and the content between the tags is considered to be the value of the element.

**\<prosody>** -  start tag\
**\</prosody>** - end tag

`<prosody> ... </prosody>`

{% code overflow="wrap" %}

```ssml
This sentences in not affected by SSML. <prosody> This sentence is modulated with prosody. </prosody> This sentence is no more affected by SSML, as second sentence was enclosed with end tag.
```

{% endcode %}
{% endtab %}

{% tab title="Non-pair tags" %}
Non-pair tags, also known as empty tags or **self-closing tags**, consist of a single tag that does not surround any content.&#x20;

Non-pair tags are used to indicate that an element does not have any content but may have attributes. Non-pair tags end with a forward slash (/) before the closing angle bracket (>).

```
  ... <break time="2s"/> ...
```

{% code overflow="wrap" %}

```ssml
This is part before the break <break time="50s"/> and this is part after the break
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>Additional information </summary>

Tags can also include **attributes**, which provide additional information about the element they modify. For example, the \<prosody> tag can include the pitch, rate, and volume attributes to control various aspects of the speech.<br>

* <mark style="color:blue;">`<prosody pitch="+10%" rate="90%">`</mark>` ``This sentence will be spoken with a higher pitch (+ 10 %) and slower rate (-10 % or 90 % of default`` `<mark style="color:blue;">`</prosody>`</mark>
* `The following text will be spoken as individual digits:`` `<mark style="color:orange;">`<say-as interpret-as="digits">`</mark>`1234`<mark style="color:orange;">`</say-as>`</mark>
* `The following sentence will be spoken with a two-second pause in the middle: Hello,`` `<mark style="color:purple;">`<break time="2s"/>`</mark>`world!`

</details>

### Taking the closer look

Delve into the Essential SSML Tags: Enhancing Your Assistant's Voice with Tag Mastery

{% tabs %}
{% tab title="<break>" %} <mark style="color:blue;">**\<break>**</mark> allows you to insert a pause in the speech. The <mark style="color:purple;">time</mark> attribute specifies the duration of the pause, and the <mark style="color:purple;">strength</mark> attribute specifies the strength of the pause.

| <mark style="color:blue;">\<break</mark> <mark style="color:purple;">time="10ms"</mark><mark style="color:blue;">/></mark>                                                     | Pause of 10 miliseconds                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">\<break</mark> <mark style="color:purple;">strength="strong"</mark><mark style="color:blue;">/></mark>                                               | <p>Pause of set strenght<br>Possible attribute values: x-weak, weak, medium, strong, x-strong</p> |
| <mark style="color:blue;">\<break t</mark><mark style="color:purple;">ime="500ms"</mark> <mark style="color:purple;">strength="weak"</mark><mark style="color:blue;">/></mark> | Pause od 500 milliseconds and set strength                                                        |
| <mark style="color:blue;">\<break</mark> <mark style="color:purple;">time ="50%"</mark><mark style="color:blue;">/></mark>                                                     | Pause lasting 50 % of default                                                                     |
| <mark style="color:blue;">\<break</mark> <mark style="color:purple;">time = "1"</mark><mark style="color:blue;">/></mark>                                                      | Pause of 1 second                                                                                 |
| {% endtab %}                                                                                                                                                                   |                                                                                                   |

{% tab title="<emphasis> " %} <mark style="color:blue;">**\<emphasis>**</mark> allows to emphasize a particular word or phrase in the speech. The l. .evel attribute specifies the level of emphasis, which can be either "strong" or "moderate".
{% endtab %}

{% tab title="<prosody> " %} <mark style="color:blue;">**\<prosody>**</mark> allows to adjust the pronunciation, volume, and speaking rate of the speech. The <mark style="color:purple;">pitch, range, rate</mark>, and <mark style="color:purple;">volume</mark> attributes can be used to adjust these aspects of the speech.

| \<prosody **rate**="+5.00%"> ... \</prosody>                          | Changing rate, increasing by +5 %                                                                   |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| \<prosody **rate**="+5.00%"> ... \</prosody>                          | <p>Changing rate, to slow<br>Possible attribute values: x-slow, slow, medium, fast, x-fast</p>      |
| \<prosody **pitch**="+5.00%">...\</prosody>                           | Changing voice pitch, increase by +5 %                                                              |
| \<prosody **pitch**="hight>...\</prosody>                             | <p>Changing voice pitch, to high<br>Possible attribute values: x-low, low, medium, high, x-high</p> |
| \<prosody **volume**="+5.00%">...\</prosody>                          | Changing volume, increasing by +5%                                                                  |
| \<prosody **volume**="soft">...\</prosody>                            | <p>Changing volume, to soft<br>Possible attribute values: x-soft, soft, medium, loud, x-loud</p>    |
| \<prosody **emphasis**="strong">...\</prosody>                        | <p>Setting emphasis, to strong<br>Possible attribute values: none, moderate, strong</p>             |
| \<prosody **contour=**"(0%,+10%)(50%,+50%)(100%,+10%)">...\</prosody> | Adjusting contour of speech                                                                         |
| {% endtab %}                                                          |                                                                                                     |

{% tab title="<say-as>" %} <mark style="color:orange;">**\<say-as>**</mark> allows to specify how a particular string of text should be pronounced. The <mark style="color:red;">interpret-as</mark> attribute specifies the type of text to be interpreted, and the <mark style="color:red;">format</mark> attribute specifies the format of the text. The <mark style="color:red;">detail</mark> attribute can be used to provide additional information about how the text should be pronounced.

| \<say-as **interpret-as**="**xxx**">...\</say-as>          | <p>Attribute interpret-as set rule for entity<br>Possible attribute values: date, time, digits, character, spell, address, telephone, name, URL etc.</p>                                                                                        |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<say-as interpret-as="xxx" **format="yyy"**>...\</say-as> | <p>Setting format for attribute, could be also set as "Undefined" interpret-as<br>Ex. <code>\<say-as interpret-as="date" format="md">9/1\</say as></code> set format for entity date as month-day<br>Pronounced as: <em>September, 1st</em></p> |
| {% endtab %}                                               |                                                                                                                                                                                                                                                 |

{% tab title="<phoneme>" %} <mark style="color:green;">**\<phoneme>**</mark> allows to specify the pronunciation of a particular phoneme. The <mark style="color:green;">alphabet</mark> attribute specifies the phonetic alphabet being used, and the <mark style="color:green;">ph</mark> attribute specifies the phoneme to be pronounced.

| \<phoneme **alphabet="ipa"** **ph**="bɔˈɹn.dɪˈ.dʒɪ.təl.">Born Digital\</phoneme> | <p>Attribute <strong>alphabet</strong> sets IPA (international phonetic alphabet)<br>Attribute <strong>ph</strong> sets phonemes be pronounced<br>Phonemes are transcribed with IPA Born Digital = \[bɔˈɹn.dɪˈ.dʒɪ.təl.]</p> |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {% endtab %}                                                                     |                                                                                                                                                                                                                              |

{% tab title="<sub> " %} <mark style="color:blue;">**\<sub>**</mark> allows you to substitute one word or phrase for another. The <mark style="color:blue;">alias</mark> attribute specifies the replacement text, and the content between the start and end sub-tag represents the text to be replaced.

| \<sub alias="Born digital">BD\</sub> | <p>Substitues text with set alias<br>Ex. <em>BD</em> with alias <em>Born Digital</em></p> |
| ------------------------------------ | ----------------------------------------------------------------------------------------- |
| {% endtab %}                         |                                                                                           |
| {% endtabs %}                        |                                                                                           |

***

### Tags usage

SSML code is written in XML format and is typically embedded within the text of the document that is being processed by a text-to-speech system. Here's an example of what SSML code might look like:

> Hey there' \<prosody rate ="slow">I'm your friendly virtual assistant. \</prosody> \<break time="500ms/>\<prosody volume="loud"> How can I help you today?\</prosody>

To use SSML-enriched text as output **in your digital assistant**, copy it in the Speech window in MSG\_NODE in the Flow editor.

{% tabs %}
{% tab title="Step by step" %}

<figure><img src="/files/sC8CLOr068fwnqp43d45" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Correct tags example" %}

<figure><img src="/files/5b458VHFl44QuGVEYn4c" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

***

## Tips and trick

Copywriting for your digital assistant should be **simple and straightforward** to make it easy for users to understand. It is essential to use clear and understandable questions that help the customer formulate their answers. If possible, it is helpful to use the same **natural language and words, phrasing, and lexicon that are commonly used in everyday life**. This will make it easier to communicate with the voicebot.

### **Keynotes:**

<table data-card-size="large" data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td>In the case of voicebot, you <mark style="color:red;"><strong>do not have to</strong></mark> <strong>stick to spelling and grammar</strong> as in other types of communication. Of course, spelling and grammar are still important and have a very strong influence on synthesis quality.</td></tr><tr><td>However in some cases, <strong>grammatically, orthographically and typologically correct text</strong> can lead to a <strong>result that is </strong><mark style="color:red;"><strong>not pleasant</strong></mark><strong> to listen to</strong>, negatively affecting intonation and spoiling the quality of the synthesis.</td></tr><tr><td>Therefore, work consciously with this characteristic of the synthetic voice and <strong>make "mistakes" on purpose.</strong> <br>E.g., deleting or adding commas in a sentence, can significantly improve to the quality of the synthesis.</td></tr><tr><td><strong>Deliberately using the wrong spelling</strong> can also have its advantages and, in some cases, <strong>improves the pronunciation</strong> of certain words or phrases.</td></tr></tbody></table>

## Copywriting structure

#### Sentence structure

The two basic components of a sentence are **topic** (téma) **and comment** (rhéma). The topic is the word or group of words that determine what the sentence is about, while the rheme is part of the sentence that follows and completes the topic. For example, in the sentence *"My dog's name is Max"*, the topic is *"My dog*" and the rheme is *"is named Max"*. Topic and rheme are important for proper sentence construction and are essential for understanding meaning.

{% hint style="info" %}
The flexibility in word order is a distinctive feature of Slavic languages, particularly Czech and Slovak, due to their rich inflectional systems.
{% endhint %}

<details>

<summary>Order of words is important in SK, CZ language</summary>

Changing the word order in a sentence can affect what information we consider important:

```
CZ:
Petr přišel pozdě do školy. 
     # Important = exactly where (to school, not to date) 
Petr do školy přišel pozdě. 
     # Important = exactly when (late, not on time)
Do školy přišel pozdě Petr. 
     # Important = exactly who (Petr, not Pavel)
```

Changing the word order can therefore affect which information is emphasised.

{% code overflow="wrap" %}

```
CZ:
Klient si může zvolit, zda chce spořit na účtu nebo investovat do podílových fondů. 
Zda chce spořit na účtu nebo investovat do podílových fondů, si může klient zvolit. 

Prosím, pečlivě si pročtěte obchodní podmínky. 
Obchodní podmínky si prosím pročtěte pečlivě. 

Pravděpodobně jste se stali terčem podvodníka. Ihned musíme zablokovat platební kartu. 
Pravděpodobně jste se stali terčem podvodníka. Platební kartu musíme zablokovat ihned.`


---------

SK:
Klient si môže zvoliť, či chce sporiť na účte alebo investovať do podielových fondov. 
Či chce sporiť na účte alebo investovať do podilových fondov, si klient môže sám zvoliť. 

Prosím, pozorne si prečítajte podmienky. 
Obchodné podmienky si prosím prečítajte pozorne. 
 
Pravdepodobne ste sa stali terčom podvodníka. Musíme okamžite zablokovať vašu kreditnú kartu. 
Pravdepodobne ste sa stali terčom podvodníka. Musíme vašu kreditnú kartu zablokovať okamžite. 
```

{% endcode %}

</details>

{% hint style="warning" %}
In English, German, or other languages word order is usually set, but that does mean that we cannot use this principle to our advantage as well. In English, this principle is reversed, the more important information is put in front:
{% endhint %}

<details>

<summary>English comparission with SK, CZ language on examples</summary>

{% code overflow="wrap" fullWidth="true" %}

```
I saw a lion at the zoo yesterday.          # Important = it was a lion
Yesterday, I saw a lion at the zoo.         # Important = it was yesterday


I can only play the piano.   # Of all instruments, I play only piano (not guitar, not flute)
I only can play the piano.   # Playing piano is my only skill (not dancing, not singing)
```

{% endcode %}

{% code overflow="wrap" fullWidth="true" %}

```
CZ:
Novou kartu vám můžeme poslat poštou, případně kurýrem. Také si ji můžete vyzvednout na pobočce. Kterou variantu preferujete?”`
SK:
“Novú kartu vám môžeme poslať poštou alebo kuriérom. Môžete si ju tiež vyzdvihnúť na pobočke. Ktorú možnosť uprednostňujete?”
EN:
"We can send you a new card by post or courier. You can also pick it up at a branch. Which option of these two options do you prefer?"
```

{% endcode %}

\
\
You can also use sentences that require a multiple-choice answer, such as *"Which of the options do you wish to choose: A or B?".* Alternatively, we recommend accompanying both options with a verb so that each option is its own sentence and it is clear that these are choices, for example, "Do you want A or do you need B?\
\
\
Another strategy is to first inform the customer of the options and then ask them to choose.

{% code overflow="wrap" fullWidth="true" %}

```
CZ:
Vyberte si, zda se chcete přihlásit pomocí e-mailu, nebo pomocí Facebooku.
Řekněte mi, zda chcete zaslat fakturu na e-mail, nebo zda ji máme poslat poštou.
Potřebuji nejdřív vědět, zda již u nás máte účet, nebo ho teprve chcete založit. 

SK:
Vyberte si, či sa chcete prihlásiť cez e-mail alebo pomocou Facebooku”
“Povedzte mi, či chcete faktúru poslať e-mailom alebo či ju máme poslať poštou”,
“Najprv potrebujem vedieť, či už u nás máte účet, alebo si ho práve chcete otvoriť.”. 

EN:
"Choose whether you want to sign in via email or Facebook"
"Tell me if you want us to send you an invoice via email or whether you prefer to receive it as a paper letter"
"First, I need to know if you already have an account with us or if you just want to open one".
```

{% endcode %}

However, the number of unwanted answers can be reduced by appropriate copywriting with more **distinctive intonation** (see intonation) and emphasis on the individual options.\
One way to write a question that requires multiple choice is to use clear and specific terms that clearly identify each option. For example, instead of asking "Do you want A or B?" you can try something along the lines of:

In **spoken language**, however, this difference in meaning is unclear in both languages as well as several others (**English, German, French** etc.), and it happens that customers do not understand the question at the first attempt and answer yes/no instead of choosing from the options. It is therefore necessary to take this into account when designing the conversation and prepare the scenario for such situations.

In **Slovak**, a similar rule does not apply for or, the writing of commas is governed by different rules.

{% code overflow="wrap" fullWidth="true" %}

```
Example 1.
Yes/no question. We're asking if they're interested in a drink at all. The expected answer is yes/no.

Do you want (A or B)? 
Dáš si kávu nebo čaj?
Do you want (coffee or tea)?
```

{% endcode %}

{% code overflow="wrap" %}

```
Example 2.
We'll serve you either coffee or tea. Choose one of the two. We expect a response of "coffee, please" or "tea with honey, thanks".

Do you want A, or B? 
Dáš si kávu, nebo čaj?
Do you want (coffee) or do you want (tea)?
```

{% endcode %}

In **Czech**, we distinguish grammatically by a comma between two mutually exclusive choices. In this case, the comma is meaning-forming.

</details>

***

### Multiple choice question

{% code overflow="wrap" %}

```
CZ: 
Voláte kvůli své objednávce, případně dříve zakoupeného výrobku? Stačí mi jednoduchá odpověď ano nebo ne.
Zboží můžete vrátit na prodejně, kurýrem nebo přes zásilkovnu. Kterou z těchto možností zvolíte?

EN:
Are you calling to unblock your account? Please answer with yes or no.
```

{% endcode %}

{% hint style="info" %}
**TIP!** In the beginning, before customers get used to the new technology, it is a good idea to provide short instructions on how to interact with the voicebot to avoid confusion and the tendency to press buttons like with IVR.
{% endhint %}

<details>

<summary>Wrong practice examples:</summary>

* **We don't want to make the user talk over the digital assistant!** On the contrary, we want the user's answer to be as concise and clear as possible, and thus easily and reliably recognizable by the voicebot. It is therefore a good idea to make sure that each chatbot text contains only one clear and understandable question.
* Having two questions in one text also makes it **difficult to adjust the synthesis,** as the **question mark is naturally followed by a longer pause** before the start of the next sentence, which is not correctable by the SSML breaktime tag.\
  From the user's perspective, it looks as if the voicebot has already finished, the **user starts to answer and jumps in to talk over** the robot.
* It is important to **make sure that one voicebot's message does not contain two questions at the same time**, as this can cause confusion and complicate understanding between the bot and the user.\
  When multiple questions are included in the output message, it can **confuse** the user. They may not know which question to focus on or what the correct answer is.\
  This can cause the user to feel frustrated which can reduce communication effectiveness and make the user experience less enjoyable.

</details>

***

### **Multiple questions in a single message**

* If you ask the question at the end of the speech, the customer has already heard all the relevant information and is ready to respond.
* In general, people are more likely to retain the freshest information in their memory, i.e. the information they heard last (see theme).
* This will increase the likelihood that the customer will respond concisely and appropriately, and the voicebot will recognize everything correctly and provide the most complete answer to the customer's query.
* The question asked will indicate to the customer that it is time for him to start talking.

Supporting argument for positioning question at the end of the speech:

{% tabs %}
{% tab title="Good practice examples:" %}
{% code overflow="wrap" %}

```
CZ:
Chtěl bych vám nabídnout konzultaci s naším expertem. Ozve se Vám a zdarma Vám provede kalkulaci toho nejvýhodnějšího pojištění. Máte zájem? 

Rádi bychom Vám poskytli konzultaci zdarma. Ozve se Vám náš expert s kalkulací, které pojištění by pro Vás bylo nejvhodnější. Souhlasíte?
```

{% endcode %}
{% endtab %}

{% tab title="Bad practice examples:" %}
{% code overflow="wrap" %}

```
CZ:
Máte zájem o poskytnutí konzultace? Ozval by se Vám náš expert, který zdarma provede kalkulaci nejvýhodnějšího pojištění Vám na míru.
```

{% endcode %}
{% endtab %}
{% endtabs %}

Rather, the solution is built on alternating between periods when the voicebot is speaking and not listening (running text-to-speech synthesis) and when the voicebot is silent, listening and evaluating the transcript of the response (running speech-to-text transcription). **If the customer speaks without the voicebot finishing speaking, speech-to-speech transcription does not run** and part of the response is lost, which can lead to misrecognition of intent.

It's better if the text of the voicebot contains the question **at the end of the speech.** This will help to prevent the customer from jumping into the voicebot's speech. The solution is not designed to allow the customer to interrupt the virtual assistant, while the voicebot is able to go back and finish the rest of its speech.

{% hint style="info" %}
Remember that achieving natural and expressive intonation in TTS systems can be challenging, as it requires capturing the nuances of human speech. It may take some **experimentation and refinement** to achieve the **desired results.**
{% endhint %}

***

### Position of the question in digital assistant's message

```
CZ:
Zkusíme to znovu? 
Vyplnil jste všechny údaje správně?
Přejete si reklamaci řešit raději písemnou cestou?
```

A question should never be phrased negatively. This is because people are generally more willing to accept positive information and ideas than vice versa. Phrasing the question negatively can reduce the likelihood that the voicebot will correctly understand the customer's answer.

```
CZ:
Nechcete to zkusit znovu?      
Neudělali jste chybu? 
Jste si jistý, že jste neudělal chybu?
Nepřejete si reklamaci raději řešit písemnou cestou? 

SK:
Nechcete to skúsiť znova?   
Neurobili ste chybu?  
Nechceli by ste svoju sťažnosť riešiť radšej písomne?

EN:
Won't you try again?
Don't you want to deal with reclamation via e-mail?
```

What would answer *yes* (*ano/áno*) mean in this case? *Yes, I want* or *Yes, I indeed don't want to?* This situational context cannot be discerned with 100% confidence, so we recommend phrasing questions positively or neutrally.

**Question wording is a key** element of the voicebot scenario. The wording of the question influences the phrasing of customer's answer, and therefore the intent that must be trained for the virtual assistant to recognize the answer.

#### Question formulation

Based on the length of the sentence sometimes the quality of the synthesis can be quite fluctuating, appearing artificial and not very natural. In such cases, it is useful to shorten the copywriting or add or edit some words to the text to make the voice synthesis sound better. This approach can help create a more natural and beautiful voice synthesis without the need for complicated settings or SSML tags.

<details>

<summary><mark style="color:green;"><strong>10 Copywriting tips for your digital assistant with speech synthesis</strong></mark></summary>

1. The copywriting must be snappy, clear, and understandable.
2. Speak the language of your customers. Use terms and slang they understand.
3. Never phrase questions negatively.
4. 1 message node = 1 question maximum.
5. The ideal placement of the question is at the end of the message.
6. Never ask two different things with one question.
7. For multiple-choice questions, make sure to clearly differentiate the options. If appropriate, rephrase to an announcement sentence and inform the customer that they have to choose and list options.
8. Spelling and grammatical correctness in *Speech* is secondary. However, make errors consciously so that they benefit the quality of the synthesis.
9. Avoid foreign language expressions whenever possible. Alternatively, we write them in such a way that they can be read alphabetically&#x20;
10. Special characters and cases that are to be read aloud are broken down with words.

</details>

***

## Intonation best practice

Master the art of customizing speech synthesis intonation with SSML on our [dedicated documentation page](#speech-synthesis-markup-language-ssml). Learn to personalize your AI voice with precision and creativity for a truly tailored and engaging auditory experience!

<details>

<summary>Here are some <strong>basic tips</strong></summary>

1. **Understand the context**: Intonation conveys meaning and emotion in speech. It's important to consider the context and intended message of the text. Identify the keywords, phrases, or sentences that require specific intonation patterns to convey the desired emphasis or emotion.
2. **Use punctuation**: Punctuation marks such as commas, periods, question marks, and exclamation marks indicate natural breaks and changes in intonation. Make sure to add appropriate punctuation to your text to guide the TTS system's intonation.
3. **Prosody tags**:  Utilize SSML tags to explicitly specify the desired intonation patterns for specific words or phrases.
4. **Experiment with pitch and duration**: Intonation involves variations in pitch and duration. Adjusting the pitch can create rising or falling intonation patterns while manipulating the duration of syllables or phrases can add emphasis or rhythmic patterns. Experiment with these parameters to achieve the desired intonation.
5. **Listen and iterate**: After applying intonation modifications, listen to the generated speech and evaluate the effectiveness of the intonation patterns. Make adjustments as needed to achieve the desired expressive quality and convey the intended meaning.
6. **Consult native speakers**: If possible, seek feedback from native speakers of the target language to ensure that the intonation sounds natural and appropriate. Native speakers can provide valuable insights and guidance on the intonation patterns specific to the language and context.

</details>

{% hint style="info" %}
Remember that achieving natural and expressive intonation in TTS systems can be challenging, as it requires capturing the nuances of human speech. It may take some **experimentation and refinement** to achieve the **desired results.**
{% endhint %}

***

### Intonation curve

Text-to-speech synthesis is also able to **automatically detect the sentence type and set the corresponding intonation curve**. This means that you can easily create a synthesized voice that sounds natural and matches the text you enter accurately.&#x20;

{% hint style="success" %}
**Pro-tip!** :sparkles: For neural voices provided by Microsoft Azure, feel free to use the [Audio content creator tool](https://speech.microsoft.com/audiocontentcreation) in Azure Speech Studio. Fine-tune synthesized speech audio to fit your scenario. Define lexicons and control speech parameters such as pronunciation, pitch, rate, pauses, and intonation
{% endhint %}

{% tabs %}
{% tab title="Video example" %}

<figure><img src="/files/3nFPq2IH9UU3seyZTqCb" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Azure intonation edit" %}

<figure><img src="/files/h3E6JQHR1lp7BD2jATek" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Step by step guide" %}

* In the dialogue window, you can see the **width of each word segment**(x-axis) on the intonation curve.
* Keep in mind that **longer words contain more vowels** and therefore more opportunities for the intonation curve to be modified.
* By default, the intonation curve is represented by a straight line at 0%. However, this **does not mean** that the **basic intonation is completely flat!** The tool allows you to adjust the pitch **relative** to the automatic basic synthesis.
* A maximum of **five intonation points** can be plotted on the curve for a single section.
  {% endtab %}
  {% endtabs %}

In Azure Audio Content Creator, you can adjust intonation **in sections,** which means you can set intonation for each **sub-section, phrase, or word separately**, instead of having to set intonation for the whole sentence. This allows you to capture different intonation nuances more accurately and gives you more control over how the neural voice will appear.

![](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-747493a5-3e89-4586-a550-8b73d5b99d03.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

**Accentuating intonation** allows listeners to distinguish between the different ideas and information contained in a sentence. By adjusting intonation curves, you can **highlight important points or emphasize changes in mood or emotion**, which will help the listener better understand and remember what the voice is saying.

<details>

<summary><mark style="color:green;"><strong>Intonation best practice tips</strong></mark></summary>

Here's how you can work with the Intonation curve effectively:

* **Understand the Intonation curve**: The Intonation curve represents the pitch contour of the speech waveform. It visualizes the changes in pitch over time. The x-axis represents time, and the y-axis represents pitch.
* **Identify key points:** Identify the key points in the text where you want to manipulate the intonation. These points could include emphasized words, important phrases, or sections that require specific intonation patterns.
* **Add anchor points:** Add anchor points on the Intonation curve to indicate the pitch changes. Click on the curve at specific time points to create anchor points. These points will serve as the reference for manipulating the pitch.
* **Adjust pitch and duration:** Drag the anchor points up or down to adjust the pitch at those time points. Moving them upward raises the pitch while moving them downward lowers the pitch. You can also drag the edges of the anchor points to modify the duration of the pitch change.
* **Create prosody patterns:** By adding multiple anchor points and adjusting their positions, you can create inflection patterns such as rising, falling, or fluctuating intonation. For example, a rising intonation pattern can indicate a question, while a falling intonation pattern can denote a statement or completion.
* **Preview and refine:** Preview the speech with the modified Intonation curve to evaluate the impact of your changes. Fine-tune the positions of anchor points as needed to achieve the desired intonation patterns.
* **Iterate and experiment:** Intonation patterns can be subjective and depend on the context and language. Experiment with different anchor point positions, shapes, and durations to find the most appropriate intonation for your specific text.

</details>

{% hint style="info" %}
When adjusting intonation curves, you should consider several factors such as sentence length, rhythm, accent, and the emphasis you want to convey. It is important to remember that intonation is a complex subject and that you need to practice and try different approaches.
{% endhint %}

***

### Melody patterns

Here are some examples of inflexion patterns you can achieve:

{% tabs %}
{% tab title="Rising intonation" %}
To create a rising intonation pattern, you would place anchor points at the beginning of a phrase or sentence and gradually raise the pitch as you move forward in time. This pattern is commonly associated with questions or uncertainty.
{% endtab %}

{% tab title="Falling intonation" %}
A falling intonation pattern involves placing anchor points at the beginning of a phrase or sentence and gradually lowering the pitch as you move forward in time. This pattern often signals a statement or completion.
{% endtab %}

{% tab title="Fluctuating intonation" %}
You can create a fluctuating intonation pattern by adding anchor points at various positions along the Intonation curve. This pattern involves both rising and falling pitch movements, conveying emphasis or highlighting important information.
{% endtab %}

{% tab title="Plateau intonation" %}
A plateau intonation pattern maintains a relatively steady pitch without significant changes. You would position anchor points at similar heights along the curve, resulting in a flat or level pitch. This pattern is often used for conveying neutral or declarative statements.
{% endtab %}
{% endtabs %}

**Want more detailed tips** :interrobang:

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="1f1e8-1f1ff">🇨🇿</span> CZ intonation patterns step-by-step</summary>

#### Basic patterns in Czech language

**Rising intonation for questions**: In Czech, rising intonation is commonly used to indicate questions. When using the Intonation curve, create a rising pattern by gradually increasing the pitch from the beginning to the end of the question phrase or sentence. To emphasize the end of the question, you can drop the curve a little bit lower before you bring it up to its amplitude.\
![image.png](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-3576db06-e5f5-49a3-8976-f3c194c76ba3.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

**Falling intonation for statements**: Statements in Czech typically have falling intonation. To convey this, place anchor points at the beginning of the statement and gradually lower the pitch as you move forward in time. This falling pattern gives a sense of finality and completion to the sentence.\
![image.png](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-9e89fbe0-c938-40e7-95c0-37b1991307bf.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

**Distinctive pitch accents**: In Czech, pitch accents do not typically change the meaning of a word. Unlike some tonal languages where pitch variations can differentiate lexical meanings, Czech does not have a lexical tone. Instead, Czech is characterized by patterns of stress and intonation.\
![image.png](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-666ed0e4-44ee-4269-84de-b419a3d2a4ca.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

**Emphasizing keywords**: In Czech, emphasis is often placed on specific words to highlight their importance or to contrast them with other elements in the sentence. Use the Intonation curve to create a noticeable pitch increase on the emphasized word or phrase. This helps convey the intended emphasis and focus within the sentence.\
![image.png](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-e9f1dd2b-c31c-4937-b8d6-d39246ec2694.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

**Pay attention to sentence structure**: The word order and sentence structure in Czech can influence intonation patterns. For example, the initial position of a subject in a sentence may receive more prominent intonation. Be mindful of these structural cues and adjust the intonation accordingly.

<br>

#### Question intonation

If we want to improve intonation to make it clear that this is a question, the first instinct should be to set a curve rising with the end of the sentence.

<img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-7c2b6fad-7b6d-42b9-b50e-7032bb05bbe6.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt="image.png" data-size="original">

There are also some specific words that **indicate a question,** such as **interrogative pronouns** (what, who, where, etc.). If we **raise the intonation** on the curve at this point, we will e**mphasize these words**. This can be useful if we want to elicit specific information from users. This will be more effective for multi-word questions. For very short questions, or questions made up of very short words, there are not enough vowels available to allow the melody of the more complex intonation curves to "sing" the melody correctly.

***Proč** máš tak veliké zuby?* - Emphasize we're looking *for reason.*

***Kolik** vlasů má pohádkový dědeček Vševěd?* - Emphasize we're looking *for count*.

***Jak** se podle vás správně budí princezny?* - Emphasize we're looking *mean of*.

\
This will be **more effective for longer questions.** For very short questions or questions made up of very short words, there are not enough vowels available to allow the more complex intonation curves to get the melody right.

*Jaká je adresa tvého trvalého bydliště?* ✓✓✓\
*Řekneš mi, kde bydlíš?* ✓✓\
*Kde domov můj?* ✓\
*Jak se máš?* ✓\
*Jak je?* ✗

\
Using SSML, you can also transform the original statement into a question. The melody of the sentence will probably appear "flatter" compared to a classically written question with a question mark at the end, which is rising by default.

**How to correct excessive pitch for Czech neural voices**

Sometimes the neural voice may seem to intone the ends of questions correctly but unnaturally. Typically, the end of a sentence suddenly shoots off significantly in intonation, the voice seems " textbook-ish", as if it mutates, sounds affected or strangled.

<img src="https://68.media.tumblr.com/a74ebcd493197c60f20743a0d3058424/tumblr_nf65iqOirF1sfmnojo1_500.gif" alt="abc.gif" data-size="original">

**If the pitch of synthetic speech seems to rise too much at the end of questions,** there are a few things you can try.

* [x] &#x20;Check the text to synthesize, and if necessary, try adjusting the copywriting.

*Už máte sjednané nové pojištění?* → Prosím řekněte mi, zda již máte sjednané nové pojištění.

* [x] &#x20;Consider adjusting the pitch of the synthesized sentence using the Pitch feature. This allows you to move the pitch of the synthesized speech up or down. In this case, adjust the index downwards by a few percent (e.g. 1 → 0.98).

<img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-eb1456d4-ba72-4049-ab88-f5712d335846.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt="image.png" data-size="original">

* [x] &#x20;Another option is to adjust the intonation curve and reduce the exaggerated pitch at the end of the sentence. Enter the intonation point a few per cent lower than the default value.

<img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-3588f291-7d3a-46d5-94f4-bb394f7b001e.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt="image.png" data-size="original">

</details>

***

### Pauses and breaks best practice

#### Basics

The **\<break>** tag is used to create a pause of a given length in the text. This tag can be used, for example, to express a pause between words or sentences, which can help to improve the naturalness of the delivery.&#x20;

{% hint style="info" %}
Azure Audio content creator tool offers both predefined tags and the ability to incorporate breaks of a length of our choosing.
{% endhint %}

{% tabs %}
{% tab title="Break tag" %}

The **\<break> tag in SSML** is used to insert a pause or a break in the speech output. It allows you to specify the duration and the strength of the pause. The \<break> tag can be used with the following attributes:

*<mark style="color:purple;">time:</mark>*\
Specifies the duration of the pause in seconds or milliseconds. For example, \<break time="500ms"/> inserts a pause of 500 milliseconds.

<figure><img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-c44ee74a-f216-43fa-8619-1b0dba23703f.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt=""><figcaption></figcaption></figure>

*<mark style="color:purple;">strength:</mark>* \
Specifies the strength or intensity of the pause. It can have values like "none", "x-weak", "weak", "medium", "strong", or "x-strong". The actual interpretation of these values may depend on the specific text-to-speech engine used.

<figure><img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-0cd49bd6-f2c3-47e9-9efa-f1a9080e6cf5.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt=""><figcaption></figcaption></figure>

#### Example

* Hello, <mark style="color:blue;">\<break</mark> <mark style="color:purple;">time="500ms"</mark><mark style="color:blue;">/></mark> how are you today?
* Hello, <mark style="color:blue;">\<break</mark> <mark style="color:purple;">strenght="medium"</mark><mark style="color:blue;">/></mark> how are you today?
  {% endtab %}

{% tab title="Pause - sentences" %}
A normal punctuation dot is an interruption of approximately **200-300 ms.** If you find these pauses too long, we recommend replacing the punctuation with a shorter break. Ideally **100 ms, but never less than 50 ms.**

![Each interpuctional period is replaced by pase of 100 miliseconds.](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-a92f2dca-62ef-481e-9559-eec9c01cb30a.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

{% hint style="warning" %}
The punctuation must **be replaced** by SSML break! Putting a break tag after punctuation would paradoxically make the pauses even longer (default punctuation pause length 300 ms + additional break tag length).
{% endhint %}

By setting **different pause lengths,** we can influence the **rhythm of speech**. For example, set a shorter pause between sentences that form a single thought than at the front of different thoughts. Millisecond differences in pause length are almost imperceptible to the conscious human. However the different **impression of synthesis is mainly created by the change of rhythm between sections**. We can take advantage of this and better separate the individual information.

<figure><img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-2424abcd-9596-417f-9489-cce96eeabfbb.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt=""><figcaption></figcaption></figure>

<figure><img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-e21e0f02-3d49-406a-ae24-fc94cb9aa7f6.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt=""><figcaption></figcaption></figure>

In the example shown in the figure above, the texting can be divided into the sections *<mark style="color:yellow;">acknowledgement</mark> → <mark style="color:green;">argumentation</mark> → <mark style="color:blue;">call to action</mark> → <mark style="color:red;">confirmation question</mark>.* The argumentation consists of several sentences that form a unified train of thought, so it contains shorter pauses. On the other hand, a **100ms** gap between sections is **more distinctive.**
{% endtab %}

{% tab title="Pause - words" %}

The **break also affects the intonation** of the sentence and acts as an intonation dot, i.e. the intonation curve drops at the end.

Sometimes, however, we need to edit a pause between words or parts of sentences without intonating a full stop after the sentence. A **softer drop** in voice and at the same time a pause are provided by other signs, the most prominent of which is the punctuation mark, and slightly more subtle are the **colon**, **semicolon** or **dash**.

> > **Prominent pauses:**\
> > Něco končí \<break strengh = "weak"/> Něco začíná.\
> > Něco končí \<break time = "100ms" /> Něco začíná.\
> > Něco končí. Něco začíná.

> > **Softer pauses:**\
> > Něco končí; něco začíná.\
> > Něco končí, něco začíná\
> > Něco končí: něco začíná.\
> > Něco končí- něco začíná.

It is recommended that these marks be added at the point where the voice drop and short pause are to occur, or that they replace the original punctuation. If the pause is too short, write several of these signs in a row, adding their lengths together.

> > Něco končí,,, něco začíná.\
> > Něco končí;; něco začíná.

#### Example

![](https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-46094c6c-2213-4d87-959b-7174f730d23f.png\&download=false\&resolveLfs=true&%24format=octetStream\&api-version=5.0-preview.1\&sanitize=true\&versionDescriptor.version=wikiMaster)

Note that we have applied **multiple strategies** to improve the quality of the synthesis in the example.

1. We have **rewritten** the graphical distinction of the options with words (**A. ---> option A**);
2. **Replacing punctuation** marks with a **break tag** of a chosen length;
3. **Combining additional punctuation marks** between words for finer and shorter pauses with less effect on intonation.
   {% endtab %}

{% tab title="Pauses - after question" %}
The **question mark** serves as a punctuation mark that not only indicates a question but **also functions as a pause.** When a question is posed, there is typically a brief interruption of a**round 300 milliseconds.**

However, if the question is followed by additional text, this pause can disrupt the flow of speech and give the impression that the voicebot has finished speaking. To prevent the voicebot and the user from overlapping in their speech, it is important to consider certain strategies for phrasing questions and placing them appropriately within the speech. The chapter on copywriting delves into these strategies in more detail.

Let's review some fundamental principles of good practice:

* **Each message** should contain only **one question.**
* **Each question** should focus on a **single topic**. For example, instead of asking, "Would you like to create a new account and join our Premium Club?" it is better to ask separate questions for each option.
* It is advisable to include the **question at the end of the message** so that the user has already received all the necessary information.
  {% endtab %}

{% tab title="A/ B question" %}
Let's address one specific case of choice questions (e.g., "Do you want A or do you want B?").&#x20;

In this scenario, it is crucial to ensure good synthesis and **emphasize distinctive intonation to convey the question's intent clearly and elicit the expected response.** One recommendation is to structure the sentence in a way that presents each option as a separate sentence.

To assess the quality of synthesis, intonation, and the initial impression the question makes, **experiment with different writing styles and punctuation**. It is possible that breaks or punctuation marks may not provide a sufficiently distinct separation between the two options. In such cases, trying out a question mark after each option could be worth considering.

<br>

<figure><img src="https://dev.azure.com/borndigitalai/578a80a1-7788-4722-bd5f-183c0f413723/_apis/git/repositories/3d058504-fd4a-4522-8a49-88ccfc042356/Items?path=/.attachments/image-cfaad430-b16b-40bd-85ad-b577f63f9bff.png&#x26;download=false&#x26;resolveLfs=true&#x26;%24format=octetStream&#x26;api-version=5.0-preview.1&#x26;sanitize=true&#x26;versionDescriptor.version=wikiMaster" alt=""><figcaption></figcaption></figure>

Please note that this is not a violation of the rule stating that only one question should be included in each text. It's important to **remember that speech synthesis input notation serves a different purpose** than regular text and does not necessarily adhere to grammar or spelling conventions. In this instance, it is considered a single question, with each option represented by a distinct intonation pattern that visually resembles a question mark.

In the case of *"Do you want coffee? Or do you want tea?"* a pause between the two options might **be excessively long**. Unfortunately, this gap cannot be shortened using the break tag. One possible approach is to remove the space after the first question mark *(e.g., "Do you want coffee?Or do you want tea?").* In certain cases, **combining the options into one continuous string can be helpful**, with the question mark indicating the intonation but without the unwanted extended pause.

However, **note** that this is just **one of the potential solutions and not the only correct way** to adjust the intonation in such cases.
{% endtab %}
{% endtabs %}

***

## Pronunciation best practice

### Phoneme-defined pronunciation

{% tabs %}
{% tab title="Stress and accent" %}
**Stress** can have a huge impact on pronunciation.&#x20;

When a word is stressed, the stressed syllable is typically pronounced with greater intensity, higher pitch, and longer duration compared to unstressed syllables. Additionally, **the quality of vowels in stressed syllables may also be affected, with stressed vowels often being pronounced with more clarity and fullness.**

In :flag\_cz:Czech, **stress is generally fixed on the first syllable** of a word. This means that the first syllable receives the primary stress, while the subsequent syllables have secondary stress or are unstressed. However, it's important to note that stress patterns can vary depending on the word and its inflectional or derivational forms.

To provide some examples in IPA (International Phonetic Alphabet), let's consider a few Czech words:

> > "kniha" (book): `/ˈkɲɪɦa/`\
> > The primary stress falls on the first syllable (/kɲ/), making it more prominent in pronunciation.

> > "univerzita" (university): `/ˌunɪvɛrˈzɪta/`\
> > The primary stress is on the second syllable (/ɪv/), while the first syllable (/u/) carries secondary stress. The following syllables (/ɛrˈzɪt/ and /ta/) are unstressed.

> > "překvapení" (surprise): `/ˌpr̝̊ɛkvaˈpɛɲi/`\
> > The primary stress is on the second syllable (/ɛkva/), and the first syllable (/pr̝̊/) carries secondary stress. The final syllable (/ɲi/) is unstressed.

These examples illustrate the general stress patterns in Czech, where the stressed syllables are emphasized in terms of intensity, pitch, duration, and sometimes vowel quality. It's important to consult native speakers or audio resources to further refine your pronunciation and understand the intricacies of Czech stress patterns.
{% endtab %}

{% tab title="Word borrowings" %}
When incorporating **English** words into the :flag\_cz: Czech language, the stress patterns of these borrowed words tend to follow the **stress patterns of Czech words**. However, there may be some adjustments to fit the Czech stress rules. Here are a few guidelines for handling English words in Czech:

* **First-syllable stress:** As mentioned earlier, Czech generally has stress on the first syllable of a word. When adopting English words, the primary stress is often placed on the first syllable to align with Czech stress patterns.

> > Example: "computer" in English has stress on the second syllable (`/kəmˈpjuːtər/`), but in Czech, it would typically be pronounced with stress on the first syllable: `/ˈkɔmpjutr/`.

* **Adaptation of vowel sounds:** English vowels can have different qualities compared to Czech vowels. When adapting English words into Czech, the vowel sounds may be modified to match the Czech vowel inventory.

> > Example: "restaurant" in English (`/ˈrɛstərɒnt/`) could be adapted in Czech as /ˈ`rɛstaurant`/.

* **Retaining original stress:** In some cases, English words may retain their original stress patterns, particularly when they are relatively recent borrowings or specialized terms that have become familiar to Czech speakers.

> > Example: "hotel" in English has stress on the first syllable (`/hoʊˈtɛl/`), and this stress pattern is often preserved when using the word in Czech: `/ˈhotɛl/`.

&#x20;:woman\_teacher: Adaptation of English words in Czech can vary depending on individual preferences, language register, and the familiarity of the borrowed word to Czech speakers. Therefore, there can be some variability in how English words are pronounced within the Czech language context.
{% endtab %}
{% endtabs %}

### Foreign words pronunciation

When using Azure's Speech Studio with neural voices to handle foreign word pronunciation, here are some tips to ensure accurate pronunciation:

* **Phonetic spelling**: Provide a phonetic spelling of the foreign words using the International Phonetic Alphabet (IPA) or a transcription system familiar to the base language neural voices. This helps the TTS system understand the correct pronunciation of the word.
* **Lexicon customization**: Utilize the lexicon customization feature in Azure's Speech Studio to add pronunciation rules for specific foreign words. This allows you to specify the pronunciation of each word or phrase more precisely.
* **Pronunciation rules:** Create pronunciation rules for common patterns found in foreign words. For example, if there is a consistent pattern of stress in the foreign language, you can define rules to apply stress in the appropriate position.
* **Contextual cues**: Provide additional context within the text to help guide the TTS system's pronunciation. This could include nearby words or phrases that assist in determining the correct pronunciation of the foreign word.
* **Test and iterate**: After applying the above techniques, listen to the generated speech and identify any mispronunciations. Adjust the phonetic spellings, lexicon entries, or pronunciation rules as necessary and continue testing until the desired pronunciation is achieved.

It's important to note that while these tips can improve the accuracy of foreign word pronunciation in TTS systems, the results may still vary. TTS systems are trained on large datasets and generalize pronunciation based on the language's phonetic patterns. Handling foreign words can be challenging due to the diverse pronunciation rules across languages.

{% tabs %}
{% tab title="CZ - Foreign words" %}
:flag\_cz: Examples:

***

Some phrases or individual words from foreign vocabulary are trained in the default text-to-speech model and synthesized is smooth, localized to base language, and pleasant to the ear. Sounds fine without adjustments:

* *Nejpoužívanější vyhledávač v Česku je Seznam, nikoliv **Google.***
* *Letíme na dovolenou se společností **Lufthansa.***
* *Koupím ojetý **renault.***

Other phrases or words can be very similar and comprehensible, with a few tweaks here and there. Even though their pronunciation is nearly correct, this can cause an uncanny valley effect:

* *Ceny maji jako **Deutsche bahn**, ale služby jako nejposlednější drožka.*

> > **deutsche** is pronounced correctly like `[dɔ͡ɪˈt.ʃɛ.]`, but **bahn** sounds like **`[ba.ɦaːˈ.ẽˈ]`** and would be needed to be adjusted

* *Potřebuji znát vaši **IP** adresu.*

> > **IP** being pronounced like `[iːˈ.pɛː]`, which would be comprehensible, but in the case would be better to adjust English pronunciation to Czech as `[a͡j.piː]`\
> > 🇨🇿Pronunciation of numbers followed by currency signs is quite different from common reading rules.With prices, sums of money, or values, we often omit words describing the decimal order of fractional part (`[desetiny, setiny]`)
> > {% endtab %}

{% tab title="CZ - Currency, prices, money sums pronunciation" %}

> > 19,99 - `[devatenáct celých, devadesát devět setin]` 19,99 Kč - `[devatenáct korun devadesát devět haléřů]` v akci jen za 19,99 Kč - `[v akci jen za devatenáct devadesát devět]` rohlík stojí 1,50,- - `[rohlík stojí korunu padesát]`

Azure's speech synthesis recognizes some words or signs for currency

> > **A.** Czech currency 100 Kč `[sto českých korun]` 1000 CZK `[tisíc českých korun]`

> > **B.** Dollars 10 $ `[10 dolarů]` 3 $ `[3 dolary]`

> > **C.** Euros 3 € `[3 eura]` 1000 € `[tisíc eur]` 1 € `[jedno euro]`

> > **D.** British pounds. 1 £ `[jedna libra]` 3 £ `[tři libry]` 10 £ `[deset liber]`

> > **E.** Not all international currency symbol are supported (besides few most common they're usually not)
> > {% endtab %}

{% tab title="CZ  - Digits and numbers pronunciation" %}

####

Pronunciation of digits depends on:

* length of a digit string
* input format
* language and neural persona
* SSML rules
* reading rules and their localization
* numeric type (integer, float, ordinal)
  {% endtab %}
  {% endtabs %}

### **Integers**

{% tabs %}
{% tab title="CZ " %}
:flag\_cz: Czech language

* If digits have **fewer than or exactly 6 digits**, they are always **read decadically as default**, regardless of whether a space separates orders of thousands\
  \
  1234\
  1 234\
  `Both numbers are pronounced as: TISÍC DVĚ STĚ TŘICET ČTYŘI`\
  12345\
  12 345\
  `Both numbers are pronounced as: DVANÁCT TISÍC TŘI STA ČTYŘICET PĚT`\
  123456\
  123 456\
  `Both numbers are pronounced as: STO DVACET TŘI TISÍC ČTYŘI STA PADESÁT ŠEST`<br>

* If digits have **7 or more characters**, they are read **decadically** only if the order of thousands is **separated by a space.** Numeric string notation **without spaces defaults to reading each digit in turn.**\
  \
  1234567 `is pronounced JEDEN DVA TŘI ČTYŘI PĚT ŠEST SEDM`\
  1 234 567 `is pronounced MILION DVĚ STĚ TŘICET ČTYŘI TISÍC PĚT SET ŠEDESÁT SEDM`\
  123456789 `is pronounced JEDEN DVA TŘI ČTYŘI PĚT ŠEST SEDM OSM DEVĚT`\
  123 456 789 `is pronounced STO DVACET TŘI MILIONÚ ČTYŘI STA PADESÁT ŠEST TISÍC SEDM SET OSMDESÁT DEVĚT`

* If we need **shorter numbers to be read each digit in turn**, there are several ways to do it\
  **A.** Add spaces in between\
  1 2 3 4 5 6 `is pronounced JEDEN DVA TŘI ČTYŘI PĚT ŠEST`\
  \
  **B.** Add commas in between\
  1, 2, 3, 4, 5, 6 `is pronounced JEDEN DVA TŘI ČTYŘI PĚT ŠEST with more distinct pauses between each of them`\
  \
  **C.** Use SSML alias for spelling (hláskování)\
  \<say-as interpret-as="spell" format="undefined">123456\</say-as> `is pronounced JEDEN DVA TŘI ČTYŘI PĚT ŠEST`

* If we need **longer number to be read each digit in turn**, copywriting input needs to be adapted accordingly\
  \
  **A.** Use numeric string without spaces\
  1234567890\
  \
  **B.** Separate each digit with spaces\
  1 2 3 4 5 6 7 8 9\
  \
  **C.** Separate each digit with interpunction\
  1,2,3,4,5,6,7,8,9\
  \
  These numbers will be pronounced as `JEDEN DVA TŘI ČTYŘI PĚT ŠEST SEDM OSM DEVĚT`
  {% endtab %}

{% tab title="SK" %}
:flag\_sk: Slovak language

* If digits have **fewer than or exactly 6 digits**, they are always r**ead decadically as default**, regardless of whether a space separates orders of thousands.

> > 123456\
> > 123 456\
> > `Both numbers are pronounced as: stodvadsaťtri tisíc štyristo päťdesiatšesť`

* If digits have **7 or more characters**, they are read **decadically** only if the order of thousands is **separated by a space.** Numeric string notation **without spaces defaults to reading each digit in turn.**

> > 1234567 `is pronounced [jedna dva tri štyri päť šesť sedem]`\
> > 1 234 567 `is pronounced [jeden milión dvestotridsaťštyri tisíc päťsto šesťdesiatsedem]`

* **The maximal length of spaced numerical string which is pronounced decadically is 15 digits** (10^14), in EN system for hundreds of trillions, in SK **stovky bilionov**.

> > 111 222 333 444 555\
> > `is pronounced [sto jedenásť biliónov ...]`

* Spaced numerical strings **longer than 15 digits are pronounced as multiple numbers,** each containing 15 digits of less

> > 111 222 333 444 555 666 will be divided as 111 222 333 444 555 | **666**\
> > `[sto jedenásť biliónov ... päťstopäťdesiatpäť | šesťstopäťdesiatšesť`

* If we need **shorter numbers to be read each digit in turn**, there are several ways to do it

> > Add spaces in between\
> > 1 2 3 4 5 6 `is pronounced jedna dva tri štyri päť šesť`

> > Add commas in between\
> > 1, 2, 3, 4, 5, 6 `is pronounced jedna dva tri štyri päť šesť with more distinct pauses between each of them`

> > Use SSML says-as for spelling (hláskování)\
> > \<say-as interpret-as="spell" format="undefined">123456\</say-as> `is pronounced jedna dva tri štyri päť šesť`

* If we need **longer number to be read each digit in turn**, copywriting input needs to be adapted accordingly

> > Use numeric string without spaces\
> > 1234567890

> > Separate each digit with spaces\
> > 1 2 3 4 5 6 7 8 9

> > Separated each digit with interpunction\
> > 1,2,3,4,5,6,7,8,9

> These number will be pronounced as `jedna dva tri štyri päť šesť sedem osem deväť`

<br>
{% endtab %}

{% tab title="EN" %}
:flag\_gb: English language

* If digits have **fewer than or exactly 6 digits**, they are always r**ead decadically as default**, regardless of whether orders of thousands are separated by a space.

> > 1234\
> > 1 234\
> > `Both numbers are pronounced as: [one thousand two hundred thirty-four]`\
> > 12345\
> > 12 345\
> > `Both numbers are pronounced as: [twelve thousands three hundred and forty-five]`\
> > 123456\
> > 123 456\
> > `Both numbers are pronounced as:[one hundred twenty-three thousands four hundred fifty-six]`

* If digits have **7 or more characters**, they are read **decadically** only if the order of thousands is **separated by a space.** Numeric string notation **without spaces defaults to reading each digit in turn.**

> > 1234567 `is pronounced [one two three four five six seven]`\
> > 1 234 567 `is pronounced [one million two hundred twenty-three thousands five hundred sixty-seven]`

* **The maximum length of spaced numerical string which is pronounced decadically is 15 digits** (10^14), in EN system for hundreds of trillions.

> > 111 222 333 444 555\
> > `is pronounced [ one hundred and eleven trillion...]`

* Spaced numerical strings **longer than 15 digits are pronounced as multiple numbers,** each containing 15 digits of less

> > 111 222 333 444 555 666 will be divided as 111 222 333 444 555 | **666**\
> > `[one hundred and eleven trillion ... five hundred fifty five | six hundred sixty six]`

* If we need **shorter numbers to be read each digit in turn**, there are several ways to do it

> > Add spaces in between\
> > 1 2 3 4 5 6 `is pronounced [one two three four five six]`

> > Add commas in between\
> > 1, 2, 3, 4, 5, 6 `is pronounced one two three four five six with more distinct pauses between each of them`

> > Use SSML alias for spelling (hláskování)\
> > \<say-as interpret-as="spell" format="undefined">123456\</say-as> `is pronounced one two three four five six`

* If we need **longer number to be read each digit in turn**, copywriting input needs to be adapted accordingly

> > Use numeric string without spaces\
> > 1234567890\
> > `[one two three four five six seven eight nine zero]`

> > If all subsequent triplets are made with 000, the string is read decadically even without spaces
> >
> > * 100000 - `[one million]`
> > * 1100000 - `[eleven million]`
> > * 111000000 - `[one hundred eleven million]`
> > * 2000000000 - `[two billion]`
> > * 123000000000000 - `[one hundred twenty-three trillion]`

> > But when zeros cannot be divided into triplets, the numerical string is pronounced one digit at a time
> >
> > * 123100000000000 - `[one two three one zero zero zero ... ]`

* If we need **longer numbers to be read decadically**, divide orders of thousands, millions, billions, trillions by space

> > - 1 234 567 - `[one million to hundred thirty-four thousands five hundred sixty-seven]`
> > - 123 000 000 000 001 - `[one hundred twenty-three trillion and one]`

{% endtab %}

{% tab title="PL" %}
:flag\_pl: Polish language<br>

* If digits have **exactly 4 digits.**

> > **A.** If we have numbers 1000, 2000, 3000, etc. The numbers are read by Azure neural voices as:\
> > 1000 - `tysięczny rok` – year one thousand\
> > 2000 - `dwutysięczny rok` – year two thousand\
> > 3000 - `trzytysięczny rok` - year three thousand etc. - This is **WRONG.**\
> > \
> > It should be pronounced as:\
> > 1000 - `tysiąc`\
> > 2000 - `dwa tysiące`\
> > 3000 - `trzy tysiące`

This situation can also occur with other numbers, for example 4999 is pronounce as\
`cztery tysiące dziewięćset dziewięćdziesiąty dziewiąty rok` - this is **WRONG**.\
**CORRECT** is `cztery tysiące dziewięćset dziewięćdziesiąt dziewięć`.\
Every number needs to be checked!

> > **B.**

| **NUMBER** | **OK/NOK** |
| ---------- | ---------- |
| 1234       | OK         |
| 2234       | OK         |
| 3234       | OK         |
| 4234       | OK         |
| 5234       | NOK        |
| 6234       | NOK        |
| 7234       | NOK        |
| 8234       | NOK        |
| 9234       | NOK        |

1..., 2..., 3..., 4... (thousand) are pronounced **CORRECT**.

5..., 6..., 7..., 8..., 9... (thousand) are pronounced **WRONG**.

5324 – `pięć TYSIĄCE` - correct is `pięć TYSIĘCY`

6234 - `sześć TYSIĄCE` - correct is `sześć TYSIĘCY`

7324 – `siedem TYSIĄCY` - correct is `siedem TYSIĘCY`

8324 - `osiem TYSIĄCE` - correct is `osiem TYSIĘCY`

9324 - `dziewięć TYSIĄCE` - correct is `dziewięć TYSIĘCY`
{% endtab %}
{% endtabs %}

### Phone numbers

{% tabs %}
{% tab title="CZ" %}
:flag\_cz: Czech language

For the pronunciation of **telephone numbers:**

> > **A.** Write them down in iso format including prefix\
> > Volejte +420 800 148 148\
> > `is pronounced VOLEJTE PLUS ČTYŘI STA DVACET, OSM SET, STO ČTYŘICET OSM, STO ČTYŘICET OSM`

> > **B.** Separate custom sections with interpunction\
> > Volejte 800, 148, 148\
> > `is pronounced OSM SET, STO ČTYŘICET OSM, STO ČTYŘICET OSM`\
> > Volejte 212-456-789\
> > `is pronounced DVĚ STĚ DVANÁCT, ČTYŘI STA PADESÁT ŠEST, SEDM SET OSMDESÁT DEVĚT`\
> > Volejte 800, 54, 12, 12\
> > `is pronounced OSM SET, PADESÁT ČTYŘI, DVANÁCT, DVANÁCT`\
> > Volejte 800, 12, 7, 7, 7. 7\
> > `is pronounced OSM SET, DVANÁCT, SEDM, SEDM, SEDM, SEDM`

> > **C.** Write them down as alphabetical string\
> > Volejte osm set dvanáct čtyři sedmničky\
> > Volejte osm set dvanáct sedm sedm sedm sedm

> > **D.** Separate sections with spaces, as long it's meant to be pronounced in 3-2-2-2 or 3-2-1-1-1-1\
> > 800 54 12 12\
> > `is pronounced OSM SET, PADESÁT ČTYŘI, DVANÁCT, DVANÁCT`\
> > 800 54 1 2 1 2\
> > `is pronounced OSM SET, PADESÁT ČTYŘI, JEDNA, DVA, JEDNA, DVA`

<br>
{% endtab %}

{% tab title="SK" %}
:flag\_sk: Slovak language

For the pronunciation of **telephone numbers:**

> > **A.** Write them down in iso format including prefix\
> > Volajte +421 800 148 148\
> > `is pronounced VOLAJTE PLUS ŠTYRI DVA JEDEN, OSEMSTO, STOŠTYRIDSAŤOSEM, STOŠTYRIDSAŤOSEM`

> > **B.** Separate custom sections with interpunction\
> > Volejte 800, 148, 148\
> > `is pronounced OSEMSTO, STOŠTYRIDSAŤOSEM, STOŠTYRIDSAŤOSEM`\
> > Volejte 800-148-148\
> > `is pronounced OSEMSTO, STOŠTYRIDSAŤOSEM, STOŠTYRIDSAŤOSEM`\
> > Volejte 800, 54, 12, 12\
> > `is pronounced OSEMSTO, PÄŤDESIATŠTYRI, DVANÁSŤ, DVANÁSŤ`\
> > Volejte 800, 12, 7, 7, 7. 7\
> > `is pronounced OSEMSTO, DVANÁSŤ, SEDEM, SEDEM, SEDEM, SEDEM`

> > **C.** Write them down as alphabetical string\
> > Volajte na osemsto dvanásť štyri siedmičky\
> > Volajte na osemsto dvanásť sedem sedem sedem sedem

<br>
{% endtab %}

{% tab title="EN" %}
:flag\_gb: English language

For the pronunciation of **telephone numbers:**

> > **A.** Write them down in iso format including prefix\
> > Call +1-212-456-7890 (USA)\
> > `is pronounced [call plus one - two one two - four five six - seven eight nine zero]`\
> > Call +44 7911 123456 (UK)\
> > `is pronounced [call plus four four, seven nine one one, one two three four five six]`

> > **B.** For USA, obey domestic 3-3-4 format\
> > Call 212-456-7890\
> > `is pronounced [call one - two one two - four five six - seven eight nine zero]`

> > **C.** For the UK, obey area code formatting ( 3-4 digits + 8-7 digits)\
> > 020 (London) 1234 5676\
> > `is pronounced [zero two zero, one two three four, five six seven eight]`

> > **D.** To customize pronunciation, separate digits with spaces or punctuation\
> > Call 4 4 4 4, 1 2 3, 1 2 3\
> > `is pronounced [call four four four four, one two three, one two three] with more distinctive pauses between comma-separated sections`\
> > Call 800, 12, 34, 12, 34\
> > `is pronounced [call eight hundred, twelve, thirty- four, twelve, thirty-four]`\
> > Call 800 12 34 12 34\
> > `is pronounced [call eight hundred one two three four one two thirty-four`

> > **E.** For 10-digit phone number (prefix not included), you can use SSML alias with attribute\
> > \<say-as interpret-as="telephone" format="undefined">1234567890\</say-as>\
> > `[one two three four five six seven eight nine o]`

<br>
{% endtab %}
{% endtabs %}

### Long numerical strings (IDs, codes)

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

#### :flag\_cz: Czech language

For pronunciation of long numerical strings (order IDs etc.):

> > **A.** Write numerical strings without spaces to be read one digit in turn\
> > Objednávka 01304578931\
> > `Objednávka NULA JEDNA TŘI NULA ČTYŘI PĚT SEDM OSM DEVĚT TŘI JEDNA`

> > **B.** Customize pronunciation by breaking it into smaller chunks with interpunction\
> > Objednávka 01, 30, 45, 78, 9-3-1\
> > `Objednávka NULA JEDNA, TŘICET, ČTYŘICET PĚT, SEDMDESÁT OSM, DEVĚT TŘI JEDNA`

<br>
{% endtab %}

{% tab title="SK" %}
:flag\_sk: Slovak language

For pronunciation of long numerical strings (order IDs etc.):

> > **A.** Write numerical strings without spaces to be read one digit in turn\
> > Objednávka 01304578931\
> > `Objednávka NULA JEDEN TRI NULA ŠTYRY PÄŤ SEDEM OSEM DEVÄŤ TRI JEDEN`

> > **B.** Customize pronunciation by breaking it into smaller chunks with interpunction\
> > Objednávka 01, 30, 45, 78, 9-3-1\
> > `Objednávka NULA JEDEN, TRIDSAŤ, ŠTYRIDSAŤPÄŤ, SEDEMDESIAŤOSEM, DEVÄŤ TRI JEDEN`
> > {% endtab %}

{% tab title="EN" %}
:flag\_gb: English language

For pronunciation of long numerical strings (order IDs etc.):

> > **A.** Write numerical strings without spaces to be read one digit in turn\
> > Order 01304578931\
> > `[o one three o four five seven eight one three one]`

> > **B.** Customize pronunciation by breaking it into smaller chunks with interpunction\
> > Order 01, 30, 45, 78, 9-3-1\
> > `[zero one, thirty, forty-five, seventy-eight, nine three one]`

<br>
{% endtab %}
{% endtabs %}

### Numeric date notation

{% tabs %}
{% tab title="CZ" %}
:flag\_cz: Czech language\
\
Dates are **pronounced correctly by default when put down in ISO format:**

> > **A.** ISO DD-MM-YYY\
> > 01-11-1995\
> > 1-11-1995\
> > `Pronounced as [1. listopadu 1995]`

> > **B.** ISO YYYY-MM-DD\
> > 1995-11-01\
> > 1995-11-1\
> > `Pronounced as [1. listopadu 1995]`

> > **C.** ISO DD.MM.YYYY\
> > datum 01.11.1995\
> > datum 01. 11. 1995\
> > datum 1.11.1995\
> > datum 1. 11. 1995\
> > `Pronounced [as 1. listopadu 1995]`

\
A safe and simple way is to **transcribe the date alphanumerically:**

> > datum 1. listopadu 1995\
> > prvního listopadu 1995\
> > `Pronounced as [1. listopadu 1995]`

> > prvního jedenáctý 1995\
> > `Pronounced as [prvního jedenáctý 1995]`

\
These formats **WON'T WORK** and will be pronounced incorrectly, even if tagged with SSML alias reading rules for dates

> > * DD.MM - 1.11. - `[jedna hodina jedenáct minut]`
> > * DD. MM - 1. 11. - `[první jedenáctý]`
> > * DD/MM - 01/11 - `[nula jedna lomítko jedenáct]`
> > * DD/MM/YYYY - 01/11/1995, 1/11/1995 - `[nula jedna lomítko jedenáct lomítko 1995]`
> > * SSML alias reading rules not supported

To be pronounced correctly, dates containing **only date + month** must be written manually

> > prvního listopadu\
> > dne 2. listopadu\
> > 31\. března\
> > 17\. listopad<br>
> > {% endtab %}

{% tab title="SK" %}
:flag\_sk: Slovak language

Dates are **pronounced correctly by default when put down in ISO format**

> > **A.** ISO DD-MM-YYY\
> > 01-11-1995\
> > 1-11-1995\
> > `Pronounced as [1. novembra 1995]`

> > **B.** ISO YYYY-MM-DD\
> > 1995-11-01\
> > 1995-11-1\
> > `Pronounced as [1. novembra 1995]`

> > **C.** ISO DD.MM.YYY\
> > datum 01.11.1995\
> > datum 01. 11. 1995\
> > datum 1.11.1995\
> > datum 1. 11. 1995\
> > `Pronounced [as 1. novembra 1995]`

\
Safe and simple way is to **transcribe date alphanumerically**

> > dátum 1. novembra 1995\
> > prvého novembra 1995\
> > `Pronounced as [1. novembra 1995]`

> > prvého jedenástý 1995\
> > `Pronounced as [prvého jedenástý 1995]`

\
These formats listed below **WON'T WORK** and will be pronounced incorrectly, even if tagged with SSML alias reading rules for dates

> > * DD.MM - 1.11. - `[jedna hodina jedenásť minút]`
> > * DD. MM - 1. 11. - `[prvý jedenásť]`
> > * DD/MM - 01/11 - `[nula jeden lomka jedenásť]`
> > * DD/MM/YYYY - 01/11/1995, 1/11/1995 - `[jeden lomka jedenásť lomka 1995]`
> > * SSML alias reading rules not supported
> >   {% endtab %}

{% tab title="EN" %}
:flag\_gb: English language

Dates are **pronounced correctly by default when put down in ISO format**

> > **A.** ISO DD-MM-YYY\
> > 01-11-1995\
> > 1-11-1995\
> > `Pronounced as [the first of November 1995]`

> > **B.** ISO YYYY-MM-DD\
> > 1995-11-01\
> > 1995-11-1\
> > `UK and US: Pronounced as [the first of November 1995]`

> > **C.** ISO DD.MM.YYY\
> > date 01.11.1995\
> > datum 1.11.1995\
> > `UK: Pronounced as [the first of November 1995]`\
> > `US: Pronounced as [January eleventh 1995]`

> > **D.** ISO DD/MM/YYYY and YYYY/MM/DD\
> > 01/11/1995\
> > 1995/11/01\
> > `UK: Pronounced as [the first of November 1995]`\
> > `UK: Pronounced as [Janualy eleventh 1995]`

> > **D.** Also\
> > Nov,1st 1995\
> > November 1st 1995\
> > `Pronounced as [November first, 1995]`\
> > 1 November 1995\
> > 1 Nov 1995\
> > 1st November 1995\
> > `Pronounced as [the fist of November 1995]`

\
These inputs **WON'T BE pronounced correctly**

* 1 st November 1995 - `[one es tee November 1995]`

* date 1. November 1995 - `[one November 1995]`

* November, 1. 1995 - `Pronounced as [November one 1995]`

* 01/11 (EN-UK voices) - `[zero one eleventh]`

* 1.11.1995 - `[one. eleven. 1995]`

* Be mindful of US date format MM/DD

> > - 01/11 (EN-US voices) - `[January the eleventh]`\ <br>

* Various **SSML tag says-as formats** of attribute date **are supported**

> > - **DMY**  - `US:[November 1st 1995]` , `UK:[the first of November 1995]`
> > - **MDY**: \<say-as interpret-as="date" format="mdy">1/11/1995\</say-as>- `US:[January 11th 1995]` , `UK:[the 11th of January 1995]`
> > - **MD**: \<say-as interpret-as="date" format="md">1/11\</say-as> - `US:[January 11th]` , `UK:[the 11th of January]`
> > - **DM**: \<say-as interpret-as="date" format="dm">1/11\</say-as>- `US:[November 1st]` , `UK:[the 1st of November]`
> > - **MY**: \<say-as interpret-as="date" format="my">11/1995\</say-as>- `US, UK:[November 1995]`¨
> > - **YM**: \<say-as interpret-as="date" format="ym">1995/11\</say-as>- `US, UK:[November 1995]`
> >   {% endtab %}
> >   {% endtabs %}

### Time notation

{% tabs %}
{% tab title="CZ" %}
:flag\_cz: Czech language&#x20;

Standard **iso format is supported and is pronounced as time correctly by default**

> > * HH:mm - 15:52 - `[Patnáct hodin padesát dvě minuty]`
> > * HH:mm:ss - 15:52:25 - `[Patnáct hodin padesát dva minut dvacet pět sekund]`
> > * HH.mm - 15.52 - `[Patnáct hodin padesát dva minut]`

\
**Whole hours**, even if written down digital, a**re pronounced as analog time**

> > * HH:00 - 15:00 - `[Patnáct hodin]`
> > * HH:00:00 - 15:00:00 - `[Patnáct hodin]`

\
**The Czech SI unit system IS&#x20;**<mark style="color:red;">**NOT SUPPORTED**</mark>

> > Won't pronounce *hod* or *h* as hodin/hodiny\
> > 15 hod - `[patnáct hod]`\
> > 15 h - `[patnáct há]`\
> > Won't pronounce *min* or *mins* as minut/minuty\
> > 15 min - `[patnáct min]`\
> > 15 hod 15 min - `[patnáct hod patnáct min]`

\
In case you need **time to be pronounced as analog** or Czech SI units to be pronounced correctly, it is necessary **to transcribe your input**

> > * 15 hod → 15 hodin
> > * 15 min → 15 minut
> > * 2 min → 2 minuty
> > * 15:15 → čtvrt na čtyři | čtvrt na čtyři
> > * 12:00 → poledne
> > * 12:30 → půl jedné odpoledne
> >   {% endtab %}

{% tab title="SK" %}
:flag\_sk: Slovak language

Standard **iso format is supported and is pronounced as time correctly by default**

> > * HH:mm - 16:10 - `[šesťnásť hodín desať minút]`
> > * HH:mm:ss - 16:10:10 - `[šesťnásť hodín desať minút desať sekúnd]`
> > * HH.mm - 16.10 - `[šestnásť hodín desať minút]`

\
**Whole hours**, even if written down digitally, **are pronounced as analog time**

> > * HH:00 - 16:00 - `[šestnásť hodín]`
> > * HH:00:00 - 16:00:00 - `[šestnásť hodín]`

\
Slovak SI unit system **IS SUPPORTED** only for *hod* and *min*

> > 16 hod - `[16 hodín]`\
> > 15 min - `[15 minút]`\
> > 15 h 10 min - `[15 hodín 10 minút]`

> > Won't read properly other SI formats such as\
> > 16 h - `[16 h]`\
> > 10 s - `[15 s]`\
> > 10 sek - `[10 sek]`

> > If you need word *seconds* to be pronounce, write that down manually\
> > 16 hod 10 min 10 sekúnd - `[16 hodín 10 minút 10 sekúnd]`

\
In case you need **time to be pronounced as analog** or Slovak SI units to be pronounced correctly, it is necessary **to transcribe your input**

> > * 15:15 → štvrť na štyri
> > * 12:00 → poludnie
> > * 12:30 → pôl jednej
> > * 10 s → 10 sekúnd
> > * po 8:00 → po osmej hodine
> >   {% endtab %}

{% tab title="EN" %}
:flag\_gb: English language

Standard ISO format is supported and pronounced correctly by default:

> > * 15:15 → quarter past three
> > * 12:00 → at noon
> > * 12:30 → half past twelve
> > * 10 s → 10 seconds
> > * around 8 - around 8-ish

In case you need **time to be pronounced as analog** or time notation to be pronounced correctly, it is necessary **to transcribe your input:**

> > **A.** 10 o'clock\
> > `[10 o'clock]`

> > **B.** 10:00 AM\
> > 10 a.m.\
> > 10 AM\
> > `[10 A. M.]`

Also, other formats of time are supported:

> > **A.** HH:mm:ss\
> > 10:50:10\
> > `[10 hours 5 minutes and 20 seconds]`

> > **B.** HH:mm\
> > 15:00\
> > `UK,US: [three P.M.]`\
> > 10:00\
> > `UK, US: [ten o'clock]`\
> > 10:45\
> > `UK, US: [ten forty five]`

:white\_check\_mark: Standard ISO format is supported and pronounced correctly by default.
{% endtab %}
{% endtabs %}

***

## Customizing speech synthesis of variables

A variable is a named storage location that holds a value in computer programming. It is a fundamental concept used to store and manipulate data within a program. In the context of voicebots and speech applications, variables can be used to store and retrieve information that is relevant to the conversation or user interaction.

#### General use

To use variables in the speech output of a voicebot, you need to **incorporate the variable values** within the text that the voicebot will read out loud (in the Message node, fill in the Speech window).&#x20;

General approach:

1. **Define and store the variable values**: In your voicebot's code or script, define and store the necessary variable values based on user input or other relevant data. For example, you might have a variable named *customer\_name* that stores the user's name.
2. **Construct the speech output text**: Craft the message, and include the variable values where appropriate.
3. &#x20;**Set Speech in Message node**: Paste the constructed speech input for the text-to-speech engine to convert it into audible speech. Your digital assistant will then speak the generated text, incorporating the variable values dynamically.

<figure><img src="/files/zGweXUE6O1pJ7N52HugW" alt=""><figcaption></figcaption></figure>

### Common problems and FAQ

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="1f92f">🤯</span> Why does the neural voice in Azure Audio Content Creator tool spell out every variable as <em>left curly bracket [...]  right curly bracket</em>?</summary>

In Azure Speech Studio's Audio Content Creator, modifying the intonation on the pronunciation of variables in text-to-speech (TTS) output can be challenging due to the following:

* **The audio content creator tool is not connected to your database, so variables are not filled with values, therefore your variable names are considered as common words.** Reading out the literal characters occurs when text-to-speech encounters special characters, such as curly brackets, which are often used in programming languages.
* Dynamic nature of variables: Variables can hold a wide range of values, including names, numbers, or user-generated input. Each variable may require unique intonation patterns or pronunciation rules, making it challenging to create a one-size-fits-all approach within the TTS system.
* Lack of context awareness: Text-to-speech engines typically treat variables as plain text and lack the contextual understanding of the variable's meaning. As a result, it becomes difficult to apply nuanced intonation or pronunciation adjustments specifically to variable content.
* Limited SSML support for variable manipulation: While SSML (Speech Synthesis Markup Language) provides a range of tags and attributes to control TTS output, it may have limited support for manipulating variables. SSML tags are primarily designed to modify the speech synthesis process and don't always provide direct control over variable pronunciation or intonation.
* Pre-trained voice limitations: In some cases, if the TTS output is based on pre-recorded voice samples, modifying the intonation or pronunciation of variables may not be feasible as the pre-recorded voice may not have the necessary flexibility to handle variable-specific modifications.

Addressing these challenges often requires a deeper level of customization and integration within the TTS system. It may involve leveraging advanced techniques like custom voice models, data-driven synthesis, or **employing specific programming logic to manipulate variable-specific intonation patterns.**

</details>

<details>

<summary>Why do I cannot use &#x3C;alias> SSML tags on part of a speech with a variable in it?</summary>

Since variable values are dynamic, there's no point in replacing them with a single alias. Synthesized message would always be the same regardless of the variable's value.

</details>

<details>

<summary>Why is it challenging to customize the synthesis intonation of text with variables?</summary>

Variable values might significantly vary in length and therefore the rhythm of speech, the number of syllables, vowel content and a prosody of a sentence is a slightly different with every case.

```

SPEECH input: Jste prosím {gender] {name_surname}?

Possible text-to-speech outputs:
Jste prosím pan Jan Kár?
Jste prosím pan Ivo Krč?
Jste prosím pan Pavel Novák?
Jste prosím paní Eva Černá?
Jste prosím paní Eliška Drahokoupilová?
Jsem prosím Filémína Strčskrzprstová?
Jste prosím pan Květoslav Podhorodecký?
[...]
```

Only way to handle this situation is to temporarily substitute variables with some dummy values as examples.

<img src="/files/WGlwrQtuIcXdtPlkvfTx" alt="" data-size="original">\
\
:bulb: **Try various intonation curves until finding one configuration that is acceptable on all dummy cases.**&#x20;

</details>


# Customizing text output

Unleash the power of personalization as you sculpt your message to perfection with Markdown, tailoring fonts, colors, and styles for a polished and unique presentation.

## Elevate plain text with Markdown

Our chatbot messages are now equipped with Markdown support, allowing for seamless plain text formatting to enhance the visual appeal and clarity of your conversations.

<figure><img src="/files/AjRDu2Bb9MVCkVIO1obI" alt=""><figcaption><p>Use markdown on input to craft the output in chatbot bubbles.</p></figcaption></figure>

With this feature, you have the power to emphasize key points through **bold** or *italicized* text, create structured lists, format tables for organized data presentation, and even embed clickable links, images, or GIFs to enrich the user experience. Whether you're conveying information, adding a touch of style, or guiding users through a more interactive dialogue, our Markdown support ensures that your chatbot messages are not only informative but also visually engaging.

{% hint style="info" %}
**Wondering what Markdown is?** \
It's a simple markup language that allows you to format plain text. Here's a handy cheat sheet recommended by our linguists :point\_right: [Markdown Cheat Sheet](https://www.markdownguide.org/cheat-sheet/)! :point\_left: Make sure to add it to your bookmarks.
{% endhint %}

Elevate the communication experience with the flexibility and versatility that Markdown brings to plain text formatting in our chatbot messages:<br>

<details>

<summary><strong>Bold</strong> text</summary>

Just select the text and press CTRL + B!

<img src="/files/fnU747XuLH0o0tAyD60E" alt="" data-size="original">

\
Or, using Markdown format, making text **bold** is achieved using double asterisks (\*\*). Simply wrap the desired text with these symbols to apply bold formatting.&#x20;

Here's a quick guide:

{% code title="Copy this exemple" %}

```
I want the following text to be **bold**.
```

{% endcode %}

## <img src="/files/8Z1Njr6Lc7oXpNIJTn5i" alt="" data-size="original">

</details>

<details>

<summary><em>Italic</em> text</summary>

Just select the text and press CTRL + I!

<img src="/files/MZrf0wlyA5NmXeYnwF7X" alt="" data-size="original">

\
Or, to apply *italic* formatting to text in Markdown, you can use single asterisks (\*). Simply enclose the desired text with these symbols to render it in italics.&#x20;

Here's a straightforward guide:

{% code title="Copy this example" overflow="wrap" %}

```
This text is normal, but *this text will appear italicized.*
```

{% endcode %}

<img src="/files/ZiSRazCpDzAX0Pjj0iNs" alt="" data-size="original">

</details>

<details>

<summary>Underscored text</summary>

Just select the text and press CTRL + U!

<img src="/files/mDm9CBwyc75nzTqc9T5O" alt="" data-size="original">

</details>

<details>

<summary><del>Striketrough</del> text</summary>

Adding a ~~strikethrough~~ effect to text in Markdown is a straightforward process. To implement strikethrough formatting, use two tilde characters (\~\~) before and after the text you want to strike through.&#x20;

Here's a simple example:

{% code title="Example to copy" overflow="wrap" %}

```
~~This text will appear with a strikethrough.~~
```

{% endcode %}

<img src="/files/4MD3VSL1CDLrVHMxrTE8" alt="" data-size="original">

</details>

<details>

<summary>Ordered list</summary>

Markdown makes it easy to organize content into **ordered lists**. Follow these simple steps to create a numbered list:

1. Start each list item with a number followed by a period (1., 2., 3., ...).
2. Leave a space after the period.
3. Write the text for each list item.

Here's an example:

{% code title="Example to copy" overflow="wrap" %}

```
My list:
1. First item
2. Second item
3. Third item
```

{% endcode %}

<img src="/files/fpsLe5ZvFtlPRkKkmwi7" alt="" data-size="original">

You can also create nested ordered lists by indenting **the nested list** items. \
For instance:

{% code title="Example to copy" overflow="wrap" %}

```
My list:
1. First item
   1. Nested item 1
   2. Nested item 2
2. Second item
3. Third item
```

{% endcode %}

<img src="/files/6sRhSTx0b9GoHCNoIUHS" alt="" data-size="original">

</details>

<details>

<summary>Unordered list (bullet points)</summary>

Markdown provides a simple syntax for generating **unordered (bulleted) lists**. Follow these steps to create a list of items with bullet points:

* Start each list item with an asterisk (\*), plus sign (+), or a hyphen (-).
* Leave a space after the asterisk, plus sign, or hyphen.
* Write the text for each list item.

Here's an example using hyphens:

{% code title="Example to copy" overflow="wrap" %}

```
My list:
- First item
- Second item
- Third item
```

{% endcode %}

However, you can mix using an asterisk, a plus sign and a hyphen within a single list. The output will always be rendered as bullets:

{% code title="Example to copy" overflow="wrap" %}

```
My list:
- First item
+ Second item
* Third item
```

{% endcode %}

<img src="/files/TkoA41uOmCIoyHDV3L1J" alt="" data-size="original">

To create **nested unordered lists**, indent the nested list items:

<pre data-title="Example to copy" data-overflow="wrap"><code><strong>My list:
</strong><strong>- First item
</strong>- Second item
- Third item
    - Nested item
    - Nestem item
</code></pre>

<img src="/files/oBWUAFQWm7migVlzMkhw" alt="" data-size="original">

</details>

<details>

<summary>Checklist</summary>

Markdown allows you to create **checklists** easily. Follow these steps to include checklists in chatbot messages:

1. Use square brackets `[]` for an unchecked item and `[x]` for a checked item.
2. Place the brackets at the beginning of a line, followed by a space and the task description.

Here's an example of a simple checklist:

<pre data-title="Example to copy" data-overflow="wrap"><code><strong>- [ ] Task 1
</strong>- [x] Task 2 (completed)
- [ ] Task 3
</code></pre>

You can also nest checklists to create hierarchical structures:

{% code title="Example to copy" overflow="wrap" %}

```
- [ ] Main Task
  - [ ] Subtask 1
  - [x] Subtask 2 (completed)
    - [ ] Sub-subtask
```

{% endcode %}

<img src="/files/wqqBmQLdFJHWyDUAwpEd" alt="" data-size="original">

</details>

<details>

<summary>Clickable link</summary>

In Markdown, generating **clickable links** is a fundamental feature. Follow these steps to include hyperlinks in your text:

1. Surround the anchor text you want to link with square brackets \[].
2. Immediately follow the square brackets with the URL enclosed in parentheses ().

Here's a simple example:

{% code title="General format" overflow="wrap" %}

```
[Text you want to show in chat buble](https://www.examplehyperlink.com)
```

{% endcode %}

{% code title="Example to copy" %}

```
To learn more about Born Digital, click [here](https://borndigital.ai/)
```

{% endcode %}

<img src="/files/Q0s8Zggw3wTbFe8qvBtK" alt="" data-size="original">

What you might not know is, that you can add a title to your link for additional information when users hover over it. Insert the title inside double quotes:

{% code title="Example to copy" overflow="wrap" %}

```
To learn more about Born Digital, click [here](https://borndigital.ai/ "This will lead you to Born Digital website")
```

{% endcode %}

<img src="/files/gsbYYRBzsHFfTjsdlvx6" alt="" data-size="original">

</details>

<details>

<summary>Embedded image/gif</summary>

Enhance the visual appeal of your chatbot messages by seamlessly incorporating **images or GIFs.** Follow these steps to insert multimedia elements:

1. Use an exclamation mark `!` to initiate the image syntax.
2. Enclose alternative text for accessibility within square brackets `[]`.
3. Follow the square brackets with the image or GIF URL enclosed in parentheses `()`.

Here's a basic example for an image:

{% code title="General format" overflow="wrap" %}

```
![Alt text](https://www.example.com/image.jpg)
```

{% endcode %}

{% code title="Example to copy" overflow="wrap" %}

```
![Here's a image of pikachu](https://www.postavy.cz/foto/pikachu-foto.jpg)
```

{% endcode %}

In the rendered output, the alt text will be displayed if the image cannot be loaded, and clicking on the image will open the specified URL.

<img src="/files/VZOWuNwdWRpsUEGjelnS" alt="" data-size="original">

For a GIF:

{% code title="General format" overflow="wrap" %}

```
![Alt text](https://www.example.com/animation.gif)
```

{% endcode %}

<pre data-title="Example to copy" data-overflow="wrap"><code><strong>![Here's a cute pikachu gif](https://media2.giphy.com/media/YRWLoMugTT2zQbPnYd/200.gif)
</strong></code></pre>

<img src="/files/jpnNFhRmb0HTXyDq6YBu" alt="" data-size="original">

:exclamation:**Ensure that the URLs point to the correct location of your images or GIFs.** Always copy and paste URLs of the image/gif itself (right click >> Copy image URL).

You can also include optional attributes, such as width and height, to control the size of the displayed media:

{% code title="General format" overflow="wrap" %}

```
![Alt text](https://www.example.com/image.jpg =300x200)
```

{% endcode %}

This sets the image dimensions to 300 pixels in width and 200 pixels in height.

</details>

<details>

<summary>Code block</summary>

To create **a code block** in Markdown, you can use backticks (\`) to enclose the code.&#x20;

Here's how you can do it:

#### Inline Code

For inline code, wrap your code with a single backtick on both sides:

<pre data-title="Example to copy" data-overflow="wrap"><code><strong>Here is some `inline code`.
</strong></code></pre>

In the rendered output, the text "inline code" will appear in a monospaced font.

####

#### Multi-Line Code Blocks

For multi-line code blocks, use triple backticks (\`\`\`) before and after the code block.&#x20;

{% code title="Example to copy" overflow="wrap" %}

````
```
a = "Hello world!"
print(a)
```
````

{% endcode %}

</details>

<details>

<summary>Table</summary>

Markdown provides a simple syntax for **creating tables.** Follow these steps to include tables in your chatbot messages:

1. Separate columns using vertical bars `|`.
2. Use hyphens `-` in the second line to denote the table's header row.
3. Separate each cell's content with vertical bars `|`.
4. Adjust the number of hyphens in the header row to match the number of columns.

Here's an example of a basic table:

{% code title="Example to copy" overflow="wrap" %}

```
| Header 1 | Header 2 | Header 3 |
| ---------|--------- | ---------|
| Content 1| Content 2| Content 3|
| Content 4| Content 5| Content 6|
```

{% endcode %}

You can also align the content within the cells by using colons `:`. For example, to centre-align text in the second column:

{% code title="Example to copy" overflow="wrap" %}

```
| Left-aligned | Center-aligned | Right-aligned |
| :----------- |:--------------:| -------------:|
| Content 1    | Content 2      | Content 3     |
```

{% endcode %}

<img src="/files/kJ3LT9ELObNrniUrKKIz" alt="" data-size="original">

<br>

</details>

<details>

<summary>Horizontal divider</summary>

Markdown allows you to insert **horizontal dividers** to visually separate sections of your content. Follow these steps to add a horizontal rule:

1. Use three hyphens `---`, three asterisks `***`, or three underscores `___`.

Here's a simple example using hyphens:

{% code title="Example to copy" overflow="wrap" %}

```
Here's the text that's gonna be above the divider.

---

And this is gonna be below the horizontal divider.
```

{% endcode %}

Feel free to choose any of the three options (`---`, `***`, or `___`) for horizontal dividers, depending on your preference.

<img src="/files/fLzAoLtojyN91x2MlKom" alt="" data-size="original">

</details>

<details>

<summary>Footnote</summary>

Markdown supports the creation of footnotes to provide additional information or references. Follow these steps to include footnotes in your chatbot messages. This is useful for longer messages with several paragraphs of text:

1. Use a caret `[^]` followed by a unique identifier to mark the position for the footnote reference in the text.
2. At the end of your document or section, add the footnote content with the same identifier inside square brackets and a colon.

Here's an example:

{% code title="Example to copy" %}

```
This is a sentence with a footnote[^1].

[^1]: Here is the additional information or reference for the footnote.
```

{% endcode %}

<img src="/files/mHj1aimhvnQjCMMSt2u2" alt="" data-size="original">

</details>

<details>

<summary>Emoji</summary>

In chatbot output, we support emojis as Unicode characters. Just copy them in the Text input window in MSG NODE.

{% code title="Example to copy" %}

```
Hello, I am your AI assistant! 😊
```

{% endcode %}

<img src="/files/Ek9dkD32KGEolO00R2GF" alt="" data-size="original">

Tip: Browse [Emojipedia](https://emojipedia.org/) the find the right smiley face that will brighten your chatbot's messages :heart\_eyes::robot::sparkles:<br>

</details>


# Customizing smart functions output

In the realm of developing digital agents, the ability to tailor the output of smart functions is paramount.&#x20;

These [smart functions](https://born-digital.gitbook.io/born-digital-smart-documentation/), akin to miniature scripts, excel in extracting pertinent information from user utterances, be it named entities or other relevant data. However, the challenge lies in the diverse **formats of these outputs**, ranging from **arrays and dictionaries to simple strings or integers.**

The crux of the matter arises when integrating these extracted entities into the Digital agents's dialogue or synthesized speech, where naturalness and seamlessness are imperative. Thus, leveraging Python syntax, we adeptly mold the outputs from smart functions into variables, ensuring a fluid and natural conversation flow.

**Scenarios Requiring Presentation or Vocalization of Extracted Entities:**

1. **Confirmation Queries:**
   * "Did I understand correctly that your order number is {order\_id}?"
   * "Am I correct in assuming your interest lies in the opening hours of the branch in {city}?"
   * "Have I correctly noted that your name is {full\_name}?"
2. **Composing Email/SMS Texts for User Dispatch:**
   * "Confirming that your order with number {order\_id} will be dispatched to the address provided at {address}, under the name {full\_name}."
3. **Initiating Ticket Creation for Back Office Requests.**

## Address

When dealing with a smart function for `address` extraction, the output manifests in the form of a dictionary, with key-value pairs representing various address components such as city, street, etc. \
\
Let's say we extracted the address from the user's utterance *Send me the copy of the contract to Main Street 123 in Prague* and stored it in a variable named **`extracted_address`**.

<figure><img src="/files/lFkX7ufBF7HpdxtY20hp" alt=""><figcaption></figcaption></figure>

{% code title="extracted\_address" %}

```
{"city": "Prague", "street": "Main Street 123"}
```

{% endcode %}

To effectively utilize this data in textual contexts, we employ simple Python syntax to parse and store these values into separate variables.

To access individual components of the address, we utilize the following syntax:

* New variable name: **`street_to_read`**\
  New variable value:  `extracted_address["street"]`
* New variable name: **`city_to_read`**\
  New variable value: `extracted_address["city"]`

Subsequently, we integrate these variables into our text, ensuring a coherent and natural flow:

*"I've noted that you reside in {city\_to\_read}, specifically on {street\_to\_read}. Is that correct?"*

<figure><img src="/files/bQCdOdpETz0k2yXs5X8S" alt=""><figcaption></figcaption></figure>

**Notes:**

* If extraction of address fails, no output will be stored in `extracted_address`. Therefore, individual variables `street_to_read` and `city_to_read` won't be filled with values as well. Make sure MSG node, where entities are meant be be displayed/read back to user, is entered only under the condition that the address was extracted from user's utterance.
* With languages that use declination, be mindful when crafting message texts, since values in smart function output are always nomitative.\
  :flag\_cz: \
  &#x20;      Rozuměl jsem správně, že bydlíte v {city\_to\_read}? :x:\
  &#x20;      Rozuměl jsem správně, že bydlíte v Praha? :x:\
  &#x20;      Rozuměl jsem správně obec {city\_to\_read}? :white\_check\_mark:\
  &#x20;      Tozuměl jsem správně obec Hradec nad Moravicí? :white\_check\_mark:\
  &#x20;      Bydlíte v obci {city\_to\_read}? :white\_check\_mark:\
  &#x20;      Bydlíte v obci Kunčice? :white\_check\_mark:

***

## Advanced number

The smart function `advanced_number`  excels in consolidating and extracting numbers, typically returning the output as a string by default.

<figure><img src="/files/aTI6ifXmqIj6TxezzhGP" alt=""><figcaption></figcaption></figure>

For a **chatbot**, no customization is necessary. We can seamlessly integrate the extracted number variable into the dialogue text. For example:<br>

```
Text
Your order ID is {extracted_order_id}. Is that correct? 

```

<figure><img src="/files/9vX79Un0gq8mvoSzXM71" alt=""><figcaption></figcaption></figure>

However, for a **voicebot,** it's prudent to ensure that the number is dictated in a comprehensible manner. Dictating each digit individually and slowly allows the user ample time to verify the information.

To achieve this, we can split the order number into individual digits:

<figure><img src="/files/myjzsov4RIKOPRCgvHNt" alt=""><figcaption></figcaption></figure>

{% code title="order\_id\_digit\_by\_digit" %}

```python
", ".join(extracted_order_id)
```

{% endcode %}

This transforms "123456789" into "1, 2, 3, 4, 5, 6, 7, 8, 9.

<pre data-overflow="wrap"><code><strong>Speech input:
</strong>Your order ID is {order_id_digit_by_digit}. Is that correct?

Speech output:
Your order ID is 1, 2, 3, 4, 5, 6, 7, 8, 9. Is that correct?
</code></pre>

We then utilize this variable in the speech channel to ensure that the synthetic voice reads it slowly and distinctly, enhancing user comprehension.

<figure><img src="/files/L93TeAIjrdp56NlYOPtU" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
:bulb:**Pro-tip!**\
Additionally, [SSML](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis#ssml-tags) tags can be incorporated to further customize the reading speed and other aspects of the speech output.

{% code title="Speech" overflow="wrap" %}

```ssml
Your order ID is<prosody rate="-5.00%"><say-as interpret-as="spell-out"> {order_id_digit_by_digit}</say-as>.</prosody> Is that correct?
```

{% endcode %}
{% endhint %}

***

## Full name

Similar to address extraction, the output from the smart function for extracting `full_name` manifests as a dictionary, comprising key-value pairs representing the name and surname components.

Consider the scenario where the output from the smart function is stored in a variable named **`extracted_name`**.&#x20;

<figure><img src="/files/EA7zwC8p8sCg8gTkPsFW" alt=""><figcaption></figcaption></figure>

Output would look like this:

{% code title="extracted\_name" %}

```
{"name": "John", "surname": "Doe"}
```

{% endcode %}

To access individual components of the full name, we utilize the following syntax:

* New variable name: **`name_to_read`**\
  New variable value: `extracted_name["name"]`
* New variable name: **`surname_to_read`**\
  New variable value: `extracted_name["surname"]`

<figure><img src="/files/CowG1Wxdb51KwI1DfdAC" alt=""><figcaption></figcaption></figure>

Subsequently, we seamlessly integrate these variables into our text to ensure a cohesive and natural flow:

*"I've noted your name as {name\_to\_read} {surname\_to\_read}. Is that correct?"*<br>

<figure><img src="/files/8HsE5UwmEbxfwhosDTKm" alt=""><figcaption></figcaption></figure>

**Notes:**

* If extraction of `full_name` fails, no output will be stored in `extracted_name`. Therefore, individual variables `name_to_read` and `surname_to_read` won't be filled with values as well. Make sure MSG node, where entities are meant be be displayed/read back to user, is entered only under the condition that the full\_name was extracted from user's utterance.
* With languages that use declination, be mindful when crafting message texts, since values in smart function output are always nomitative.\
  :flag\_cz: Hovořím s {name\_to\_read} {surname\_to\_read}? Hovořím s Anna Nováková? :x:\
  &#x20;     Jste prosím {name\_to\_read} {surname\_to\_read}? Jste prosím Petr Novotný? :white\_check\_mark:

***

## Phone

The smart function `phone` for extracting phone numbers operates by adhering to the language settings configured within the project. It returns an array containing the extracted phone number with the appropriate prefix added, based on the language setting. For instance, for utterances in Czech, Polish, German, and other languages, the format may vary accordingly.

Let's assume the output array for the utterance "*Moje telefonní číslo je 123 456 789*" in Czech language configuration is as follows:

<figure><img src="/files/kR67PXXKEYPs27R7yUVb" alt=""><figcaption></figcaption></figure>

{% code title="extracted\_phone" %}

```python
['+421123456789']
```

{% endcode %}

To integrate this phone number into text, we extract it from the array and store it in a separate variable:

* New variable name: **`phone_to_read`**\
  New variable value: `extracted_phone[0]`

<figure><img src="/files/5LzCI1VpAaePXgBLH2Km" alt=""><figcaption></figcaption></figure>

Next, we use the `phone_to_read` variable in message text to be displayed in chat bubble or read aloud with speech synthesis.<br>

<figure><img src="/files/k6VZAuZZYj6ZjFmetw5o" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
:bulb: **Pro-tip!** \
When developing a **voicebo**t, it's essential to utilize SSML ([Speech Synthesis Markup Language](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis)) tags to ensure accurate pronunciation and appropriate pacing. This is particularly crucial for reading out phone numbers, where each digit should be pronounced individually rather than as a single number (e.g., "one two three four five six seven eight nine").

Additionally, incorporating SSML tags to slow down the speech rate can enhance clarity, especially for dictation purposes.

{% code title="Speech" overflow="wrap" %}

```ssml
I have noted <prosody rate="-10.00%"><say-as interpret-as="spell-out">{phone_to_read}</say-as></prosody> as your phone number. Is that correct? 
```

{% endcode %}

![](/files/VtVrJv4Xz2hFg9NsGyXJ)
{% endhint %}

**Notes**:

* If extraction of `phone` fails, no output will be stored in `extracted_phone`. Therefore, variable `phone_to_read` won't be filled with a value as well. Make sure MSG node, where entities are meant to be displayed/read back to the user, is entered only under the condition that the phone was extracted from user's utterance.
* For voice channel, take your time and c[ustomize speech output](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis#phone-numbers) with SSML to achieve the best result.


# Randomizing  message content

Insights and guidelines on the effective implementation of randomization techniques to diversify and enhance the content of digital agent's messages.

## Message roulette:  Crafting varied responses

Discover how introducing variability in message content can contribute to a more engaging and dynamic user experience, improving the overall effectiveness of your chatbot interactions.

:question:**Why a single well-crafted message might not be enough:**

* **User Engagement**: Varied and dynamic responses prevent conversations from becoming monotonous or predictable. Users are more likely to stay engaged and interested when the chatbot's responses are diverse and not repetitive.
* **Human-like Interaction**: A broader range of alternatives contributes to a more natural and human-like conversation. Mimicking the way humans express themselves makes interactions with the chatbot feel more authentic and relatable.
* **A/B Testing Opportunities**: Having multiple alternatives provides opportunities for A/B testing. This allows you to experiment with different messaging approaches and identify which ones resonate best with your audience, leading to continuous improvement in the chatbot's performance.

{% hint style="warning" %}
Currently, configuring alternatives for message content is not available as a user-friendly feature on our Flow editor GUI:cry:. Don't worry, this functionality is on our roadmap! While not as straightforward as a few clicks, here are detailed instructions on [method 1 ](#method-1-randomize-the-path-to-the-next-msg-node)or[ method 2](#method-2-set-the-message-content-with-variables) and how to achieve this with the use of our smart function and some clever flow design:sparkles:\
\
Thanks for your patience; we're crafting something amazing!
{% endhint %}

{% hint style="success" %}
**Tip:** However, you can effortlessly configure multiple outputs for your chatbot. See [MESSAGE node](/digital-agent/conversation-flow/nodes-explained/message-node).\
![](/files/9b5Q0mXqMWUuvosigHqg)\
Experiment with having multiple chat bubbles displayed in a sequence to enrich your chatbot interactions with dynamism and engagement.
{% endhint %}

***

## Method #1: Randomize the path to the next MSG NODE

This method involves creating a randomized decision tree where the chatbot dynamically selects its path based on random decisions. While it requires more clicks as you set up and maintain multiple nodes in the flow, the advantage lies in the visibility of the decision-making process.

<figure><img src="/files/QEO1cwkHwkVrSoYjLDAD" alt=""><figcaption><p>Here's how it looks like in flow.</p></figcaption></figure>

### Step 1: Set up messages

1. **Prepare multiple MSG nodes, each representing a potential message in the conversation.** \
   If you need to go through some MSG node basics first, check out [MESSAGE node](/digital-agent/conversation-flow/nodes-explained/message-node)

<figure><img src="/files/jG0KW7Z4uvKOgs6p4dlR" alt=""><figcaption></figcaption></figure>

### Step 2: Insert the point of decision

1. **Introduce a DEC node before the MSG nodes to serve as the decision point.**<br>

   <figure><img src="/files/UaOUH07c58Y3QPyntKwk" alt=""><figcaption></figcaption></figure>

2. **Within the DEC node, set up a new variable. Let's name it `random_number`. Use the smart function random\_int to generate a random number which will be saved in `random_number` variable.**

<figure><img src="/files/ELJET8G0rwolikEr0eLe" alt=""><figcaption><p>Setting random_int smart function.</p></figcaption></figure>

3. **Establish conditions in the DEC node to guide the subsequent path based on the randomly generated value.**\
   Don't forget to set one of the MSG nodes as a fallback target, in case none of the conditions are met.

<figure><img src="/files/CPbI5L1k7iNp83XaTfbz" alt=""><figcaption></figcaption></figure>

<details>

<summary>Quick copy conditions from example</summary>

```python
random_number == 1 
```

```python
random_number == 2
```

```python
random_number == 3
```

</details>

Within this step, the smart function random\_int generated a whole number from 1 to 3 (included). The value is saved into `random_number` variable. Based on its value, one of the conditions is fulfilled and the next node is selected accordingly. In case of error when all conditions fail, flow continues to set fallback target node (Other).

### Step 3: Tie the paths back together

1. **Set the next target from all MSG nodes.**

<figure><img src="/files/gRD403Mo65OIPHV840IQ" alt=""><figcaption></figcaption></figure>

### You're done!

<figure><img src="/files/mvunkR4toppcUDLau3jf" alt=""><figcaption><p>Fist message to be shown is chosen randomly.</p></figcaption></figure>

***

## Method #2: Set the message content with variables

This method involves configuring the content of MSG nodes as variables. Utilizing the `random_int` smart function, the variable is set based on the outcome of the randomization. The variable is then used as input for the MSG node, and the content is dynamically populated based on the variable value.

<figure><img src="/files/LwusFtX4e3YFQS8Yu6VT" alt=""><figcaption><p>Here's how it looks in the flow.</p></figcaption></figure>

While this method streamlines the process within a single node, reducing the complexity of the flow diagram, it requires more coding. \
Keep in mind that the intricacies of this method might not be immediately apparent when viewing the broader flow diagram. Working with string variables within this setup imposes restrictions on Markdown and formatting options for chatbot outputs.

### Step 1: Use `random_int` smart function

1. **In the MSG node, create a new variable**. Let's name it random\_number.
2. **Employ the `random_int` function** to determine the variable value randomly.

<figure><img src="/files/QkqvVjpoh39C2n6HamZ0" alt=""><figcaption></figcaption></figure>

### Step 2: Set a new variable

1. **Set a new variable for the content of your message**. Let's name it `message_content`.
2. **Set the value of the variable as a string, based on the results of randomization** which is stored in `random_number.`
3. Use `if... else..` format.

<figure><img src="/files/JGG23yWZovYth2TwGyNp" alt=""><figcaption></figcaption></figure>

<details>

<summary>Quick copy code from example</summary>

{% code title="message\_content" overflow="wrap" %}

```python
"Hello, I am your AI assistant." if random_number == 1 else "Hey, there! Wanna chat with AI?" if random_number == 2 else "Hi, let's have a chat." if random_number == 3 else "Hi, welcome to our chat!"
```

{% endcode %}

</details>

### Step 3: Assign variable as input for message

1. **Use the `message_content` variable as input for the MSG node**, allowing the content to be dynamically filled based on the variable value.

<figure><img src="/files/7XYidFsmxWThQsVn4Yxr" alt=""><figcaption></figcaption></figure>

### You're done!

<figure><img src="/files/4R74k831BmojTApQTDlx" alt=""><figcaption><p>Content of the first message is chosen randomly.</p></figcaption></figure>


# Alternative messages based on variable values

In this guide, we will demonstrate how to create a conversational design in the Digital Studio flow editor that enables a chatbot or voicebot to deliver variable messages based on the value of a specific variable. This approach is similar to utilizing a randomization method (see [Randomizing  message content](/for-advanced-users/conversation-design-tips/randomizing-message-content)), but instead, it will be driven by a different variable, commonly a string.

:clap: Implementing a variable-based conversational design in your chatbot or voicebot brings several advantages:

* **Tailored Responses**: By using variables, the bot can provide personalized responses based on user data, such as their name, preferences, or past interactions. This makes the conversation feel more human and engaging.
* **Enhanced User Experience**: Personalized interactions make users feel valued and understood, improving their overall experience with your service.
* **Positive Brand Perception**: A bot that remembers user preferences and adapts its responses accordingly can significantly enhance the perception of your brand as being attentive and customer-focused.
* **Leveraging User Data**: By integrating with your CRM or other data sources, the bot can leverage user data to provide contextually relevant responses, improving the relevance and accuracy of the information provided.
* **Adaptability**: The design can be easily adapted for different languages, regions, or user demographics, allowing for a more inclusive approach to customer interaction.

***

## Method #1: Fork the path for the next MSG node&#x20;

By following this guide, you can create a dynamic conversational experience in the Digital Studio flow editor where the chatbot or voicebot delivers tailored messages based on the value of a specific variable.

<figure><img src="/files/fy9foINo76TCrQWUqgY7" alt=""><figcaption></figcaption></figure>

### Step 1: Define the variable

Before you can create decision points based on a variable, you need to define and populate the variable that will be used.

1. **Define the Variable**:
   * Ensure that the variable you intend to use (e.g., `my_variable`) is defined within your system or flow context. This can typically be done in the Variables/Entities section in one of the previous nodes in the flow.
2. **Populate the Variable**:

   * Make sure that the variable is assigned an appropriate value at some point before the decision node is reached. This can be done through user input, an API call, or predefined logic within the flow.

   <figure><img src="/files/991lvjGVDNMWgxKFcHoQ" alt=""><figcaption></figcaption></figure>

### **Step 2: Define the point of decision with DEC node**

Next, we need to create a decision point that evaluates the variable's value and routes the conversation accordingly.

1. **Add a Decision Node**: Drag and drop the `DECISION` node onto the canvas.
2. **Configure the Decision Node**:
   * **Name**: Give the decision node a meaningful name, such as `DEC_CHECK_VARIABLE_VALUE`.
   * **Conditions**: Define the condition based on your variable. For example, if your variable is named `my_variable` and you want to check for three possible values (`"aaa"`, `"bbb"`, `"ccc"`), your conditions would be:

     * `my_variable == "aaa"`
     * `my_variable == "bbb"`
     * `my_variable == "ccc"`<br>

     <div data-full-width="true"><figure><img src="/files/kgs60PMW7RJWeVkMZXJA" alt=""><figcaption></figcaption></figure></div>

### **Step 3: Create message variants**

Now, define the messages that will be delivered based on the variable's value.

1. **Add Message Nodes:** Create separate message nodes with messages corresponding to scenario for each of the possible values, eg. `MSG_VARIANT_A`, `MSG_VARIANT_B`, and `MSG_VARIANT_C`. ![](/files/IBjXVRsSDxYXs3kgKGde)
2. **Link Conditions to Messages**:

   * For the condition `my_variable == "aaa"`, draw a connection from the `DEC_CHECK_VARIABLE_VALUE` node to the `MSG_VARIANT_A` node.
   * For the condition `my_variable == "bbb"`, draw a connection from the `DEC_CHECK_VARIABLE_VALUE` node to the `MSG_VARIANT_B` node.
   * For the condition `my_variable == "ccc"`, draw a connection from the `DEC_CHECK_VARIABLE_VALUE` node to the `MSG_VARIANT_C` node.
   * Don't forget to set a fallback target in Other to ensure flow will have a path to continue in case the variable value is missing or the variable is populated with an unexpected value.

   <figure><img src="/files/KLrfqd9Xo8j9D729unE8" alt=""><figcaption></figcaption></figure>

***

## Method #2: Set the Message Content with Variables

This method involves configuring the content of message nodes as variables. The content is set based on the value of a variable, typically a string. This method simplifies the flow by reducing the number of nodes but requires more advanced configuration.

<figure><img src="/files/cvYZ9cesA55EeCkCHg2b" alt=""><figcaption></figcaption></figure>

### **Step 1: Define and populate the variable**

1. **Define the Variable**:
   * Similar to the first method, ensure that the variable you want to use (e.g., `my_variable`) is defined within your system.
2. **Populate the Variable**:
   * Assign a value to the variable based on your logic (e.g., user input, API response, hard-coded value etc.).

### **Step 2: Set a new variable for the message content**

<figure><img src="/files/z9mfwRrsQk8g5hvYG2La" alt=""><figcaption></figcaption></figure>

1. **Create a New Variable**:
   * In the message node, create a new variable to store the message content. Name it `message_content`.
2. **Assign Conditional Content**:
   * Use conditional statements to set the value of `message_content` based on `my_variable`. For example:

     <pre class="language-python" data-title="Example syntax to copy" data-overflow="wrap"><code class="lang-python">"This is variant A" if my_variable == "aaa" else "This is variant B" if my_variable == "bbb" else "This is variant C"
     </code></pre>

### **Step 3: Use the variable in the Message node**

<figure><img src="/files/WUdLFqlurZ5mMrc1Jqpc" alt=""><figcaption></figcaption></figure>

1. **Set the Message Content**:
   * Use the `message_content` variable as the input for the message node. This allows the message content to be dynamically populated based on the variable value.
2. **Assign the Variable to the Node**:
   * In the message node configuration, set the content to the `message_content` variable. Use variable placeholder in the field for text output.

### Step 4: Repeat the process to set separate variable for Speech channel

When designing conversational flows, it's important to distinguish between content intended for text chat and content intended for speech synthesis. Using a single variable to handle both text and speech can lead to displaying SSML tags in the chat interface, which can be visually unappealing and hinder readability. To avoid this, it is recommended to use separate variables for chat and speech content.

<figure><img src="/files/Jqv6V9SMkZJGnZY4ahuS" alt=""><figcaption></figcaption></figure>

1. **Define Variables for Chat and Speech**:
   * Create two variables, one for chat content and one for speech content.
   * Example: `message_content`, `speech_content`
2. **Set the Value for Chat Content**:
   * Define the message content for the chat interface, ensuring it is free of SSML tags.
   * Example:

     <pre class="language-python" data-title="message_content" data-overflow="wrap"><code class="lang-python">"This is variant A" if my_variable == "aaa" else "This is variant B" if my_variable == "bbb" else "This is variant C"
     </code></pre>
3. **Set the Value for Speech Content**:
   * Define the message content for speech synthesis, including necessary SSML tags.
   * Example:

     <pre class="language-python" data-title="speech_content" data-overflow="wrap"><code class="lang-python">"This is variant A &#x3C;break time=\"10ms\"/>" if my_variable == "aaa" else "This is variant B &#x3C;break time=\"10ms\"/>" if my_variable == "bbb" else "This is variant C &#x3C;break time=\"10ms\"/>"
     </code></pre>

**Step 3: Use Variables in Appropriate Nodes**

1. **Assign Chat Content to Text field i**:
   * Use the `message_content` variable placeholder in text message nodes intended for the chat interface.
2. **Assign Speech Content to Speech field**:
   * Use the `speech_content` variable placeholder in speech message nodes intended for voice synthesis.

{% hint style="warning" %}
**Note!** :pencil:\
When utilizing SSML ([Speech Synthesis Markup Language](/for-advanced-users/conversation-design-tips/customizing-speech-synthesis#speech-synthesis-markup-language-ssml)) tags to modify speech synthesis in your voicebot or digital human, it's crucial to pay attention to the **syntax of conditional statements**. SSML tags, such as `<break time="10ms"/>`, contain double quotes. These double quotes can conflict with the double quotes used to delimit strings in your conditional statements for setting variable values.

To avoid this conflict, you need to **escape the double quotes within the SSML tags**. Here’s the corrected version of the example:\ <mark style="color:purple;">**`"`**</mark>`This is variant A <break time=`<mark style="color:green;">`\"`</mark>`10ms`<mark style="color:green;">`\"`</mark>`/>`<mark style="color:purple;">**`"`**</mark>` ``if my_variable ==`` `<mark style="color:purple;">**`"`**</mark>`aaa`<mark style="color:purple;">**`"`**</mark>` ``else`` `<mark style="color:purple;">**`"`**</mark>`This is variant B <break time=`<mark style="color:green;">`\"`</mark>`10ms`<mark style="color:green;">`\"`</mark>`/>`<mark style="color:purple;">**`"`**</mark>` ``if my_variable ==`` `<mark style="color:purple;">**`"`**</mark>`bbb`<mark style="color:purple;">**`"`**</mark>` ``else`` `<mark style="color:purple;">**`"`**</mark>`This is variant C <break time=`<mark style="color:green;">`\"`</mark>`10ms`<mark style="color:green;">`\"`</mark>`/>`**`"`**

#### Step-by-Step Correction

1. **Identify SSML Tags**: Locate the SSML tags within your conditional statements.
2. **Escape Double Quotes**: Add a backslash (`\`) before each double quote within the SSML tags.
3. **Ensure Consistency**: Verify that all SSML tags within your conditional statements follow this format.

#### Example

Here’s a step-by-step example:

1. **Original Statement with Conflict**:

   <pre class="language-python" data-title="Incorrect syntax" data-overflow="wrap"><code class="lang-python">"This is variant A &#x3C;break time = "10ms"/>" if my_variable == "aaa" else "This is variant B &#x3C;break time = "10ms"/>" if my_variable == "bbb" else "This is variant C &#x3C;break time = "10ms"/>"
   </code></pre>
2. **Corrected Statement**:

   <pre class="language-python" data-title="Corrent syntax" data-overflow="wrap"><code class="lang-python">"This is variant A &#x3C;break time=\"10ms\"/>" if my_variable == "aaa" else "This is variant B &#x3C;break time=\"10ms\"/>" if my_variable == "bbb" else "This is variant C &#x3C;break time=\"10ms\"/>"
   </code></pre>

{% endhint %}

***

## Use-cases ideas

<details>

<summary>Message based on user gender</summary>

In languages with grammatical gender, such as :flag\_pl:Polish, :flag\_cz:Czech, or :flag\_sk:Slovak, it is often necessary to customize messages based on the gender of the subject. This is particularly relevant in user interfaces, automated messaging systems, and any context where personalized communication is important. By altering messages based on the value of a gender variable, we can ensure that our application communicates appropriately and respectfully with users.<br>

Let's say the information is stored in a variable `gender`, with possible values `"male"`, `"female"`, `"unknown"`.

**Method #1 example fork:**

![](/files/P03HoGutQaZtH91UQB9z)

**Method #2 example syntax:**

{% code title="message\_content" overflow="wrap" %}

```python
"Oh, Juliet" if gender == "female" else "Oh, Romeo" if gender == "male" else "Oh, dear"
```

{% endcode %}

{% code title="message\_content" overflow="wrap" %}

```python
"Vážená zákaznice, dovolujeme si Vás upozornit, že již brzy skončí platnost prémiových funkcí, které jste aktivovala minulý měsíc." if gender == "female" else "Vážený zákazníku, dovolujeme si Vás upozornit, že jiš brzy skončí platnost, prémiových funkcí, které jste aktivoval minulý měsíc"
```

{% endcode %}

{% code title="speech\_content" overflow="wrap" %}

```python
"Proszę abyś udzielała jak najkrótszych odpowiedzi na moje pytania czy znasz język niemiecki w jakimkolwiek stopniu odpowiedz <prosody rate=\"slow\"> tak lub nie </prosody>" if gender == "female" else "Proszę abyś udzielał jak najkrótszych odpowiedzi na moje pytania czy znasz język niemiecki w jakimkolwiek stopniu odpowiedz  <prosody rate=\"slow\"> tak lub nie </prosody>"
```

{% endcode %}

</details>

<details>

<summary>Message based on user membership</summary>

Greet users differently based on their membership level, or provide slightly different personalized information or recommendations.\
\
Let's say the user metadata is stored in variable **membership** with possible string values `"gold"` or `"silver".`

**Method #1 example fork:**

![](/files/h0m0l8ewOcJUEviEctS6)

\
**Method #2 example syntax:**

{% code title="message\_content" overflow="wrap" %}

```
"Welcome back, esteemed Gold member!" if membership == "gold" else "Hello Silver member, great to see you again!" else "Hi there! Welcome to our service!"
```

{% endcode %}

</details>

<details>

<summary>Message based on communication channel</summary>

In projects that support multiple communication channels, such as chat, voice, and email, it is often necessary to customize messages based on the communication medium. This ensures that instructions and interactions are appropriate for the context in which they are delivered. By altering messages based on the value of a channel variable, we can provide clear and effective communication tailored to the user's current channel.

Let's say we store the information in a variable channel, which can be populated with either `"chat"` or `"voice"` as values.

**Method #1 example fork:**

![](/files/Iwob7Zx9v0rspn3K3cTh)

**Method #2 example syntax:**

{% code title="message\_content" overflow="wrap" %}

```python
"I will now bring live support to the current chat, ok?" if channel == "chat" else "I will now redirect you to the operator. Please hold on the line" if channel == "voice" else "I will now leave the rest of the communication in the hands of my human colleagues."
```

{% endcode %}

</details>


# Setting time-based greetings

Learn to customize chatbot greetings based on the time of day for a personalized user experience.

Craft dynamic digital agent greetings that adapt to the time of day. Elevate user engagement with personalized messages, creating a seamless and responsive interaction experience. Explore smart strategies for automating greetings based on real-time considerations, making your digital agent's interactions more dynamic and effective.

<figure><img src="/files/Zw40z11V2NYBVf6yVrmF" alt=""><figcaption></figcaption></figure>

***

Follow these simple steps to implement time-based greetings in your message:

## Step 1: Create a MSG node

Start by creating a new MSG node in the Flow editor. This node will serve as the foundation for setting both your dynamic greeting and the digital agent's message content.\
\ <mark style="color:blue;">Need basics first?</mark> [MESSAGE node](/digital-agent/conversation-flow/nodes-explained/message-node)

## Step 2: Set a `greeting` variable

Within the MSG node, set a new variable named `greeting` to determine the appropriate greeting string based on the current time.&#x20;

<details>

<summary>Greeting based on current hour</summary>

Try it for yourself and set the following code as a value for your greeting variable!

{% code title="Example to copy" overflow="wrap" %}

```python
"Good moorning!" if current_time().hour > 7 and current_time().hour < 9 else "Good afternoon!" if current_time().hour > 12 and current_time().hour < 18 else "Good evening!" if current_time().hour > 18 or current_time().hour < 23 else "Hello!"
```

{% endcode %}

Here's what is being set:

* If the current hour is greater than 7 and less than 9, set the greeting to "Good morning!"
* If the current hour is greater than 12 and less than 18, set the greeting to "Good afternoon!"
* If the current hour is greater than 18 or less than 23, set the greeting to "Good evening!"
* If none of the above conditions are met, set the greeting to "Hello!"

:pencil2: **Feel free to change hours, add more conditions or craft the copywriting of the greeting string to your preference.**

</details>

<details>

<summary>Greeting based on current time</summary>

Try it for yourself and set the following code as a value for your greeting variable!

{% code title="Example to copy" overflow="wrap" %}

```python
"Good morning!" if  current_time().strftime("%H:%M:%S") > '"07:30:00"' and current_time().strftime("%H:%M:%S") < '"09:00:00"' else "Good evening" if current_time().strftime("%H:%M:%S") > '"18:59:59"' and current_time().strftime("%H:%M:%S") < '"22:30:00"' else "Hello!"
```

{% endcode %}

Here's what you've just set:

* "Good morning!" is assigned if the current time is between "07:30:00" (7:30 AM) and "09:00:00" (9:00 AM).
* "Good evening!" is assigned if the current time is between "18:59:59" (6:59:59 PM) and "22:30:00" (10:30 PM).
* If none of the above conditions are met, "Hello!" is assigned as a default greeting.

These time ranges are based on the 24-hour format (HH:MM:SS), and you can adjust them according to your preferences or specific use case. The time ranges are inclusive of the start time and exclusive of the end time, meaning that a time exactly equal to "09:00:00" or "22:30:00" would fall into the next greeting category.

:pencil2: **Feel free to add conditions, adjust time ranges and edit copywriting of the greeting strings to your liking!**

</details>

<details>

<summary>Greeting based on current day in a week</summary>

Try it for yourself and set the following code as a value for your greeting variable!

{% code title="Example to copy" overflow="wrap" %}

```python
"Hi. Mondays, uh?" if current_time().weekday() == 0 else "Taco Tuesday!" if current_time().weekday() == 1 else "Wonderful Wednesday!" if current_time().weekday() == 2 else "Terrific Thursday" if current_time().weekday() == 3 else "Finally Friday!" if current_time().weekday() == 4 else "Hello!"
```

{% endcode %}

Here's a breakdown:

* `current_time().weekday()` returns the current day of the week as an integer (Monday is 0, Tuesday is 1, ..., Sunday is 6).
* The conditional expression uses a series of `if` and `else` statements to check the current day of the week and set a specific greeting accordingly.
* If today is Monday (0), the greeting is "Hi. Mondays, uh?"
* If today is Tuesday (1), the greeting is "Taco Tuesday!"
* If today is Wednesday (2), the greeting is "Wonderful Wednesday!"
* If today is Thursday (3), the greeting is "Terrific Thursday"
* If today is Friday (4), the greeting is "Finally Friday!"
* For any other day, the default greeting is "Hello!"

:pencil2: **This code provides a fun and varied greeting based on the day of the week. Adjust the greetings as needed for your specific use case.**

</details>

<figure><img src="/files/XoHfrHZG1jMoGX3G78gC" alt=""><figcaption><p>It takes just a second!</p></figcaption></figure>

## Step 3: Use the variable in the message content

In your digital agent's message content, incorporate the variable to dynamically display the appropriate greeting. Reference the variable you set in step 2 (in this example, "greeting") within the message content.

<figure><img src="/files/crcrL3ggo5jkdrZlNkdS" alt=""><figcaption><p>Aaaand, done! Next, set a target node and continue to build your flow.</p></figcaption></figure>


# Personalised URL links

This page provides comprehensive insights into optimizing Digital agent chatbot performance through **dynamic URL manipulation**. By employing these techniques, chatbots can deliver personalized experiences, thereby enhancing user engagement and satisfaction within chatbot ecosystems.

Personalized links offer numerous advantages in enhancing user experience and streamlining interactions. Some compelling **use cases include**:

<details>

<summary>Pre-filled search queries</summary>

Generating links with pre-filled search queries simplifies the search process for users, facilitating quicker access to relevant information.&#x20;

For instance, a chatbot assisting with product recommendations could provide a personalized link to an e-commerce website with a pre-filled search query based on the user's preferences.

</details>

<details>

<summary>Pre-filled forms</summary>

Personalized links can populate form fields with user-specific information, reducing manual data entry and potential errors.

For example, a chatbot facilitating event registration could provide a personalized link to a registration form with fields pre-filled with the user's details.

</details>

<details>

<summary>Customized product or service recommendations</summary>

Personalized links can lead users to customized product or service recommendation pages tailored to their preferences, past behavior, or demographic information. This tailored browsing experience increases the likelihood of conversion.

</details>

<details>

<summary>Appointment scheduling</summary>

Personalized links can simplify appointment scheduling by directing users to booking pages with pre-filled date and time preferences. This streamlines the scheduling process and reduces friction in converting leads.

</details>

<details>

<summary>Dynamic content generation</summary>

Personalized links can dynamically generate content based on user-specific parameters, delivering highly customized and relevant experiences.&#x20;

For example, a chatbot providing travel recommendations could generate personalized links to destination pages with tailored itineraries, accommodation options, and local activities based on the user's interests and budget.

</details>

{% hint style="info" %}
The use of personalized links is primarily applicable to **chat-based Digital agents**, which operate within text-based interfaces, allowing for seamless integration and interaction with dynamic URLs.

:white\_check\_mark: chatbots\
:x: voicebots\
:x:digital humans
{% endhint %}

***

## Personalised links in pre-set answers

This chapter elucidates integrating personalized links within pre-set answers in chatbot interactions. By incorporating variables containing personalized data and concatenating them with the URL string, chatbots can dynamically generate personalized links tailored to individual users.

1. **Define Variables with personalized data:**
   * Identify the personalized data that needs to be incorporated into the link, such as user IDs, names, or preferences.
   * Assign these personalized data to variables within the chatbot's logic, ensuring accessibility and ease of use.\
     ![](/files/wEEHwW06X5o27VKl6Wax)
2. **Construct Personalized Link:**
   * Concatenate the string representation of the URL with the string variables containing personalized data.
   * Ensure proper formatting and encoding of the URL components to maintain integrity and functionality.\
     ![](/files/MkztKCyd4cPpOpWO8NiG)
3. **Use Personalized Link in Message Node:**
   * Utilize the MSG node to store the constructed personalized link as part of the chatbot's response.
   * In the chatbot bubble GUI, the variable placeholder in this message will be replaced with a personalised URL. You may also use Markdown to format a clickable hyperlinked text.
   * Include relevant context or instructions to guide users on interacting with the personalized link, if necessary.\
     &#x20;![](/files/GH51o1i98wmUyGvka49r)

***

## Personalised links in generated answers

Two distinct methods are elaborated upon, offering solutions tailored to scenarios where precise parameterization of URLs is pivotal.

{% hint style="warning" %}
We <mark style="color:red;">**cannot directly add a link with variables in the knowledge base index**</mark> due to the nature of the response text generated by generative AI. The response text is treated as a single string, devoid of any contextual understanding or variable recognition.&#x20;

Therefore, inserting a variable placeholder within the response text would simply be interpreted as part of the string itself, rather than as a dynamic parameter to be replaced with specific values.&#x20;
{% endhint %}

### Method #1: Replace method

<figure><img src="/files/IkFqK3jJdOi8LorBgC5w" alt=""><figcaption></figcaption></figure>

**Procedure:**

1. Configure one AI node, one FNC node, and one MSG node.<br>
2. The AI node generates a knowledge base-derived response, concealing it from user visibility.\
   ![](/files/EE26NFCZrI7gQg9Cr8sp)
3. In the FNC node:\
   \- store the output from the AI node, \
   \- establish variables, \
   \- and formulate the target string of personalised link.\
   ![](/files/0WHnVtgCK4H86mfLBsky)
4. Utilize the Python replace method to generate a modified text.
5. Present the modified response through the MSG node using variable.\
   ![](/files/fmNiCa78hZpIamOQ9aX5)

**Advantages:**

* The replace method preserves text integrity by refraining from modifying the response if the original string is absent.
* Ensures efficient token utilization and reduced latency in comparison to incorporating an additional AI node.

**Disadvantages:**

* Requires proficiency in Python programming.
* Mandates meticulous attention during string search and replacement.

### Method #2: Prompt chaining with two AI nodes

<figure><img src="/files/axWe6dMCrjq8ft4Xr4EE" alt=""><figcaption></figcaption></figure>

**Procedure:**

1. Sequentially deploy two AI nodes.
2. The **initial node** (AI\_GENERATE\_FROM\_KNOWLEDGEBASE) generates a response from the knowledge base, withholding it from the user interface, with the `current_utterance` serving as input. ![](/files/q9oDhFwxNNzXHfWZuNRU)
3. The **subsequent node** (AI\_REWRITE\_LINK\_IN\_GENERATED\_ANSWER) processes the output from the prior step must be used as input `{gpt_response["response_text"]}`. \
   ![](/files/lzi8pTZ6aas6ISLSIU27)
4. Configure its prompt to examine the generated answer from the previous AI node and, if a link to be personalised is detected, define the format of a link meant to replace it.<br>
5. Employ GUI-based variables within the AI node interface to facilitate dynamic URL construction.  In AI node modal, you may use placeholders of existing variables. Its values will be filled-in while processing the prompt. Don't forget to prompt instruction that, If no link exists in the generated answer, the original text needs to be retianed unchanged.\
   ![](/files/A8MYg1PtpP9d11hP89SS)
6. Don't forget to enable showing the output of this AI node user interface.\
   ![](/files/3lh7Kb35OFHURLu5w9R2)

**Advantages:**

* Eliminates the necessity for programming skills; instructions can be formulated using natural language.
* Exhibits tolerance towards input variations, accommodating semantic nuances.

**Disadvantages:**

* Offers limited control over the decision-making process of generative AI.
* Possibility of incomplete or unexpected response modifications.
* The involvement of two AI nodes leads to heightened token consumption and latency in providing answers.

### Assumptions

* **Data Prerequisite:**
  * Both methods outlined in this documentation rely on the availability of personalized data, such as email addresses, IDs, or other user-specific information.
  * These personalized data might be obtained from users during previous steps of the conversation or from a third source via APIs.\
    `example: personalised_email is "exemple@email.com"`
  * For the Python replace method, the personalized link must be constructed as a concatenation of strings or string variables.
* **Understanding Target Page Structure:**
  * Knowledge of the structure of the target page is crucial for successful implementation. This understanding enables the incorporation of pre-filled values into the URL, such as pre-filled search fields or form items.\
    `example: https://www.facebook.com/login.php?email=exemple%40email.com`
* **Desired Functionality Upon Clicking Modified Hyperlink:**
  * After clicking the modified hyperlink, the intended functionality is realized. Values are pre-filled based on the parameters added to the URL, enhancing user interactions and facilitating a seamless user experience.\
    ![](/files/Ytg841QELRIRw8uF6xPs)<br>


# Custom business statuses with variables

Custom string variables can serve as valuable tools for reporting within Digital agent's conversations. By strategically integrating string variables to represent various points or states within the conversation scenario, you can easily track and analyze user interactions and obtain insightful reporting.

### Setting a status variable

To **set a string variable** in a Digital agent scenario, you need to define the variable and assign a value to it. Variables store data that can be accessed, manipulated, and updated throughout the conversation flow. Here's how it works:

1. **Define the Variable:**

   Choose a descriptive name for the variable that reflects its purpose or the type of data it will store. For example, you could name a variable "topic" to represent the current conversation topic.

<figure><img src="/files/qATyXYVpduyx961sy6M8" alt=""><figcaption></figcaption></figure>

2. **Assign a Value to the Variable:**\
   Once the variable is defined, assign an initial value to it.\
   When you enclose a value in double quotes, it explicitly indicates that said value is a string. If you omit the double quotes, it implies that the value refers to another variable.

<figure><img src="/files/leK6z3Gm95Lm5V9JKmfW" alt=""><figcaption></figcaption></figure>

### Variable status lifecycle

In the flow editor, variables are initialized the first time a node is entered where a variable of a given name is set with an initial value. This initialization occurs within the configuration settings of Variables/Entities in the respective node. Once initialized, the variable retains its value throughout the conversation flow, unless explicitly updated or reset in subsequent nodes. Here's how it works:

1. **Variable Initialization:**
   * When entering a node in the flow editor, variables can be initialized and assigned initial values within that node's configuration settings.
   * These initial values serve as the starting point for the variable's lifecycle within the conversation flow.
2. **Variable Updates:**
   * Each time a user interacts with the Digital agent and enters a node where the variable is present, its value can be updated.
   * For example, we want to track the last message displayed/read to the user. In each MSG node, we set a variable named `last_message`. In the first MSG node, we set the value of this variable to be`"introduction"`, then, in a subsequent MSG node, we set a variable of the same name with a value `"open question"`. Going through flow, variable value will be updated from `"introduction"` to `"open question"`.
3. **Variable Retention:**
   * Once updated, the variable's value is retained for the remainder of the conversation unless explicitly modified/updated or reset in subsequent nodes.
4. **Node Resets and Variable Persistence:**
   * In some cases, nodes may contain variable reset, effectively clearing any previous values.
   * However, unless explicitly reset, variables typically maintain their values across multiple node interactions, providing continuity and context throughout the conversation flow.

{% hint style="info" %}
Setting custom variable enabled in:\
:white\_check\_mark: START node , MSG node, ANS node, FNC node, DEC node, END node

:x: AI node

Applicable for:\
&#x20;:white\_check\_mark:chatbots, :white\_check\_mark:voicebots, :white\_check\_mark:digital human
{% endhint %}

***

***

## Applied use-cases

### Tracking last message

One applied use case of setting statuses with variables is to track the depth of the conversation and identify potential turning points where users may disengage.

**Use-Case: Tracking Conversation Depth**

* **Objective:** Measure user engagement and identify potential drop-off points in the conversation flow.

<figure><img src="/files/zuHZI0cLdsrxRv928KKp" alt=""><figcaption></figcaption></figure>

* **Implementation:**
  * Set a string variable, such as `last_message`, to track the depth of the conversation by updating its value with each new message or interaction.
  * In each MSG node, set a custom value to `last_message`, eg. `"greeting"` in the initial MSG node, "`second question"` in subsequent MSG node, ..., `"goodbye"` in the last MSG of the conversation etc.&#x20;
  * Every time a MSG node is entered, its output message is shown/read to a user as well as the `last_message` variable value is updated based on the setting in said node.
  * Monitor the value of the `last_messag`e variable at various points in the conversation flow to determine how far users progress before potentially disengaging.
  * Analyze the data collected from the variable to identify patterns and pinpoint specific questions or prompts that correlate with user drop-off rates.

**Example Insights:**

* **Conversation Abandonment Rate:** By analyzing the `last_message` variable across multiple conversations, analysts can calculate the percentage of users who abandon the conversation at different stages.
* **Turning Points:** Identify specific questions or prompts in the conversation flow where user engagement tends to decline, indicating potential areas for improvement or optimization.
* **Optimization Opportunities:** Use insights from variable tracking to refine conversation designs, adjust messaging strategies, or introduce interventions aimed at maintaining user interest and prolonging engagement.

***

### Business status based on intent recognition

Utilizing variables to assign status labels to different categories of utterances streamlines the reporting process. One such use case involves categorizing user responses to specific questions or prompts and aggregating them for reporting purposes.

**Use-Case: Grouping User Utterances**

* **Objective:** Categorize user responses to specific questions or prompts and aggregate them for reporting purposes.

<figure><img src="/files/iSdJ3i7QJTUO4iClZLY2" alt=""><figcaption></figcaption></figure>

**Implementation:**

* Set an ANS node and define intents for intent recognition. As a next step, prepare nodes for statuses and their values to be set, for example, a FNC node.&#x20;
* In both FNC nodes, set a string variable, such as `business_status` to track the user's interest level. Set the variable value as `"interested"` in of the FNC nodes and as `"not intersted"` in the other.
* Utilize intent recognition in ANS node to identify different categories of user utterances. Group the intents by setting their target accordingly to desired status.
* Direct user utterances corresponding to the `"interested"` category to a common target node where the `business_status` variable is set to the value "`interested."`
* Direct user utterances corresponding to the "`not interested"` category to the other common target node where the variable `business_status` is set to the value `"not interested."`

**Example Insights:**

* **Interest Level Analysis:** By aggregating user responses categorized as "interested" or "not interested" for the product or service, calculate the percentage of users expressing interest and identify trends over time.
* **Effectiveness of Messaging:** Analyze the effectiveness of messaging strategies by comparing the conversion rates of users categorized as "interested" versus "not interested" and adjusting marketing tactics accordingly.
* **Product Development:** Use insights from user interest levels to inform product development decisions, such as prioritizing features or launching targeted promotions to capitalize on areas of high interest.

***

### **Topics status in open question based on intent recognition**

This approach proves particularly valuable in scenarios where open-ended questions yield a diverse range of intent categories that can be consolidated into broader topics.

**Use-Case: Categorizing User Requests into Topics**

* **Objective:** Group user requests into topics to streamline reporting, identify common themes, and drive process improvements.

<figure><img src="/files/8kLhWis0aufCx39KOAmJ" alt=""><figcaption></figcaption></figure>

* **Implementation:**
  * Define a set of topics representing overarching themes or categories relevant to user requests. For example, topics could include "invoice," "product info," "reclamation", "other" etc.
  * Utilize intent recognition to identify specific user intents within the broader question, *How can I help you?*
  * Group and map each identified intent to its corresponding topic.
  * Insert to variable status to the target node of each intent, or create a designed node just for setting the status variable before continuing to the next step.\
    ![](/files/wHXsfqlcOa3CaT9hhITl)
  * Set a string variable, such as `topic`, to track the topic of each user request by updating its value based on the recognized intent category and flow path.
  * Set the value of the variable accordingly. For example, if all intents concerning invoices lead to MSG\_INVOICE\_INFO, set a value `"invoice"` to the variable `topic` there. Don't forget to prepare a node with variable `topic` and value `"other"` for fallbacks.\
    ![](/files/UpP0poY8KlnEydSqEM9u)
  * Aggregate user requests by topic for reporting and analysis purposes, allowing businesses to identify the most requested topics and prioritize areas for improvement or automation.

**Example Insights:**

* **Top-Requested Topics:** Analyze the distribution of user requests across different topics to identify the most commonly sought-after assistance areas.
* **Process Improvement Opportunities:** Use insights from topic-based reporting to streamline processes, allocate resources effectively, and address recurring issues or pain points.
* **Automation Potential:** Identify topics with high request volumes that lend themselves to automation, enabling businesses to automate responses or tasks to improve efficiency and enhance the user experience.

***

### Counter of AI generated answers in looping conversation flows

In looping conversation flows, where interactions follow a repetitive pattern, it is often handly to know the number of completed loops. One such use-case involves using a smart function `counter` to track the number of completed cycles in a looping conversation flow and derive insights for conversational design optimization.

**Use-Case: Tracking Conversation Cycles with a Counter Function**

* **Objective:** Monitor the number of completed cycles in a looping conversation flow to gauge user engagement and identify potential disengagement points.

<figure><img src="/files/eFwV2z9JglpQdNbidWH5" alt=""><figcaption></figcaption></figure>

* **Implementation:**
  * Integrate a counter function into the flow diagram to dynamically track the number of completed cycles.
  * Place the counter function in a FNC node positioned after the completion of each interaction cycle in the conversation flow, right after the AI node, where the answer to the user's query is generated.

<figure><img src="/files/KtK4JX7eoB8QTbdhifYE" alt=""><figcaption></figcaption></figure>

* The smart function counter increments its value by +1 each time the node with the counter function is entered, indicating the completion of an interaction cycle.
* Store the counter's value in a variable, such as `generated_answers_counter`, allowing for easy access and reporting of cycle counts throughout the conversation.

**Example Insights:**

* **Engagement Metrics:** Analyze the number of completed conversation cycles to assess overall user engagement levels and interaction frequency.
* **Disengagement Points:** Identify trends or patterns in cycle counts to pinpoint potential disengagement points where users may lose interest or abandon the conversation.
* **Conversational Design Optimization:** Utilize insights from cycle tracking to inform conversational design decisions, such as adjusting messaging strategies, introducing new prompts, or offering channel switches after a certain number of cycles.

***

### **Status for Customer hanging-up in voice conversations**

By setting custom statuses to differentiate between user-initiated hang-ups and scenario-completion events, gather valuable insights for reporting and analysis. This use-case is particularly relevant for voicebot interactions where users may terminate the call abruptly, signaling the need to distinguish between voluntary and involuntary conversation endings.

**Scenario:** During a voice call with a voicebot, users may choose to end the conversation voluntarily by hanging up the phone, or the call may terminate unexpectedly due to external factors, such as signal loss or technical issues. Distinguishing between these scenarios allows businesses to track hang-up rates accurately and gain insights into user engagement levels.

**Use-Case: Setting Custom Statuses for Hang-Up Events**

* **Objective:** Differentiate between user-initiated hang-ups and scenario-completion events in voicebot conversations for reporting and analysis purposes.

<figure><img src="/files/GSbM8UPlXUzGocwRtbXf" alt=""><figcaption></figcaption></figure>

* **Implementation:**
  * Create a dedicated FNC node to serve as the endpoint for hang-up events in the conversation flow and another FNC node dedicated to saving status for scenario completion ending.
  * Set a string variable, such as `business_status`, within the FNC node to capture the reason for the conversation ending.\
    &#x20;![](/files/MCkfiJcDTluPfaTB40X1)
  * Use hang up routing target routing from ANS nodes to direct all hang-up events in the conversation flow to the designated FNC node for hangups, ensuring that the custom status is set before ending the flow.
  * Assign different values to the `business_status` variable in different nodes based on the reason for the hang-up, such as `"user hang-up"` for voluntary terminations and `"scenario completion"` for successful scenario fulfillments.

**Example Insights:**

* **Hang-Up Rate Statistics:** Analyze the distribution of hang-up events and track hang-up rates over time to assess user engagement and identify potential pain points in the conversation flow.
* **Scenario Success Metrics:** Differentiate between scenario-completion events and user-initiated hang-ups to measure the success rate of conversation scenarios and identify areas for improvement.
* **User Engagement Patterns:** Use insights from hang-up events to understand user engagement patterns, such as the point at which users are most likely to disengage from the conversation.

{% hint style="info" %}
Hang-up statuses applicable for:\
:white\_check\_mark:voicebots\
:white\_check\_mark:digital human\
:x:chatbots

Hang-up signalling feature is exclusively relevant for voice-based interactions, including voicebots and digital humans, where hang-up events serve as significant indicators of conversation conclusion from the user's part.
{% endhint %}


# String slicing

Let's delve into the concept of string slicing and how it can be applied to extract meaningful pieces of information to be used in conversational design.

## Example use case

Consider an order ID composed of 12 digits, structured as follows:

* The first 4 digits represent the year of creation.
* The last digit denotes the type of buyer, where '4' indicates a purchase by an individual and '5' denotes a purchase by a company.
* The fifth and sixth digits represent the product category, with specific numerical codes assigned to different product types. For instance, '10' might represent a refrigerator, '25' a washing machine, '06' a computer, and so forth.

<figure><img src="/files/ZP33drA57V66P3DAuQBn" alt=""><figcaption></figcaption></figure>

Let's take the following order ID as an example. From user's utterance we have extracted an order id and **saved it as a string** to a variable named order\_id.

<figure><img src="/files/0Y662SzbJIRMVzYTPBf4" alt=""><figcaption></figcaption></figure>

Now, let's break down this order ID into its constituent parts using string slicing:

**General rules:**

1. **Slicing from the start:**
   * When slicing from the start of the string, you specify the starting index as `0`.
   * Example: `string_variable[start:]`
   * This will slice the string starting from the specified index `start` until the end of the string.
2. **Slicing from the end:**
   * When slicing from the end of the string, you can use negative indices to specify positions relative to the end of the string.
   * Example: `string_variable[-end:]`
   * This will slice the string starting from `end` positions from the end of the string until the end of the string.
3. **Slicing in an interval:**
   * You can also specify an interval (step) between characters to be included in the slice.
   * Example: `string_variable[start:end:interval]`
   * The interval specifies how many characters to skip after each character is included in the slice.
   * Omitting `start` and `end` (or both) will default to the start and end of the string, respectively.
   * Omitting `interval` will default to `1`, meaning consecutive characters will be included.
   * If `interval` is negative, the slice will be performed in reverse order.

\
Let's break it down for order\_id = "202406987614" and save each substring to a separate variable:

**Extracting the year**

* The first 4 digits in order\_id represent the year, so we have to slice the string after **4** characters from the **start** of the string.
* <mark style="color:red;">**2024**</mark>06987614
* Store value "2024" in a variable named `order_year`.

{% code title="order\_year" %}

```
order_id[:4] 
```

{% endcode %}

<figure><img src="/files/n3AgL3kJFhlRZJTlwZcb" alt=""><figcaption></figcaption></figure>

**Identifying the product category**

* The product category is coded as the **fifth and sixth** digits in the string, so we have to slice out all characters between the fifth (included) and the seventh (excluded).
* 2024<mark style="color:purple;">**06**</mark>987614
* Store value "06" in a variable `product_category`.

{% code title="product\_category" %}

```
order_id[5:7]
```

{% endcode %}

<figure><img src="/files/mjlPfiz04hRFnpDHL5Fm" alt=""><figcaption></figcaption></figure>

**Determining the buyer type**

* The last digit in a string represents buyer type, so we have to slice **1 character from the end** of a string.
* 20240698761<mark style="color:green;">**4**</mark>
* Store value "4" in a variable named `buyer_type.`

{% code title="buyer\_type" %}

```
order_id[-1]
```

{% endcode %}

<figure><img src="/files/gTAuFAndAfYe6KUXGAvY" alt=""><figcaption></figcaption></figure>

***

## Other use cases and ideas

Here are additional use cases for utilizing string slicing in chatbots and voicebots:

1. **Extracting Date and Time from ISO Format:**
   * You can use string slicing to extract different parts of the date and time from the YYYY-MM-DD-T-HH:mm.SS format.
   * For example, if you need only the date, you can use `string_variable[:10]` to slice the first 10 characters.
   * To extract the time, you can use `string_variable[11:19]` to slice the time segment.

2. **Extracting Area Code from Phone Numbers:**
   * If you have phone numbers in a format with an area code, you can use string slicing to extract this area code.
   * For instance, if the area code always consists of a certain number of digits (e.g., 3), you can use `string_variable[:3]` to slice the first three digits.

3. **Extracting Last 4 Digits from Social Security Numbers:**

   * If you need to extract a specific part from a social security number, such as the last 4 digits, you can use string slicing.
   * By using a negative index, you can easily obtain the last part of the string, for example, `string_variable[-4:]` to extract the last 4 characters.

4. **Extracting Information from Personal Identification Numbers (PINs) or Social Security Numbers (SSNs):**
   * Personal identification numbers, such as social security numbers, often encode information like date of birth and gender. String slicing can be used to extract this information.
   * For example, in some systems, the first few digits of a social security number might encode the individual's birthdate and gender.
   * By defining specific slicing patterns, you can extract the relevant portions of the SSN to obtain the date of birth and gender information.
   * For instance, you might use `string_variable[:6]` to extract the first six digits representing the birthdate, and then further processing can decode these digits to derive the actual date of birth and gender.


# Implementing chat buttons

Button navigation in chatbots provides users with a straightforward and efficient way to interact with the system. By presenting predefined options, buttons simplify the decision-making process and streamline the user experience. However, while buttons offer clarity and ease of use, they can also limit flexibility and require careful design to accommodate various scenarios. Understanding when and how to leverage button navigation can enhance the usability and effectiveness of your chatbot.

**Advantages** :thumbsup:**:**

* **User-Friendliness:** Button navigation provides users with a straightforward and intuitive method of interacting with the chatbot. It requires only a single click on a selected button rather than composing complex sentences.
* **Clear Choices:** Buttons enable precise definitions of the options available to users, thus eliminating confusion and misunderstandings.

**Disadvantages** :thumbsdown:**:**

* **Limited Flexibility:** Button navigation may have limitations compared to free-text input, potentially restricting users' options and leading to frustration.
* **Space Constraints:** Utilizing buttons may impose constraints on the available space for content, which could be problematic when presenting extensive options or information.

## How chat buttons work

<figure><img src="/files/fgswQRacLxOmURJrZc2P" alt=""><figcaption></figcaption></figure>

Buttons within chatbot interfaces serve as simplified means for users to provide input and interact with the system. Here's an overview of their functionality:

Buttons are configured with specific **labels** in the chatbot interface, representing the available options for users. When a user clicks on a button, the text displayed on the button (label) is sent to the system **as an utterance**, simulating user input in the input field.

Essentially, buttons act as a simplified pathway for obtaining user input and facilitating interaction with the chatbot. Configuring intent recognition in the Answer (ANS) node is necessary, so the Digital Agnet can progress further in the flow scenario along the defined path.

The utterance obtained from the button must undergo intent recognition, similar to other inputs, either through **keywords**, **Generative AI-based recognition**, or a custom classification model trained on a specific **training set.** For a detailed explanation of intent recognition configuration, see [ANSWER node](/digital-agent/conversation-flow/nodes-explained/answer-node#intents)

{% hint style="info" %}
**Note!** :pencil:\
Users **can select only one button within a single menu**, as clicking immediately submits the corresponding utterance. For scenarios requiring multiple selections, implementing [widgets](/digital-agent/advanced-functions/widgets) such as [checkboxes](/digital-agent/advanced-functions/widgets#checkbox) rather than buttons is preferable.&#x20;
{% endhint %}

Within the ANS node, you can configure whether to display both button options and a free-text input field simultaneously or hide the free-text input field to prompt users to choose from predefined options. See [ANSWER node](/digital-agent/conversation-flow/nodes-explained/answer-node#chat-interface-settings) for step-by-step tutorial.

### Implementation Methods for Button Configuration

**Method 1: Configuring each button alongside one intent in ANS node**

Within the Answer (ANS) node, buttons can be set up **in conjunction with intents**. When incorporating an intent, you have the option to designate it as a button.&#x20;

* Each intent can be associated with only one button.&#x20;
* However, not every intent needs to have a corresponding button set within the ANS node. For instance, in case of open-ended questions, we might set buttons for the three most common topics (e.g., "New Product," "Complaints," "Need Assistance") while still allowing for free-text input, thereby recognizing multiple additional topics.

**Method 2: Configuring all buttons from a single variable**

Another approach involves setting buttons from a variable. Prior to the ANS node, define a variable in a preceding node, such as **`buttons_options`** variable, and assign an array as its value, e.g., `["New Product", "Complaints", "Need Assistance"]`.  Then, configuring a button and setting this variable as a source of the whole buttons menu is needed only alongside one of the intents in ANS node. The buttons will then be displayed based on the individual elements within the array, appearing in the order they are listed.

***

## Method #1: Implementing buttons alongside individual intents

<figure><img src="/files/ezgnYBKRcvkwokTVejBr" alt=""><figcaption></figcaption></figure>

<details>

<summary>Setting a chat button step-by-step</summary>

1. **Open/Create an ANS Node:**
   * Navigate to or create an Answer (ANS) node in your chatbot flow.
2. **Add/Select an Intent:**
   * Within the ANS node modal, click on the "+" icon in the input section to create a new intent, or click on the edit icon next to an existing intent to which you want to add a button.
3. **Choose Intent Type:**
   * Select the type of intent (training set, keyword, or Generative AI).
4. **Enable Chat Button:**
   * Check the "Use also as a chat button" option.
5. **Configure Button Settings:**
   * A dialog box will appear for button configuration. Fill in the label, which is the text displayed on the button.
   * Optionally, you can add an icon or image URL to be displayed alongside the label. Ensure the URL is accessible from the internet.
   * You can also set the theme as primary or secondary. Primary themes are recommended for main options, while secondary themes are suitable for secondary navigation (e.g., "Back," "Return to Main Menu").
6. **Save Button Configuration:**
   * Save the button configuration and proceed to configure and save the intent settings (intent recognition, prompts, intent name, target node).

</details>

When configuring a button for the chatbot, **you must define the button label**. Optionally, add an icon or **image** URL for visual enhancement, and select the button's **theme** (primary or secondary). Once configured, save the settings and configure associated intent settings, such as intent recognition and prompts.

<figure><img src="/files/CekW3meBuV8i1sziHJkD" alt=""><figcaption></figcaption></figure>

Once the button label and associated text to be sent upon clicking are configured, the next step involves setting up intent recognition. **Each type of intent** (training set, keyword, Generative AI) has its own **specific requirements** and considerations **for accurate recognition** based on user interaction.

**Training Set:**

* The **text displayed on the button** (label) must precisely match **one of the training sentences** defined for the intent.\
  For example, if the button label is "Need Assistance," there must be a training sentence within the intent's training set that exactly matches this phrase.
* Since training set intents rely on predefined examples, it's crucial to ensure that all potential button labels are included in the training data. This is one of the requirements for project validation before training.

**Keywords:**

* **Keywords must match the text displayed on the button**. It's advisable to input exact matches or include partial matches if necessary.\
  For instance, if the button label is "Need Assistance," you can set the keyword as "Need Assistance" or include variations like "Assistance."
* Consider the sensitivity of keyword matching, as it determines how closely the input text needs to match the specified keywords for successful recognition. Remember, keyword intent recognition also supports regular expressions.
* If the field for user input is also allowed, consider keywords or strings for matching possible free-text utterances.

**Generative AI:**

* Describe the intent topic and provide example sentences in the prompt field to guide the Generative AI model in understanding user input. Include various phrases and expressions related to the intent topic to improve the model's ability to recognize user intent accurately.
* Offer a range of example utterances that users might input related to the intent topic. See also [Fine-Tuning Intent Recognition using Generative AI](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai) and [Prompting cookbook](/for-advanced-users/prompting-cookbook) tips!

### Buttons and free-text input simultaneously

Look at combining configurated buttons for streamlined navigation with free user input from a text field. By offering both structured options and open-ended communication, this approach accommodates diverse user preferences and interaction styles, creating engaging conversational experiences.

<figure><img src="/files/egvA0cG9EPVpbjyBCRI6" alt=""><figcaption></figcaption></figure>

Here's how it works:

* **Incorporate intents into ANS node:** Integrate intents into the Answer (ANS) node within the chatbot flow.
* **Configure buttons:** For selected intents to be displayed as buttons, enable the "Use also as a chat button" option. Configure button label, image and theme and save.
* **Configure intent recognition:** Establish standard conversation design paths by defining possible intents, their recognition methods, and their target state.
* **Standard conversation design:** Outline fallback scenarios: set fallback counter and message. Optionally, configure [advanced settings.](/digital-agent/conversation-flow/nodes-explained/answer-node#advanced-settings)

**Considerations for Button Usage:**

* When implementing buttons, consider that the same intent may be suitable for both button-clicked utterances and user-input utterances, which might use different wording.

#### Example use case

Let's say the Digital agent asked for product type to return a specific claim form. Three of the most common product types are Computers, Phones and White goods, so we want to streamline the choice of these options and offer them as buttons. Additionally, we need to recognise other types of products as well.

Take a look at the example configuration of ANS node

<figure><img src="/files/Nff6WAkeBJ7CuoMPDpow" alt=""><figcaption><p>Example ANS node conuguration.</p></figcaption></figure>

&#x20;:white\_check\_mark: In Advanced settings, **`Hide chat input field`** is **disabled**, so the user is allowed to send free text.

:white\_check\_mark: Intents are configured (this time, using Generative AI as a method for intent recognition).

:white\_check\_mark: Three intents (Phones, Computers, White goods) have also a chat button configured alongside them.

:white\_check\_mark: Other intents (TV, power tolls, other appliances) are configured as well, but without a dedicated button.

:white\_check\_mark: A fallback scenario is also implemented, in case intent recognition fails.

{% hint style="info" %}
:bulb:**Pro-tip!**

* Especially when utilizing **keyword-based intent recognition**, account for variations in user input that may not directly match the button text.
* For instance, if categorizing product types for complaints, such as "White goods," "Phones," and "Computers," users may provide responses that align with these categories but use different terms. Thus, the keyword for "White goods" should include additional relevant terms like "refrigerator," "freezer," "dishwasher," "washing machine," etc., to accurately capture user intent.
* If we define the "White goods" intent in this way and a user clicks on the button, the input utterance will be the same as what is written on the button. Similarly, if a user types "White goods" in the chat, the same outcome will occur. However, if a user inputs something slightly different like "it's a minifridge model XY" in the chat, well-defined keywords will allow us to assign it to the correct intent as well.
  {% endhint %}

Check it out for yourself. Download the example project below and import it to your project in Digital Studio!

{% file src="/files/lR3eBMoWgp20r34Ur33I" %}

### Buttons-only navigation

Consider a use case, where only button selection is permitted, and the free text field is hidden. In this scenario, users are prompted to choose from predefined options, requiring selection to submit an utterance based on the button label as input for the chatbot. This approach ensures that users engage with the chatbot within the structured flow and progress further based on their selections.

<figure><img src="/files/JtW4WXXcNtUeSz1Wkl7j" alt=""><figcaption></figcaption></figure>

To implement button-only selection with a hidden free text field, follow these steps:

**Hide Chat Input Field in ANS Node:** In the Advanced settings of the Answer (ANS) node, select the option to hide the chat input field.

<figure><img src="/files/ZMkV1LLnKIacLHOtqong" alt="" width="375"><figcaption></figcaption></figure>

**Configure Intents and Buttons:** Set up intents as usual, and for each intent, configure a corresponding button.

<figure><img src="/files/lAS8d2TPGzoFN3stjpRp" alt="" width="375"><figcaption></figcaption></figure>

**Keyword Matching for Button Labels:** Don't waste your time with training set or Generative AI intents. Since users must select a button, the possible utterances are predetermined. Match the button labels by setting keywords to be the same as the button labels. This is the most effective way to ensure intent recognition for this use case.

**Fallback Target Node:**\
To ensure a valid and trainable configuration, define a target node for fallback scenarios. This target node can be set to any valid target for intents since if a user only selects from predefined options, the fallback scenario cannot ever occur.

{% hint style="info" %}
:bulb:**Pro-tip!**

It's essential to be cautious when using button labels that are substrings of each other, such as "Back" and "Back to the main menu." The **order of keyword intents matters**; if "Back" is the first keyword intent in ANS node configuration, it will match the utterance sent from clicking on "Back to the main menu" a redirect the flow to incorrect target node.&#x20;

Pay attention to button label design to avoid ambiguity or carefully order buttons to prevent unintended matches.
{% endhint %}

Check it out for yourself. Download the example project below and import it to your project in Digital Studio!

{% file src="/files/OhcRLHdvRmGhqJFbSQF1" %}

### Primary and secondary buttons

This section explores the use of primary and secondary buttons within a chat interface. It recommends setting primary buttons for main topics and secondary buttons for auxiliary navigation functions (e.g., "Back"). This conversational design approach involves configuring the button theme within the button configuration. It can be applied to scenarios with or without a free text field, providing a structured and intuitive user experience.

<figure><img src="/files/2Ne1WOVQUX0a5Kuhovok" alt=""><figcaption></figcaption></figure>

Follow these steps to configure primary and secondary buttons within the chat interface:

* **Define Intents:** Start by setting up the intents that correspond to the main topics and navigation functions of your chatbot.
* **Configure Buttons within Intents:** Within each intent, configure the buttons by **selecting either primary or secondary themes**. The default graphics will be applied. For custom bubbles with personalized graphics, reach out to the Born Digital team.

<figure><img src="/files/OTuueb9pj9NWma4ag7lg" alt="" width="375"><figcaption></figcaption></figure>

* **Set Intent Recognition:** Configure intent recognition settings to ensure accurate interpretation of user inputs corresponding to the buttons.
* **Configure Fallback Scenarios and Advanced Settings:** Set up fallback scenarios and any additional advanced settings as needed to manage unexpected user inputs and ensure smooth operation of the chatbot.

#### Example use case

Let's say a Digital agent asks users for their favourite treats. If the answer is ice cream, the user is tasked to pick a flavour within button options "Chocolate", "Strawberry" and "Vanilla". Secondary-themed button "Back" is implemented too, in case the user doesn't choose from predetermined options and wants to return to the previous step in the flow.

Take a look at the example configuration of ANS node:

<figure><img src="/files/d5QaoeezlLhpIbTthwsq" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
:bulb:**Pro-tip!**

When keeping the user **input field visible,** it's essential to **consider whether the utterance for a secondary button may also appear as a substring within free text input.** Therefore, careful consideration must be given to the intent recognition method and rules applied.

For instance, in free-form input, simply using the keyword "Back" for the "Back" button may not suffice if "back" could be part of a valid input for another topic, such as "*I want my money back*" for a refund intent.

Fortunately, **keywords support regular expressions**, allowing for more complex matching rules. For example, specifying that "Back" must match the entire string (i.e., "`^Back$`") clarifies its role as a command to return to the previous step, ensuring that occurrences within longer strings are unlikely to be relevant.

By leveraging such advanced matching rules, you can enhance the accuracy of intent recognition and ensure smooth user interactions within the chatbot interface.
{% endhint %}

Check it out for yourself. Download the example project below and import it to your project in Digital Studio!

{% file src="/files/nkJt1ROll8xlCRrlf8NA" %}

### Buttons for breaking generative AI loops

Explore leveraging buttons within chatbot conversation design as a means to exit generative AI loops. In scenarios where the conversation follows a loop pattern, transitioning out of the loop at the appropriate moment can be challenging.

Usually, intent recognition within the Answer (ANS) node attempts to identify cues indicating the user's desire to exit the loop, such as explicit statements like "*Thank you, that's all."* However, recognizing these cues can be complex due to the evolving nature of discussions.&#x20;

To address this challenge elegantly, **buttons** can be utilized to provide users with **a clear pathway to exit the loop** or return to a previous or move to the next step within the conversation flow.

<figure><img src="/files/IkbtGFdfxYQGJtCnEajk" alt=""><figcaption><p>Until button is clicked on, chatbot continues looping into AI node, generated Digital agent's responses with AI.</p></figcaption></figure>

This conversational design aims to gracefully exit generative AI loops by utilizing buttons within the chat interface. **Here are the key steps of this design flow:**

* **User Input in ANS Node:** The interaction starts when the user provides an utterance in the Answer (ANS) node. In conversation flow, a MSG node with general instruction usually precedes.
* **Generative AI Processing:** The user's input is passed to the generative AI, which generates a response based on prompts or prompts combined with a knowledge base.
* **Returning to Previous Step:** After generating the response, the conversation loops back to the previous ANS node, allowing the user to react and provide a new utterance.
* **Continued Looping:** This looping process continues as the conversation iterates between user input, generative AI processing, and returning to the ANS node for further interaction.
* **Recognizing Exit Cues:** Intent recognition configuration within the ANS node attempts to identify cues indicating the user's desire to exit the loop, such as explicit statements like "Thank you, that's all." However, recognizing these cues can be complex due to the evolving nature of discussions.
* **Utilizing Buttons for Exit:** To address this challenge, buttons are strategically configured within the ANS node to serve as an exit pathway from the loop. By setting specific exit intent recognition for utterances obtained based on clicking on these buttons, users can smoothly transition out of the loop and continue with the conversation flow.
* **Fallback Handling:** Allowing only the configured exit intents to be recognized intentionally directs all other inputs to the fallback scenario. This ensures that in cases where exit cues are not explicitly stated, the conversation can progress effectively by generating responses through the AI and returning to the loop.

Here are some conversation design **use case ideas** to inspire you:

<details>

<summary>Chitchat loop</summary>

In scenarios where the conversation revolves around casual small talk or open-ended discussions, utilizing buttons to exit generative AI loops provides users with a clear way to conclude the conversation or transition to another topic seamlessly.

</details>

<details>

<summary>Knowledge base loop</summary>

For conversational designs focused on querying a knowledge base about specific topics, using buttons to exit generative AI loops allows users to indicate when they have obtained the information they need or when they wish to explore other topics further.\
\
:bulb:**Tip!** See [Knowledge base project](/digital-agent/building-new-projects/knowledge-base-project)tutorial.

</details>

<details>

<summary>Modular flow design</summary>

When designing conversation flows consisting of separated modules, where each module loops internally with generative AI responses, buttons can serve as a means to switch between modules efficiently. Users can navigate through different modules within the conversation flow by exiting one loop and entering another using designated buttons.

</details>

<details>

<summary>Collecting feedback</summary>

For conversational designs aimed at collecting feedback or conducting surveys, buttons can be used to prompt users to indicate when they have completed the feedback process in open questions with collected input in the form of a free text. Generative AI may encourage users to elaborate or ask further questions. In this example, buttons serve as a means of exiting the feedback loop and moving to another question in the survey.

</details>

<details>

<summary>Support loop/Switch from AI to Livesupport</summary>

In conversational designs focused on providing support or assistance, using buttons to exit generative AI loops enables users to indicate when they have received the help they need or when they wish to escalate their query to a human agent for further assistance.

</details>

#### Example use case

Consider a scenario where we have a chatbot that initiates a generative AI loop when a user expresses their love for pizza :pizza:. Within this loop, users can engage in conversations about pizza with the chatbot. To simplify the identification of when the user wishes to exit the pizza conversation loop, we implement two buttons:

1. **"Back to Main Menu" Button:** This button aims to redirect the user back to the main menu, serving as an exit point from the current conversation loop.
2. **"Ok, That's Enough!" Button:** This button is designed to lead the user out of the loop, allowing them to continue with the main conversation flow.

Within the ANS node, we define two intents corresponding to these buttons. Clicking on either button sends the exact text displayed on the button as an utterance.

<figure><img src="/files/2UedlvDAlbGwjYG8et1J" alt="" width="329"><figcaption></figcaption></figure>

For intent recognition, utilizing keywords corresponding to the button texts is recommended. Using regular expressions, such as "^`Ok, that's enough!$`", ensures that only these predefined utterances trigger the exit from the loop.

All other user inputs are directed to the fallback, where the fallback counter is set to 0, and the target node is set to the AI node responsible for generating responses. This approach assumes that if the intent recognition does not match the predefined button utterances, the user intends to continue conversing with the AI within the loop.

Check it out for yourself. Download the example project below and import it to your project in Digital studio!

{% file src="/files/vNS4RzA2M8v1iDfaotIN" %}

{% hint style="info" %}
:bulb:**Pro-tip!**

Not familiar with **regular expressions?** Our linguists and conversational designers recommend this [tutorial](https://regexone.com/). Master regexes in one afternoon!

Familiar, but not confident? Use [this handy tool ](https://regex101.com/)to check whether your regex is matching the desired string properly.
{% endhint %}

***

## Method #2: Setting all buttons from a single variable

This method allows for the **dynamic creation of chat buttons based on variable values**. By storing button options in a variable, you can easily manage and update button labels within the conversation flow. This approach offers flexibility and scalability, enabling the chatbot to adapt to changing requirements and user interactions seamlessly. However, we recommend this method to advanced designers, as basic Python syntax or working with variables is necessary.

* **Set variable for buttons**: In this approach, we need to **set a variable** in any step in the flow preceding ANS node. Let's name the variable `button_options`.&#x20;

  * As its **value, we assign an array.** For example,  \["Fist topic", "Second topic", "Go back button"], or \["Vanilla", "Chocolate", "Strawberry"] Double quotes are necessary to indicate that these are strings.
  * The number of objects in the array corresponds to the number of buttons to be displayed.&#x20;
  * These objects serve as the labels for the buttons, and their order determines the sequence of buttons displayed.

  <figure><img src="/files/uICVZrb28eBWRQpYHhkc" alt="" width="375"><figcaption></figcaption></figure>

* **Implement button menu to ANS node:** To implement button options from a variable in an ANS node, follow these steps:
  * Select an intent within the ANS node configuration.
  * Enable the option "Use also as a chat button" for the selected intent. In the modal that appears, choose the "Configure button from a variable." In the dialogue window, select or enter the name of the variable where the button options are stored. Save the configuration.
  * Complete the configuration for the intent (recognition, target node, etc.) and save it.&#x20;
  * For buttons from a variable, it only needs to be implemented in one of the intents.
  * :exclamation:If you want to set up separate buttons using the conventional method in another intent, they will not be added alongside the buttons from the variable or appear on the frontend in the chat. Buttons from the variable apply to the entire ANS node.

<figure><img src="/files/sy7BYvGygQjZ4eDU3Gip" alt="" width="375"><figcaption></figcaption></figure>

* **Configure intent recognition for all intents:** After setting up the buttons from the variable, the next step is to configure intent recognition.&#x20;

  * Even though the variable containing all the button options is within one intent, you need to set up intent recognition and their targets for further flow direction for all the button options.&#x20;
  * Various types of [intent recognition](/digital-agent/conversation-flow/nodes-explained/answer-node#intents) can be used for this purpose, ranging from custom training sets and keywords to generative AI and custom conditions.

  <figure><img src="/files/F85IEd1UCnKJkfjuPiiK" alt="" width="375"><figcaption></figcaption></figure>
* **Configure the rest of ANS node:** The next step is to configure the remaining settings within the ANS node, such as [advanced settings](/digital-agent/conversation-flow/nodes-explained/answer-node#advanced-settings) and [fallback](/digital-agent/conversation-flow/nodes-explained/answer-node#fallbacks) scenarios, according to the specific requirements of the project.

### Buttons from the variable with pre-set string values

In this scenario, we prepare simple buttons and store them in a variable. If these buttons are predetermined and their values remain constant, we can list them as an array of strings. For instance, `["Vanilla", "Chocolate", "Strawberry"].`

Because the button values are known in advance, we can customize intent recognition to suit our requirements. This customization can be achieved through various methods, such as using a custom training set, relying on generative AI with defined prompts or keywords, or employing a combination of these approaches.

Check it out for yourself. Download the example project below and import it to your project in Digital Studio!

{% file src="/files/xTRYUwJzvQsR0lnq47ll" %}

{% hint style="info" %}
:pencil:**Note!**\
Unfortunately, when setting buttons from a variable, it's currently not possible to define an icon/image or a theme for the buttons. Therefore, it might be more practical to directly define buttons for each intent instead of using a variable.

:bulb:**Pro-tip!**

The only scenario where using buttons with predetermined labels from a variable might be preferable is when the order of intents in the ANS node configuration needs to differ from the order desired for the buttons.
{% endhint %}

### Dynamic buttons from variable

In this case, we require the values on the buttons to change **dynamically**. Within the array for button variables, values can be strings or other variables whose values are strings.&#x20;

For example:

* `["cat", "dog", "goldfish"]` - Simple strings representing button labels.

<figure><img src="/files/snYp8yD2WZxZjOG93thQ" alt="" width="375"><figcaption></figcaption></figure>

* `[ animal_1, animal_2, animal_3]` - Values are dynamically populated based on the contents of variables such as `animal_1`, `animal_2`, and so on. These variables must be stored in the flow before setting the array variable for buttons.

<figure><img src="/files/VVbrvU4vzhzYZnCzA3Cu" alt="" width="375"><figcaption></figcaption></figure>

* `[ animal_1, animal_2, animal_3, "Skip"]` - It's also possible to combine fixed values with variables. For instance, for skipping questions or returning to the previous step.

<figure><img src="/files/2KRcLXe3xTlQqWXvxhQI" alt="" width="375"><figcaption></figcaption></figure>

In this scenario, the dynamic aspect involves the names that appear on the buttons, with the number of buttons determined by the number of objects in the array. As the variables' values change during the conversation flow, the button labels automatically update accordingly.&#x20;

{% hint style="info" %}
:pencil:**Note!** Ensure that variables in the array are not empty to avoid issues with rendering the button menu in the chat bubble frontend!
{% endhint %}

\
After setting up the dynamic button values and integrating them into the ANS node, the next step is to **ensure proper intent recognition**. This is crucial for processing the user's input and advancing the conversation flow. Here's how to approach it:

#### **Predefined Button Values intent recognition**:

If the possible button values are known in advance, such as in the case of displaying recent purchases or product options, set up intents and routing for each potential option.

* For example, if a chatbot offers 30 different products and wants to display the user's last three purchases as buttons, create intent recognition for all 30 products.
* &#x20;Choose the appropriate method for intent recognition based on the chatbot's requirements and capabilities. Define keywords associated with each intent, or train the chatbot with a custom training set tailored to recognize user intents accurately, or utilize generative AI to prompt the chatbot to understand user intents.

#### Unknown dynamic button values intent recognition

When the button values are not known beforehand, and we cannot predefine intent recognition, conditional recognition based on the button options becomes necessary. Here's how to implement it:

* If the button values are stored in variables like `option_1`, `option_2`, `option_3`, which are then stored in an array variable `button_options`, clicking on a button sends the text displayed on the button as the user utterance.
* **Conditional Intent Recognition**:
  * **For Hidden Text Field**: If only the button menu is visible, users must click a button, and their utterance will match exactly what's on the clicked button. Set up conditions like `current_utterance == option_1` to match the user's input with the button text. Define target nodes accordingly to continue the flow based on the button clicked.![](/files/guoriSsGVvIA3Hv9ZwXG)

{% code title="Example condition syntax" overflow="wrap" %}

```python
current_utterance == option_1
```

{% endcode %}

<details>

<summary>Setting conditions for intent recognition step-by-step</summary>

* Open/Create ANS node.
* In section Intents, click on the + icon.
* A modal for intent configuration appears. Name your intent. Choose Condition as an intent type. Fill in the condition, and set a target node. Save.
* Create and configure the rest of condition intents to cover all possible routes in the flow.

</details>

* **For Enabled Text Field**: If users can input text freely, consider the possibility of their input matching a button option. Use conditions like `option_1 in current_utterance` to check if the text on a button is present in the user's input. Define target nodes based on these conditions to guide the user's flow after clicking a button or providing input.

{% code title="Example condition syntax" %}

```python
option_1 in current_utterance
```

{% endcode %}

* However, the user's input may not exactly match the text on the buttons. Here's how to save the situation. By leveraging generative AI prompts and using variable placeholders, the chatbot can dynamically recognize user intents.
* Prepare generative AI intents and their prompts. Create a concise description indicating the user's query relates to a specific button option. For example, "User's query pertains to option 1."
* Within the ANS node, [edit the generative AI superprompt](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai#method-2-edit-default-super-prompt-adding-context-of-a-conversation) to provide context and include a variable representing the button options.&#x20;

<details>

<summary>Setting generative AI intents with variables in prompt step-by-step</summary>

**Prepare Generative AI Prompt**:

* In the Intents section, click on + icon.
* Modal for intent configuration appears. Name the intent. Choose Generative AI as intent type.
* Create a concise description indicating the user's query relates to a specific button option. For example, "User's query pertains to option 1". ![](/files/NSzy8bo3K1339HcTXuFt)
* Configure and save.
* Repeat the process for other options of your buttons.

**Edit Generative AI super prompt**

* In ANS node, click on the pencil icon below the title Intents.
* A modal with a super prompt appears. This prompt consists of a pre-set system message and instructions as well as a description of the intents you've configured within Generative AI intents.\
  ![](/files/o0mH69vANw5HamjpfGHG)
* You may edit this instruction of super prompt.

![](/files/0aRLrc4fnBzI1T3CRkq4)

* We recommend adding a context or the question and that user was shown a button menu. \
  Since the button menu is set from a variable, you may also use a variable placeholder and fill in dynamically the button values to the prompt.

{% code title="Edited system message " overflow="wrap" %}

```markdown
You are a useful assistant used for intent recognition. **Context: The user was asked a question and also offered a button menu with options in the following order: {button_options}.** You are given a list of intents with its name, meaning and description. Please classify the sent utterance and respond only intent name from the list as a JSON object only. Carefully read all the instructions.
```

{% endcode %}

* When you're happy with the prompt edit, click Save.

</details>

### Buttons from a variable with dynamic values from API&#x20;

Explore a dynamic approach where the content of the button menu is fetched in real time from an external data source via an API.

By integrating APIs into the configuration of button menus, chatbots can offer more dynamic and personalized experiences to users. This method allows for real-time updates of available options, ensuring that users have access to the most relevant and up-to-date information within the conversation interface.

Here's how the implementation process works:

1. **API Call Integration**: Begin by integrating API calls using fetch-url or similar methods. The API call retrieves relevant data that you want to display as button options in your chatbot interface. This data can include product recommendations, recent order history, subscription plans, or any other information relevant to your use case.
2. **Data Processing and Storage**: Once you receive the output from the API call, process the data and extract the values that you want to display as button options. Store these values in a variable such as `button_options`, as an array. Additionally, if needed, you can store individual objects in separate variables for later use for intent recognition.
3. **Configuration of Button Menu in ANS Node**: Next, configure the button menu in the ANS node of your chatbot. Select the option to use buttons from a variable and specify the variable (`button_options`) that contains the array of button options.
4. **Intent Recognition Configuration**: Configure intent recognition to handle user interactions with the button menu effectively. Choose an appropriate method for intent recognition based on the nature of your project. If the button options are known in advance, you can set up intent recognition accordingly. However, if the options are dynamic or if you allow free-text input alongside buttons, adjust the intent recognition method accordingly.

#### Example project

The objective of this model project is to create an interactive chatbot that allows users to select their Hogwarts house from a list of options retrieved via an API call. Upon selecting their house, users will proceed through a tailored conversation flow based on their choice.

<figure><img src="/files/IBjNZE5JlGGCRa2Wcwt5" alt=""><figcaption><p>Button values are obtained from API call.</p></figcaption></figure>

Implementation steps:

* **API Integration:**

  * &#x20;Integrate an API call to retrieve the names of Hogwarts houses.
  * Upon receiving the API response, extract the house names and store them as an array in **`button_options`**.

  <figure><img src="/files/sTjJ2oSsrujvnO0E3D2d" alt=""><figcaption></figcaption></figure>

  * The configuration of the `fetch_url` function will vary for each API depending on its specific endpoints and the expected output format. For this example, we utilized the publicly available [Wizard Words API](https://wizard-world-api.herokuapp.com/swagger/index.html). When integrating different APIs into your chatbot project, ensure that the `fetch_url` function is tailored to the API's requirements and response structure to retrieve the desired data effectively.
  * Based on the API call output, set the **`button_options`** variable to store the array or our button menu options. Store individual individual options in separate variables as well.

  <figure><img src="/files/E4qSWgWL5VDNTpFzaMbr" alt=""><figcaption></figcaption></figure>
* **Button Menu Implementation:**
  * Implement the button menu functionality in the ANS node.
  * Create an intent, and select Use also as a chat button. Select Set buttons from a variable, and select **`button_options`** (or the name variable where you store your prepared array).
* **Intent Recognition:**

  * Set up intent recognition to identify the user's selection from the button menu.
  * In the example project, we used conditions to compare input utterance and button option variable value.

  <br>

  <figure><img src="/files/C80sqrFT5cxfgWRRUj4p" alt=""><figcaption></figcaption></figure>
* **Chatbot Flow Configuration:**
  * Configure the flow of the chatbot to handle user interactions after house selection.
  * Upon the user selecting a house, store the chosen house as a variable for further use in the conversation flow.
  * Design a tailored conversation flow based on the user's chosen house, providing personalized responses and prompts.
* **Generative AI Interaction:**
  * Integrate generative AI capabilities to engage users in conversation based on their selected house.
  * Utilize prompts and instructions within the conversation flow to guide the user through interactive dialogues with the chatbot.

<figure><img src="/files/Fua11aXvBMq3lOBPPuI5" alt=""><figcaption></figcaption></figure>

Check it out for yourself. Download the example project below and import it to your project in Digital studio!

{% file src="/files/Q6aXFjKuURyLVAaOG3RV" %}

Here are some ideas for more use cases for API-driven button menus:

1. **Personalized Product Recommendations**: Showcasing personalized product recommendations based on user preferences, browsing history, or past purchases.
2. **Recent Order History**: Providing users with quick access to their recent order history, allowing them to easily reorder items or track their deliveries.
3. **Subscription Management**: Allowing users to manage their subscriptions by presenting options to upgrade, downgrade, or modify their subscription plans directly from the chat interface.
4. **Service Selection**: Offering users a selection of available services or features tailored to their account type or subscription level.
5. **Tariff Selection**: Presenting users with a choice of tariffs or pricing plans based on their usage patterns, geographic location, or other relevant factors.
6. **Location-Based Services**: Enabling users to select delivery addresses, pickup locations, or service areas based on their current location or saved preferences.

### Buttons from a variable with AI-generated values

In this approach, we leverage the generative AI within the [AI node](/digital-agent/conversation-flow/nodes-explained/ai-node) to dynamically generate button labels based on user input. The generative AI can generate button labels autonomously, either solely based on the [prompt](/for-advanced-users/prompting-cookbook) or with the assistance of a [knowledge base](/digital-agent/advanced-functions/knowledge-base). The output generated by the AI is processed in the background, and a variable containing the generated buttons is prepared.

Subsequently, we implement these dynamically generated buttons into the ANS node (Answer node), where they are displayed to the user. From there, we proceed according to the conversational design tailored to our project, including intent recognition, handling various flow scenarios, and more.<br>

**Generating button options with AI (and knowledge base)**

* In the AI node, craft a prompt with instructions for generating the buttons. Within the prompt, instruct the AI to generate a response in the form of a dictionary. Predefine the structure and keys, indicating to the AI that it only needs to populate the values.

<pre data-title="Example prompt" data-overflow="wrap"><code><strong>You're are a smart assistant. Based on user's input, your task is to find exactly 3 most similar topics in ask_knowledge base function. Provide only topics name in form of a string. Respond with a dict and only fill in the blank values to the predetermined keys. Output must look like this:
</strong><strong>{
</strong>    "1": "",
    "2": "",
    "3": ""
}
</code></pre>

**Processing AI output into button variable**

* In your flow, connect the AI node generating buttons to a new FNC node.
* In this FNC node, first, create a variable to store AI node output. Name it for example **`generated_dict.`**  Output from generative AI is always in the form of a dict logged on the backend. To store generative AI output as value to your new variable, use this syntax:

{% code title="generated\_dict" overflow="wrap" %}

```python
gpt_response["response_text"]
```

{% endcode %}

* Second, let's transform the string saved in **`generated_dict`** into JSON object that can be further processed using Python syntax. Create a new variable. Name it, for example **`json_dict`.** Use json.loads method with this syntax:

{% code title="json\_dict" overflow="wrap" %}

```python
json.loads(generated_buttons)
```

{% endcode %}

* Now the dict generated with AI is stored as JSON object in `json_dict` variable. Next, let's store values from the dict into individual variables for each button. Create new variable and name it, for example **`button_1`**. Use Python syntax to reference the key which value you want to extract into new variable.&#x20;

{% code title="button\_1" overflow="wrap" %}

```
json_dict["1"]

#From dictionary stored in json_dict, save the value under the key "1" to the button_1 variable.
```

{% endcode %}

* Similarly, repeat the process to create individual variables for each button of generated dictionary.

{% code title="button\_2" overflow="wrap" %}

```python
json_dict["2"]
```

{% endcode %}

{% code title="button\_3" overflow="wrap" %}

```python
json_dict["3"]
```

{% endcode %}

* Finally, let's arrange our button into an array. Create a new variable and name it, for example, **`button_options`**. This variable will be used in ANS node to set the button menu. Set an array of individual button variables as it value.&#x20;

{% code title="button\_options" overflow="wrap" %}

```python
[button_1, button_2, button_3]
```

{% endcode %}

* Optionally, if you want to add other buttons with statuc values, add them to the array as a string.

{% code title="button\_options" overflow="wrap" %}

```python
[button_1, button_2, button_3, "Back to main menu", "Skip"]
```

{% endcode %}

#### Implementing buttons from the variable into ANS node

* Implement the dynamically generated buttons into the ANS (Answer) node. Create an intent with the chatbot button  configuration enabled and select Configure buttons from variable. Set the **`button_options`** variable as a source for your menu options.
* Proceed with the conversational design based on your project's requirements. Configure intent recognition, handle various flow scenarios and ensure seamless interaction with the user.

#### Example project

In this project, our chatbot assists trainers who have forgotten the name of a Pokémon but remember its description. The bot uses the trainer's description as input for a generative AI, which generates three suggestions for the Pokémon's identity. We then process the AI's output in the background, storing it in variables. These variables are then implemented as button options, allowing the user to select from the suggested Pokémon.

<figure><img src="/files/q9vsJAevTg4fwtu2iL6B" alt=""><figcaption></figcaption></figure>

Implementation steps:

* **User Input:** The trainer describes the Pokémon they're trying to identify (ANS node)
* **Generative AI Response:** Using the trainer's description, the generative AI generates three suggestions for the Pokémon's identity.&#x20;

{% code title="Example prompt" overflow="wrap" %}

```
Be brief in your answers. Help the user identify a pokémon. The user describes to you what the pokémon looks like. Your task is to provide exactly 3 options of pokémon names that fit that description. Respond only with a dict with pokémon names as string values for keys pokemon_1, pokemon_2 and pokemon_3 (fill in the blank values). Output must look like this:
{"pokemon"_1: "",
"pokemon"_2: "",
"pokemon_3": ""}
```

{% endcode %}

* **Background Processing:** We process the AI-generated suggestions in the background, storing them in variables.

  * First, we stored the generative AI output into `generated_pokemons` variable. Then we transformed it into JSON object and stored that into `pokemons` variable.
  * Next, the extracted values from JSON dictionary  in `pokemons` to individual variables `pokemon_1`, `pokemon_2` and `pokemon_3`.
  * Finally, we created an array of the individual pokemon variables and store them in into `button_options` variable.

  <br>

  <figure><img src="/files/vMdWj5zwY0W78biLoBQa" alt="" width="375"><figcaption></figcaption></figure>
* **Implement as Buttons:** The stored suggestions are implemented as button options in the chat interface. The user can now choose from the suggested Pokémon.

<div align="center"><figure><img src="/files/UHbFoDcj5cpbXdsMV5Gh" alt="" width="375"><figcaption></figcaption></figure></div>

* **User Selection:** The user selects one of the suggested Pokémon by clicking on the corresponding button.
* **Further Interaction:** Upon selection, the chatbot proceeds to another node where the generative AI generates detailed information about the selected Pokémon, helping the trainer with their query.

Check it out for yourself. Download the example project below and import it to your project in Digital studio!

{% file src="/files/MGtr9WMbnrxx4EWA1oKD" %}

### Buttons from a variable generated by AI with varying options count

Dynamic button generation can occur through prompts alone or with the assistance of a knowledge base, potentially resulting in a **fluctuating number of buttons**. When generating buttons solely from prompts, the count may vary based on the context provided.&#x20;

Similarly, leveraging a knowledge base alongside prompts introduces the possibility of returning differing quantities of relevant results. This section delves into managing variable button counts, considering both prompt-based and knowledge base-driven scenarios, and adapting to the evolving context of the conversation.

**Generating button options with AI (and knowledge base)**\
The implementation [process](/for-advanced-users/conversation-design-tips/implementing-chat-buttons#buttons-from-a-variable-with-ai-generated-values) remains consistent with generating a fixed number of buttons. We compose a prompt outlining instructions for generating button suggestions.

* &#x20;What is different, is specifying both the minimum and maximum number of suggestions desired.
* Additionally, we define the output structure and provide an example of how the dictionary should be formatted.&#x20;
* To facilitate dynamic button counts, we augment the dictionary by including a "result" key with an instruction for the generative AI to populate it with the count of previously filled keys. This count indicates the number of buttons generated, offering flexibility in accommodating varying counts based on the context.

{% code title="Example prompt" overflow="wrap" %}

```
You are a smart assistant. Based on the user's input, your task is to find 3  to 5 most similar topics in ask_knowledge base function. Provide only topic names in the form of a string. Respond with a dict and only fill in the blank values to the predetermined keys. You must fill minimum 3, but maximum 5 keys with topics. In case of filling out less that 5, leave "" in the key value. Also, always fill in the "key" result with number of previously filled keys. Output must look like this:
{
    "1": "",
    "2": "",
    "3": "",
    "4": "",
    "5": "",
    "result": ""
}
```

{% endcode %}

#### Processing AI output into buttons variable

The next step in processing the AI output remains unchanged. We store the output in a variable, convert it into a JSON object, and unpack the individual values from the dictionary in the JSON object into separate variables.

* The key difference lies in introducing a fork in the flow using a DEC node based on the value in the "result" key. This directs the flow to a point where we prepare and store a variable with an array of buttons with the desired count. Eg. variable **`button_options`** with array `[button_1, button_2, button_3, button_4]` if the number of results from generative AI was 4.

<figure><img src="/files/dbflifISOmHoFvPilzHC" alt="" width="371"><figcaption></figcaption></figure>

{% hint style="info" %}
:pencil:**Note!**\
It's crucial to ensure that the array in the variable defining the button menu does not contain empty variables or empty strings. Otherwise, the button menu would not render on the front-end of the chat bubble.
{% endhint %}

**Subsequent steps**

The subsequent steps, such as i[mplementing buttons in the ANS node](#method-2-setting-buttons-from-variable), intent recognition, and setting up further flow, remain the same.

**Example project**

In this example project, we leverage generative AI to generate 3-5 Pokémon options based on the user's description. The user's input description is processed by the generative AI to generate 3-5 Pokémon options that match the description.&#x20;

<figure><img src="/files/9thz4pPFh7royne7wy7D" alt=""><figcaption></figcaption></figure>

Behind the scenes, we process the AI output and create a fork in the flow based on the number of generated options. We then save separate arrays for 3, 4, or 5 Pokémon options. The chatbot displays 3-5 buttons, each corresponding to a Pokémon option, allowing the user to select their desired Pokémon. Upon clicking a button corresponding to a Pokémon, the generative AI provides information about that Pokémon, offering details or characteristics.&#x20;

This project demonstrates how dynamic button generation based on generative AI output can enhance user interaction and provide personalized responses in a chatbot environment.

{% code title="Example prompt" overflow="wrap" %}

```
Be brief in your answers. Help the user identify a pokémon. The user describes to you what the pokémon looks like. Your task is to provide 3 to 5 options of pokémon names that fit that description. Respond only with a dict pokémon names as string values for keys pokemon_1, pokemon_2 and pokemon_3, pokemon_4 and pokemon_5. (fill in the blank values).  You must fill at least 3 pokemon keys. If you fill in less than 5, leave the value of the others "". In the key "result" fill in a number of how many pokémon keys you have filled. Output must look like this:
{"pokemon"_1: "",
"pokemon"_2: "",
"pokemon_3": "",
"pokemon_4": "", 
"pokemon_5": "",
"result": ""}
```

{% endcode %}

* **Background Processing:** In subsequent [DEC node](/digital-agent/conversation-flow/nodes-explained/decision-node), we process the AI-generated suggestions in the background, storing them in variables.

  * First, we stored the generative AI output into `generated_pokemons` variable. Then we transformed it into JSON object and stored that into `pokemons` variable.
  * Next, the extracted values from JSON dictionary  in `pokemons` are stored to individual variables `pokemon_1`, `pokemon_2`,`pokemon_3`,`pokemon_4` and `pokemon_5`
  * Also, a value from the key `result` is stored into an individual variable of the same name.
  * Then, we created a fork in the flow based on the number of generated options.&#x20;
  *

  ```
  <figure><img src="/files/9DXuuD4mbRQDzjIDljgN" alt="" width="375"><figcaption></figcaption></figure>
  ```

  * Each branch leads to a FNC node, where **`button_options`** is set with the appropriate number of objects in an array `[pokémon_1, pokémon_2, pokémon_3]`, or  `[pokémon_1, pokémon_2, pokémon_3, pokémon_4]`, or `[pokémon_1, pokémon_2, pokémon_3, pokémon_4, pokémon_5]`

  <br>

  <figure><img src="/files/fftUKvE4gDEYQTZLIunH" alt="" width="375"><figcaption></figcaption></figure>
* **Implement as Buttons:** The stored suggestions are implemented as button options in the chat interface. The user can now choose from the suggested Pokémon.

<div align="center"><figure><img src="/files/UHbFoDcj5cpbXdsMV5Gh" alt="" width="375"><figcaption></figcaption></figure></div>

* **User Selection:** The user selects one of the suggested Pokémon by clicking on the corresponding button.
* **Further Interaction:** Upon selection, the chatbot proceeds to another node where the generative AI generates detailed information about the selected Pokémon, helping the trainer with their query.

Check it out for yourself. Download the example project below and import it to your project in Digital studio!

{% file src="/files/pub2RMjW4L97JgqbURra" %}


# Intent recognition tips

## Quick links for you

{% content-ref url="/pages/2adSBbIvdD9vvUHYLAoc" %}
[Fine-Tuning Intent Recognition using Generative AI](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai)
{% endcontent-ref %}

{% content-ref url="/pages/01dgsCOkifMWBc11w8ed" %}
[Multi-step intent recognition](/for-advanced-users/intent-recognition-tips/multi-step-intent-recognition)
{% endcontent-ref %}

{% content-ref url="/pages/q3zI8getBj8k08OBG3o3" %}
[Recognition based on named entity extraction](/for-advanced-users/intent-recognition-tips/recognition-based-on-named-entity-extraction)
{% endcontent-ref %}


# Fine-Tuning Intent Recognition using Generative AI

This guide provides you with step-by-step instructions on harnessing the power of generative AI within our low-code platform to optimize the prompt for intent recognition.

Discover the ins and outs of refining prompts, allowing you to create more intelligent and context-aware conversational experiences for your users. Dive into the details and unleash the full potential of generative AI for precise and accurate intent recognition.

## **Understanding Basics of Generative AI for Intent Recognition**

Generative AI plays a pivotal role in intent recognition, offering a dynamic approach to understanding user input in conversational agents. Unlike rule-based methods, generative AI allows the system to generate responses based on learned patterns and context, providing a more flexible and context-aware interaction.

<figure><img src="/files/6azNupQFhVgKHnZ1OuPY" alt=""><figcaption></figcaption></figure>

<details>

<summary>Step-by-step guide on setting Generative AI intents</summary>

Navigate to the ANS node within the flow editor. Open the modal for the ANS node by clicking on it.

* **Add a new intent:** In the Intent section of the ANS node modal, click on the "+" button to add a new intent.
* **Select Generative AI:** Choose "Generative AI" as the intent recognition method for your new intent.
* **Enter a friendly name:** Input a friendly and recognizable name for your intent. This name will help you identify and manage intents effectively.
* **Define brief intent meaning:** Provide a concise meaning for your intent in a few words. This brief description will assist the system in recognizing user input and triggering the appropriate responses.
* **Add intent description:** Optionally, you can fill in a brief description of your intent. Keep it concise, considering the token limit, and provide additional context that aids in understanding the purpose of the intent.

:exclamation:Be mindful of the tokens you use in the intent description. Tokens are units of text that the model processes and there may be limitations of max token limits for the whole intent recognition prompt. Efficient use of tokens ensures optimal performance and cost.

</details>

{% hint style="info" %}
While Generative AI is trained on a diverse range of general language data, recognizing specific intents may require some **fine-tuning to align with your unique use case and domain.** This is particularly important to ensure that the conversational agent accurately interprets and responds to user input in the context of your application.
{% endhint %}

In our low-code platform, you have two powerful options for **fine-tuning Generative AI intent recognition, allowing you to tailor the model to better suit your specific needs:**\
\
[#method-1-intent-description-enhancing-intent-understanding](#method-1-intent-description-enhancing-intent-understanding "mention")\
\
Fill in the intent description to provide additional context for the Generative AI model. [This option](#method-1-intent-description-enhancing-intent-understanding) allows you to offer a concise but informative description of the intent, aiding the model in better understanding the nuances and specifics associated with each intent. <br>

:warning:When crafting these descriptions, be mindful of token usage, ensuring that they effectively communicate the intent without exceeding any limitations. :warning:<br>

[#method-2-edit-default-super-prompt-adding-context-of-a-conversation](#method-2-edit-default-super-prompt-adding-context-of-a-conversation "mention")\
\
Customize the default super prompt used behind the scenes to add dynamic context for enhanced intent recognition. [This option](#method-2-edit-default-super-prompt-adding-context-of-a-conversation) empowers you to inject specific details or context relevant to your application directly into the model's training prompt. \
By modifying the super prompt, you can guide the model to focus on certain aspects or nuances, refining its ability to accurately recognize and respond to user intents.

***

## Method #1: **Intent description: Enhancing intent understanding**

Crafting meaningful intent descriptions can significantly enhance the model's understanding of user queries. Discover valuable tips and examples on effectively filling in intent descriptions, ultimately leading to more precise and context-aware interactions with your conversational agents. Let's delve into the art of providing descriptive context to elevate your intent recognition capabilities.

<figure><img src="/files/b1fmPgIXEtPnWGYb8KPh" alt=""><figcaption></figcaption></figure>

<details>

<summary>Provide user's utterance examples</summary>

When designing prompts for intent recognition, it's crucial to provide **clear and diverse examples of user utterances**.

* Example: \
  Intent description: User asks for weather forecast \[Show me the weather in London; Tell me how hot it'll be in Sydney; I wonder if it's going to rain in Seattle; Is it going to be sunny in Miami?]
* Example:\
  Intent description: User asks you to wait \[eg. A moment please; Hold on for a sec; Just a second]

</details>

<details>

<summary><strong>Include relevant keywords</strong></summary>

When designing prompts for intent recognition, it's crucial to sprinkle in r**elevant keywords related to the specific topic.** These keywords help guide the model to better understand the user's intent.

* *Example*:\
  Meaning: Reclamation\
  Intent Description: claim, damage, not working, broken, won't turn on, not functioning
* *Example:*\
  Meaning: Weather forecast\
  Intent Description: temperature, rain, wind, sun, snow, storms, heatwaves, frosty conditions

</details>

<details>

<summary>Add <strong>synonyms and alias terms</strong></summary>

Anticipate variations in user language by including **synonyms** **or alias terms** within the intent description. This expands the model's understanding and improves recognition accuracy.

* *Example:* If the intent involves checking account balances, include synonyms like "account status," "financial overview," or other terms users might use interchangeably.

</details>

<details>

<summary>Highlight contextual boundaries</summary>

Explicitly outline contextual boundaries by s**pecifying situations where the intent is not relevant.** This ensures that the model does not mistakenly associate the intent with unrelated user input.

* *Example:* Intent Description: "User expressing interest in product discounts during promotions. Irrelevant for questions about product warranties or post-purchase support."

</details>

<details>

<summary>Use n<strong>egative definitions for exclusions</strong></summary>

Clearly articulate what the intent **is not about by providing negative definitions or exclusions.** This helps the model distinguish between closely related intents and improves precision.

* *Example:* Intent Description: "Focused on user inquiries regarding product availability and stock status. Excludes questions about product specifications or customer reviews."

</details>

<details>

<summary><strong>Consider multifaceted intents</strong></summary>

Acknowledge intents that may have multiple facets or subcategories. Break down complex intents into distinct components within the description, providing clarity for the model.

* *Example:* Intent Description: "User expressing interest in various tech-related discounts, such as promotional offers, seasonal discounts, or loyalty rewards."

</details>

***

## Method #2: Edit default super prompt: Adding context of a conversation

Behind the scenes, all Generative AI intent inputs provided through the GUI are amalgamated into a comprehensive super prompt that empowers the ANS node. This unified prompt serves as a directive for the model during intent recognition, ensuring a seamless and efficient process. To facilitate this, a **standardized prompt** is generated for the ANS node, instructing the model on how to handle incoming utterances.\
\
The template for this system message is as follows:

{% code title="System message" overflow="wrap" %}

```
You are a useful assistant used for intent recognition. You are given a list of intents with its name, meaning and description. Please classify the sent utterance and respond only intent name from the list as a JSON object only. Carefully read all the instructions.
```

{% endcode %}

{% code title="Super prompt instructions" overflow="wrap" %}

```
Classify the utterance that you receive as the next message into one of these categories by selecting the most dominant topic from this list below:

- friendly name of intent 1: meaning of intent 1 [description of intent 1]
- friendly name of intent 2: meaning of intent 2 [description of intent 2]
[...]

If the requested values cannot be found, you should return "NOT_FOUND". Always respond with a valid JSON object in the format { 'recognized_intent': string }. Do not return anything other than JSON.
```

{% endcode %}

When fine-tuning your Generative AI intents, you have the option to **customize the default super prompt,** which serves as a crucial directive for the model during intent recognition.&#x20;

**To access the super prompt editing window you need:**

* Have **at least one existing Generative AI intent** set and saved.
* Navigate to the Intents sections in the ANS node and click on the pencil icon:pencil2:.
* Next, you can customize the super prompt system message and instructions.

<figure><img src="/files/w77Q2Y364XCL0UP8ECUS" alt=""><figcaption></figcaption></figure>

* Edit instructions or add more context in the prompt. Furthermore, you **can add placeholders of existing variables** to fill in the prompt in a personalised, dynamically changing way. The current value of the variable will be filled into the prompt.
* Use this feature to your advantage. Enhance the understanding of the situation, previous interactions or knowing personal info about the user to handle the Digital agent - user communication gracefully and to master intent recognition with contextual awareness.

<figure><img src="/files/pZle7oDtNp8wNlNklWWO" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
While this customization allows you to add context and refine prompt, **we strongly recommend limiting edits to the system message only.** Especially don't temper with the "Text after list of intents" section of a prompt. This is essential for maintaining the integrity of backend processes and ensuring seamless interactions between the user and the conversational agent.
{% endhint %}

\
Customizing the system message within the default super prompt offers a powerful avenue to introduce context for more nuanced and accurate intent recognition. It's crucial to note, however, that <mark style="color:red;">**digital agents lack inherent knowledge of the preceding user interactions unless explicitly provided in the prompt.**</mark> Additionally, without **supplementary contextual information**, there may be a decrease in intent recognition precision.

**Here are some customization tips:**

<details>

<summary><strong>Explicitly provide previous question information</strong></summary>

Edit system message to add context. Explicitly state the previous question, so the generative AI is given context of conversation and can better classify the user's utterance into intent categories.

Examples:

{% code title="System message" overflow="wrap" %}

```
[...] Context: The user was asked "What your favourite animal is?" Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```
[...] Context: The user was asked to describe for further description of product malfunction. Please classify [...]
```

{% endcode %}

You can also add a placeholder of existing variables to be able to fill in the conversational context dynamically. In flow, set a variable in each MSG node and populate it with a string of message text resumé. Then, use:

Example:

{% code title="System message" overflow="wrap" %}

```python
[...] Context: The user was asked {last_question}. Please classify [...]
```

{% endcode %}

</details>

<details>

<summary>Provide conversation history summary</summary>

Pre-set a variable with summary of interactions or conversation history. Then, use a placeholder variable to add this as a context.

Example:

{% code title="System message" overflow="wrap" %}

```python
[...] Context: Digital agent informed the user that {summary}. The user's utterance probably reacts to that. Please classify [...]
```

{% endcode %}

</details>

<details>

<summary>Provide user-specific personalised metadata</summary>

Add a placeholder for an existing, pre-defined variable with personalised metadata. These can help the generative AI to understand the user's situation better.&#x20;

To illustrate, the utterance *"I want to have 10 GB of mobile data"* might belong to intent `tariff upgrade` or `tariff downgrade` depending on the user's current tariff parameters.&#x20;

Example:

{% code title="System message" overflow="wrap" %}

```
[...] Context: The user account state is {balance}, with {debt} to pay. Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```
[...] Context: The user currently has the [tariff_name}, with {data_amount} GB of mobile data. Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```python
[...] Context: User's last bought product are {product_1}, {product_2}, {product_3} Please classify [...]
```

{% endcode %}

</details>

<details>

<summary>Provide temporal refenrences</summary>

For complex recognition which includes temporal awareness or comparison against calendar, provide a placeholder for variables that contain time and date metadata.

Example:

{% code title="System message" overflow="wrap" %}

```
[...] Context: The user was asked whether she/he can pay the debt before {deadline_date}. Today is {current_date}. Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```
[...] Context: Today is {day_of_week}, {date}. It's {time} right now. Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```
[...] Context: The shop is open from {opening_hour} to {closing_hour}. Please classify [...]
```

{% endcode %}

</details>

<details>

<summary>Provide conversation context</summary>

Add contextual info and describe a previous interaction or scenario that lead the user to give the current input.

Examples:

{% code title="System message" overflow="wrap" %}

```
[...] Context: The previously recognized intent was on {topic}. Take into consideration that current input may or may not reflect the previous interaction. Please classify [...]
```

{% endcode %}

{% code title="System message" overflow="wrap" %}

```
[...] Context: User successfully finished a process of {scenario_type} and is asked whether he/she wants anything else. Please classify [...]
```

{% endcode %}

</details>

***


# Multi-step intent recognition

When dealing with open-ended questions that require categorization into numerous fine-grained intents, it is advisable to adopt a **multi-step approach and prepare a recognition tree.**&#x20;

This method involves creating a tree structure consisting of [Answer nodes](/digital-agent/conversation-flow/nodes-explained/answer-node), where utterances are processed and intents are recognized. Due to limitations in prompt space and the complexity of categorization, it is recommended to divide the process into multiple steps.

<figure><img src="/files/YIgZp7NpynLUt7MkcL0m" alt=""><figcaption></figcaption></figure>

### Multi-Step Approach

#### Step 1: General Topic Recognition

In the first Answer node, focus on identifying broad topics (e.g., "invoice"). After recognizing the main topic, pass the input to the next "Answer" node.&#x20;

<figure><img src="/files/vJsyZiYmfzcPmpmgCgXm" alt=""><figcaption></figcaption></figure>

* Add new intent.
* Name the intent, select Generative AI type.
* Fill in the Meaning and Description prompt. For further details and tips on Generative AI intent recognition prompts, visit [Fine-Tuning Intent Recognition using Generative AI](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai#method-1-intent-description-enhancing-intent-understanding)
* Set a target (another ANS node devoted to the intent's topic)
* Enable the reuse utterance feature within the intent configuration window, so input utterance will be reused in the next step.

#### Step 2: Sub-Topic Classification

<figure><img src="/files/xdVDsOR0sey9Tvm7Zxd8" alt=""><figcaption><p>The second level of intent recognition. If recognized in the first level, the reuse utterance feature is enabled and utterance is transferred to the second level, each ANS node subcategorizing a specific topic (eg. ANS_INVOICES, ANS_RECLAMATION, ANS_DELIVERY).</p></figcaption></figure>

In the second "Answer" node, categorize the input into more specific sub-topics (e.g., "invoice not received," "invoice discrepancy," "payment for invoice"). Further, route the input based on the recognized sub-topic.

* Follow similar steps as in the previous ANS node.
* If you wish to add another level of recognition, enable the reuse utterance feature within the intent configuration window.\
  ![](/files/GgLGlK2To9PZqXgcvGr1)
* If this level of recognition granularity is final and you wish to continue with the flow (to MSG node with answer or next question etc.), disable the reuse utterance feature. Upon encountering the next answer node in the flow, the Digital agent will stop and wait for a new user input.\
  ![](/files/AsEIDIwiObGvK5ymgFBZ)

#### Step 3: Fine-Grained Categorization (Optional)

<figure><img src="/files/VHKT2v0qS7m4beLUGQYW" alt=""><figcaption><p>Third level of recognition. If specific intent is recognized in the second level, due to enabled reuse utterance feature the input is reused for recognition in the third level. This is the final level of recognition granularity, so reuse utterance need to be set to disabled here.</p></figcaption></figure>

For even finer categorization, consider adding a third level of classification. For example, within the "change delivery" sub-topic, identify whether the change is delivery time postponement or redirecting delivery to a different address.

**Here's an example project:**

{% file src="/files/xbSgN09SENRD1m1pqYI0" %}

## Perks and Limitations

#### Advantages of Multi-Step Approach to Intent Recognition:

1. **Enhanced Precision**: Breaking down the intent recognition process into multiple steps allows for more precise identification of the user's query, minimizing the risk of misinterpretation.
2. **Reduced Complexity**: Dealing with complex queries becomes more manageable when the process is divided into individual steps, simplifying the overall recognition task.
3. **Improved Conversation Flow Management**: Each step in the process is dedicated to a specific phase of the query, facilitating better management of conversation flow and directing users to relevant parts of the chatbot's script.
4. **Flexibility and Scalability**: The multi-step approach offers flexibility and scalability for future development. It allows for the addition of new categories or expansion of existing sub-topics without significant code complexity.
5. **Ease of Debugging and Maintenance**: Simplified and systematic intent recognition makes debugging and maintenance of the chatbot system easier, even as the complexity of scenarios increases.
6. **Enhanced User Experience**: Overall, this approach leads to a better user experience. Users feel that the chatbot can better understand their queries and provide relevant and timely responses.

#### Disadvantages of Multi-Step Approach to Intent Recognition:

1. **Increased Development Time**: Implementing a multi-step approach may require more development time initially due to the need to design and integrate the recognition process into the chatbot system.
2. **Potential for Overhead**: The multi-step approach may introduce additional processing overhead, especially if the recognition process involves multiple layers of classification or extensive branching logic, leading to increased processing time and latency between obtaining user input and provided Digital agent's output.
3. **Risk of Overfitting**: Over-segmentation of the recognition process into too many steps could lead to overfitting, where the system becomes overly specialized and less adaptable to variations in user queries.
4. **Complexity for Novice Users**: Novice users or developers may find it challenging to understand and implement the multi-step approach, especially if they lack experience in natural language processing or chatbot development.
5. **Dependency on Training Data**: The effectiveness of the multi-step approach relies heavily on the quality and diversity of the training data used to train the intent recognition models at each step.
6. **Potential for Error Propagation**: Errors or misclassifications in one step of the process may propagate to subsequent steps, leading to inaccurate responses or user frustration.

{% hint style="info" %}
**Note!**:pencil:

The multi-step approach to intent recognition **can be** effectively **utilized** **for both** :white\_check\_mark:**voicebots** and :white\_check\_mark:**chatbots**.

However, when implementing this approach for :telephone\_receiver:**voicebots**, designers should consider that using Generative AI for intent recognition inherently introduces a latency of approximately half a second to a second per node. **Chaining multiple steps** in the recognition process can further **extend the processing time**, potentially **impacting the user experience.**

Designers should be mindful of this latency and its potential impact on user satisfaction, especially in voice interactions where users expect immediate responses.
{% endhint %}


# Recognition based on named entity extraction

In conversational design, named entity extraction is typically utilized in scenarios where specific information needs to be obtained, such as numbers (age, amount, order number), special codes (ID numbers, license plate numbers), addresses, names (of individuals, cities, streets), and similar entities.

#### **Understanding Named Entities**

**Named entities**, often referred to as entities, are specific objects, individuals, dates, quantities, or other types of information that are recognizable and distinct within a given context. In the realm of conversational AI, named entities serve as key components for understanding user input and providing relevant responses.&#x20;

These entities can range from simple entities like **dates** and **numbers** to more complex ones such as **addresses**, **names**, and **custom-defined entities** tailored to specific use cases. The extraction of named entities from user utterances enables the system to comprehend the user's intent more accurately, facilitating smoother interactions and personalized responses.

* When designing a flow that involves entity extraction, it's crucial to ensure that the extraction process is properly set up. See [#set-named-entity-extraction-with-smart-functions](#set-named-entity-extraction-with-smart-functions "mention")
* Additionally, actions need to be defined based on the output of the extraction for further flow control. This includes determining what should happen if an entity is successfully extracted from the user's utterance, as well as handling cases where extraction fails or requires validation. See [#configure-flow-based-on-extraction-output](#configure-flow-based-on-extraction-output "mention")
* Furthermore, it's essential to anticipate and prepare for various user responses, such as if the user claims not to know or remember the requested information or requests additional time to provide it. Therefore, the design must include intent recognition and processes to address these potential objections and handle user interactions smoothly. [#handling-various-user-responses-with-intent-recognition](#handling-various-user-responses-with-intent-recognition "mention")

### Set Named Entity Extraction with Smart Functions

On our platform, named entity extraction is facilitated by what **`smart functions.`** These functions take user utterances as input (unless otherwise specified) and utilize language models or regex-based rules to identify and extract entities within the utterance. Upon successful extraction, the smart function returns an object containing the extracted entity in a predefined format.

<figure><img src="/files/Fhs1EpDJiiiSJ6x8euON" alt=""><figcaption></figcaption></figure>

<details>

<summary>Setting named entity extraction with smart function step-by-step</summary>

1. **Create/Open ANS Node:**
   * Start by creating a new ANS node or opening an existing one in the flow editor.
2. **Navigate to Entities Section:**
   * Within the ANS node, locate the "Entities" section and click on the "+" icon.
3. **Configure Entity Extraction:**
   * A dialog box will appear. Enter a name for the variable where the output from the smart function will be stored.
4. **Enable Smart Functions:**
   * Toggle the button to enable smart functions for entity extraction.
5. **Select Smart Function:**
   * From the dropdown menu, choose the appropriate smart function for named entity extraction.
6. **Configure Sub-Parameters or Customizations (optional):**
   * If the selected smart function allows for additional customization or configuration of sub-parameters, you can adjust these settings according to your requirements. This may include specifying the output format, and data type, defining custom patterns, or adjusting extraction behaviour. Alternatively, you can choose to leave the settings at their default values.
7. **Save Changes:**
   * Once you've configured the smart function settings to your liking, click on the "Save" button to apply the changes and exit the configuration dialogue.

</details>

{% hint style="info" %}
In this documentation section, we won't cover the details of individual smart functions and their parameters. For specifics, please refer to the dedicated documentation on smart functions. [Born Digital - Smart documentation](https://born-digital.gitbook.io/born-digital-smart-documentation/)
{% endhint %}

## Configure flow based on extraction output

After setting up a smart function and storing its output in a variable, the next step is to configure actions within the ANS node based on the extraction results.

### Single extraction `get` condition

A common and straightforward application is to check whether an entity has been successfully extracted and proceed to the next step accordingly in the flow.

To achieve this, we can utilize intent definition using conditions within the ANS node. In the condition field, we specify conditions using the `get` method, for a variable name we set for storing smart function output in the previous step, and set the target destination to move the flow if the condition is met.

<figure><img src="/files/zCBUGL2zcFws50cFtpUe" alt=""><figcaption></figcaption></figure>

<details>

<summary>Setting conditon in ANS node step-by-step</summary>

**Prerequisites:**

* You have a variable with a smart function for named entity extraction set in Entities section of ANS node. Eg, variable named `extracted_entity`

**Next steps:**

1. In the Intents section of the ANS node, click on + icon.
2. The modal window will open. Give a friendly name for this intent.
3. Select Condition as an intent type.
4. Fill in the condition. You might use Python syntax (the "if" in inherent to all conditions), or boolean logic statements.\
   eg. \
   `get("extracted_entity")`\
   `get("extracted_entity") and int(extracted_entity) > 10` \
   `get("extracted_entity") and extracted_entity == "example string"`\
   &#x20;
5. Set the name of the target node to transfer to if the condition is fulfilled.

</details>

{% code title="Example condition syntax" overflow="wrap" %}

```python
get("extracted_entity")
# Replace "extracted_entity" with the name of your variable for storing smart function output
# If fulfilled, entity was extracted and flow continues to target state set alongside this condition
```

{% endcode %}

If the condition is not met, the system proceeds to check other conditions in the configuration. If no other conditions apply, it moves to intent recognition.

This setup allows for flexible and dynamic flow control based on the results of entity extraction, ensuring smooth interaction within the conversational flow.

### Multiple extractions `get`conditions

In scenarios where multiple entities need to be extracted, such as extracting both a name and a phone number within one node, it's essential to configure multiple variables to store the extraction results separately.

For example, let's set up two variables: `extracted_phone` to store the result from the `phone` smart function and `extracted_fullname` to store the result from the `full_name` extractor.

<figure><img src="/files/c6FwFH7h70Vm01j0VfQn" alt=""><figcaption></figcaption></figure>

Within the conversational design, we need to set up at least three conditions:

1. `get("extracted_phone") and get("extracted_fullname")`: Define a target destination to move the flow if both entities are extracted successfully.
2. `get("extracted_phone") and not get("extracted_fullname")`: Define a target destination to move the flow if only the phone number is extracted, but not the name. For example, direct the flow to a sub-scenario where only the name is asked.
3. `get("extracted_fullname") and not get("extracted_phone")`: Define a target destination to move the flow if only the name is extracted, but not the phone number. For example, direct the flow to a sub-scenario where only the phone number is asked.

If none of these conditions are met, it indicates that neither entity was extracted, likely because they were not present in the utterance. In such cases, the system should proceed to intent recognition, and it's necessary to prepare intents for expected scenarios.

<pre class="language-python" data-title="Example condition syntax" data-overflow="wrap"><code class="lang-python"># Both extracted:
get("extracted_entity_A") and get("extracted_entity_B")
# If fulfilled, both named entities were extracted and flow continues to the target state set alongside this condition

<strong># Only one extracted:
</strong>get("extracted_entity_A") and not get("extracted_entity_B")
# If fulfilled, one entity_A was extracted, but the entity_B is missing and flow continues to the target state set alongside this condition

# None extracted:
not get("extracted_entity_A") and not get("extracted_entity_B")
#If fulfilled, none of entities was extracted and the flow continues to the target state set alongside this condition 
</code></pre>

### Conditions based on extracted values

In some cases, controlling the flow based solely on whether an entity was extracted might not suffice. We may also need to consider specific properties or values of the extracted entity. Let's illustrate this with examples:

#### Conditions based on extracted integer values

Suppose we're asking for the age and extracting a number. We need to verify that we've extracted a number and that its value makes sense (not unreasonably high or low). Additionally, we want to have different conversation paths for minors, adults, and seniors.

Let's say we extract the age using the `simple number` smart function and store the result in the variable `extracted_age`. Here are the conditions:

<figure><img src="/files/5Gf1ZOMNdefwCwdg9wCd" alt=""><figcaption></figcaption></figure>

1. **Condition for Minors:**
   * `get("extracted_age") and int(extracted_age) < 18`
   * If the extracted number represents a minor's age, redirect to a sub-scenario prepared for minors.
2. **Condition for Unlikely Age Values:**
   * `get("extracted_age") and int(extracted_age) > 100`
   * If the extracted age is unusually high (over 100), redirect to a sub-scenario addressing this situation.
3. **Condition for Seniors:**
   * `get("extracted_age") and int(extracted_age) > 64`
   * If the extracted age is 65 or older, redirect to a sub-scenario for seniors. This condition covers ages from 65 to 100, inclusive.
4. **Condition for Adults:**
   * `get("extracted_age") and extracted_age > 17 and extracted_age < 65`
   * If the extracted age is between 18 and 64, redirect to the next node in the adult sub-scenario.

If none of these conditions are met, it indicates that the age was not extracted, likely because it wasn't present in the user's utterance. In such cases, the process proceeds to intent recognition to understand the user's input, or it may fall back to a default response.

<pre class="language-python" data-title="Example condition syntax" data-overflow="wrap"><code class="lang-python"># Int value is equal:
<strong>get("extracted_entity") and int(extracted_entity) == 10 # or another value
</strong>
<strong># Int value is greater or equal:
</strong>get("extracted_entity") and int(extracted_entity) >= 10 # or another value

# Int value is greater:
get("extracted_entity") and int(extracted_entity) > 10 # or another value

# Int value is lesser or equal:
get("extracted_entity") and int(extracted_entity) &#x3C;= 10 # or another value

# Int value is lesser:
get("extracted_entity") and int(extracted_entity) &#x3C; 10 # or another value

# Int value within open interval
get("extracted_entity") and int(extracted_entity) > 0 and int(extracted_entity) &#x3C; 10 # or other values

# Int value within closed interval
get("extracted_entity") and int(extracted_entity) >= 0 and int(extracted_entity) &#x3C;= 10 # or other values
</code></pre>

#### Conditions based on extracted string length

Similarly, we can apply conditional logic based on the properties of numeric strings, where the focus is on the string's value rather than its integer interpretation. Let's consider an example where we use the `advance number` smart function to extract an order number, and we store the result in the variable `extracted_order_id`.

Let's say that in our example case, valid order numbers typically range from 8 to 12 digits. We've configured the smart function to extract numbers with a length of at least 8 and at most 12 digits.&#x20;

<figure><img src="/files/Oe3hGDOWTR5EZkmpOwbY" alt=""><figcaption></figcaption></figure>

Let's say that the length of the order ID string determines the type of customer (corporate or personal) and eventually a product (fridges, washing machines and smartphones). For further flow control, we need to distinguish whether we've extracted a numeric string with a valid length and, if so, what type of order it represents.

<figure><img src="/files/CZqXQf2umiWEjLCE2pEu" alt=""><figcaption></figcaption></figure>

Here are the conditions:

1. **Condition for Corporate Orders (8 or 9 digits):**
   * `get("extracted_order_id") and len(extracted_order_id) < 10`
   * Redirect to a sub-scenario for corporate orders.
2. **Condition for Personal Orders (10 digits):**
   * `get("extracted_order_id") and len(extracted_order_id) == 10`
   * Redirect to a sub-scenario for personal orders, such as those for refrigerators.
3. **Condition for Personal Orders (11 digits, e.g., Washing Machines):**
   * `get("extracted_order_id") and len(extracted_order_id) == 11`
   * Redirect to a sub-scenario for personal orders, such as those for washing machines.
4. **Condition for Personal Orders (12 digits, e.g., Phones):**
   * `get("extracted_order_id") and len(extracted_order_id) == 12`
   * Redirect to a sub-scenario for personal orders, such as those for phones.

If none of these conditions are met, it indicates that we didn't extract a numeric string with a valid length, likely because it wasn't present in the user's utterance. In such cases, the process proceeds to intent recognition, where intents should be prepared to handle predictable scenarios (e.g., the customer doesn't remember the order number, is unfamiliar with it, or has lost it).

{% code title="Example condition syntax" overflow="wrap" %}

```python
# Length equals to:
get("extracted_entity") and len(str(extracted_entity)) == 10 #or other value

# Length is greater or equal to:
get("extracted_entity") and len(str(extracted_entity)) >= 10 #or other value

# Length is greater than:
get("extracted_entity") and len(str(extracted_entity)) > 10 #or other value

# Length is lower or equal to:
get("extracted_entity") and len(str(extracted_entity)) <= 10 #or other value

# Length is lower than:
get("extracted_entity") and len(str(extracted_entity)) < 10 #or other value

# Length is within open interval:
get("extracted_entity") and len(str(extracted_entity)) > 1 and len(str(extracted_entity)) < 10 #or other values

# Length is within closed interval:
get("extracted_entity") and len(str(extracted_entity)) >= 1 and len(str(extracted_entity)) <= 10 #or other values

# Length is equal either to A or B:
get("extracted_entity") and (len(str(extracted_entity)) == 1 or len(str(extracted_entity)) == 10) #or other values
```

{% endcode %}

#### Conditions based on string values

Conditional logic can also be applied based on the extracted strings. Let's consider a scenario where we ask customers for their full name, and we want to implement special logic for customers named "Patrick" in celebration of St. Patrick's Day.

First, we use smart function `full_name` to extract name and surname from user's input utterance and name the variable for storing smart function's output `extracted_fullname.`

<figure><img src="/files/UceekODBddn193ZR9bOH" alt=""><figcaption></figcaption></figure>

1. **Condition for Customers Named "Patrick":**
   * `get("extracted_fullname") and extracted_fullname["name"] == "Patrick"`
   * Redirect to a branch for St. Patrick's Day specials.
2. **Condition for Extracted Full Name:**
   * `get("extracted_fullname")`
   * Redirect to the branch where the flow continues upon successfully obtaining the name.

If neither of these conditions is met, it indicates that the smart function failed to extract the full name. In such cases, the process proceeds to intent recognition, where it's beneficial to have intents prepared to handle predictable scenarios. Alternatively, it may end in a fallback.

{% hint style="info" %}
It's worth noting that outputs from smart functions can be various types of objects (pure [strings](/for-advanced-users/conversation-design-tips/customizing-smart-functions-output#advanced-number), integers, [dictionaries](/for-advanced-users/conversation-design-tips/customizing-smart-functions-output#full-name), or [arrays](/for-advanced-users/conversation-design-tips/customizing-smart-functions-output#phone)). Handling the extraction of specific values from these objects is covered in another section of the documentation. See [Customizing smart functions output](/for-advanced-users/conversation-design-tips/customizing-smart-functions-output)
{% endhint %}

{% code title="Example condition syntax" overflow="wrap" %}

```python
# Value is a given string
get("extracted_entity") and str(extracted_entity) == "Example string"

# Value is not a give string
get("extracted_entity") and str(extracted_entity) != "Example string"
```

{% endcode %}

## Handling Various User Responses with Intent recognition

When designing conversational interactions, it's vital to **anticipate** and effectively **manage a wide range of user responses.**&#x20;

This encompasses various scenarios of utterances without the desired named entity present at the first place, such as **users claiming unfamiliarity with or inability to recall the requested information, requesting additional time to respond, or providing ambiguous or unclear replies.**&#x20;

Therefore, the design strategy must incorporate **robust intent recognition** capabilities and procedural frameworks to navigate through these potential challenges seamlessly. By doing so, we ensure a smoother and more user-friendly conversational experience that accommodates diverse user interactions.

<figure><img src="/files/i1q49T3x8wD7XHKuvYUt" alt=""><figcaption></figcaption></figure>

For basic 101 explanations and tutorials on setting intents for intent recognition, visit [ANSWER node](/digital-agent/conversation-flow/nodes-explained/answer-node) page.&#x20;

Check out the [Fine-Tuning Intent Recognition using Generative AI](/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai) tips and tricks page for advice on fine-tuning intent recognition prompt.

{% hint style="info" %}
:bulb:**Pro-tip!**\
Before you take off to brainstorm the variety of input you might get from your users, take time to familiarize yourself with hierarchy in the processing of different intent types during the intent recognition process.

**Order of Intent Evaluation:**

* **Conditions, Keywords, and Generative AI:**
  * These are evaluated in the order they're configured in the ANS node. Ensure that conditions for directing further steps based on entity extraction are prioritized first, followed by keyword detection and Generative AI intent recognition.
* **Intent Recognition using Training Set:**
  * This is evaluated last in the sequence and is reached only if previous conditions aren't met, keywords aren't captured, and Generative AI fails to recognize the intent. For further details on custom training set intent recognition, see [ANSWER node](/digital-agent/conversation-flow/nodes-explained/answer-node#intents)
* **Fallbacks:**
  * If none of the above conditions are satisfied, the process falls back to fallback logic as configured in ANS node. For further detail, see [ANSWER node](/digital-agent/conversation-flow/nodes-explained/answer-node#fallbacks)
    {% endhint %}

**Common scenarios to cover with intents:**

<details>

<summary>User claims not to know requested information</summary>

* "I've never received a text message with the order details."
* "I don't recall ever receiving a confirmation email for my booking."
* "I'm sorry, I don't have any record of the reference number you're asking for."

User states they don't remember:

* "I can't seem to recall the password for my account."
* "I'm drawing a blank on the name of the product I purchased."
* "I'm afraid I can't remember the last time I used this service."

User doesn't have the information available:

* "I don't have access to my calendar right now, so I can't check my availability."
* "I don't have my credit card with me at the moment, so I can't provide the number."
* "I don't carry my driver's license with me, so I can't tell you the expiration date."

User mentions losing the information:

* "I accidentally deleted the email containing my flight details."
* "I misplaced the document with the tracking number."
* "I'm afraid I've lost the receipt for my recent purchase."

User admits to forgetting:

* "I seem to have misplaced the login details for my account."
* "I'm sorry, but I can't seem to recall my PIN number."
* "I can't remember where I stored the password for this application.

</details>

<details>

<summary>User provides ambiguous or non-specific responses</summary>

* "It's written to my mom's address, she'll pick it up for me."
* "The contact name is written on my boyfriend"
* "I've filled my wife's phone number in the order form"
* "I've filled in my home address"

User doesn't specify a time or date:

* "Call me whenever"
* "I'll leave it up to you".
* "After holidays"
* "Call me when I get home from work".
* "Reach back anytime during the weekend"

</details>

<details>

<summary>User asks Digital agent to wait</summary>

User requests a moment to look up the information:

* "Let me grab my notebook real quick, I think I wrote it down."
* "Give me a sec, I'll check my phone to see if I saved it."
* "Hang on, I need to find the document in my file cabinet."
* "Just a second"

</details>

<details>

<summary>User asks for clarification or repetition of instructions</summary>

* Come again?
* "Sorry, could you go over that one more time?"
* "Could you clarify what specific details you need?"
* "Could you repeat the instructions for me, please?"
* "I'm not sure I understand, can you explain it differently?"
* "Just to confirm, you're asking for the expiration date, correct?"
* "Can you repeat that?"&#x20;
* "Once more, what number should I dictate?"&#x20;
* "And do you only need the postal code for that address?"&#x20;
* "Should I dictate the phone number with or without the area code?"
* &#x20;"So, what does the code look like?"

</details>

<details>

<summary>User refuses to communicate with Digital agent</summary>

This situation is more probable after named extraction or intent recognition failure or repeated fallbacks:

* I don't want to talk to a robot
* Transfer me to a real human
* I'd prefer to speak with a human representative, please."
* "Can I talk to a real person instead?"
* "I'd rather not chat with a chatbot, thanks."
* I'd like to speak to someone who can help me directly."
* "I need assistance from a human, not a computer program."
* &#x20;Can I speak to a human?"
* "I'd feel more comfortable if I could talk to a live agent."
* "Sorry, but I need assistance from a real person, not a virtual assistant."
* Is there a way I can get help from an actual person?"
* "I prefer human interaction over chatting with a virtual assistant."

</details>


# Prompting cookbook

Discover a delightful array of prompt potions in our cookbook, where every recipe is a secret ingredient to crafting captivating interactions and achieving triumph in communication.

{% content-ref url="/pages/004mkulvSXDPiwYrhVGc" %}
[Basics](/for-advanced-users/prompting-cookbook/basics)
{% endcontent-ref %}

{% content-ref url="/pages/LQEnNtFIpLrdvGEiqjgy" %}
[Prompting techniques](/for-advanced-users/prompting-cookbook/prompting-techniques)
{% endcontent-ref %}


# Basics

For large language models (LLMs), **prompting** serves as a critical interface. It allows developers to provide these sophisticated AI systems with tailored instructions, enabling them to generate narratives, answer queries, and perform a wide range of linguistic tasks.

The accuracy of a large language model's output is highly dependent on the quality of the prompt provided. Well-designed prompts act as clear instructions that define the desired content. A concise and effective prompt goes beyond simply conveying instructions; it serves as a strategic roadmap, guiding the model to generate results that meet specific stylistic, tonal, and contextual requirements.

Mastering the art of prompting is a game-changer, allowing developers to fine-tune responsiveness, creativity, and task relevance.

## What is a prompt

> :bulb: In the context of language models, a "prompt" serves as the input or instruction given to the model to generate a specific output. It acts as the catalyst for the model's response, guiding it toward producing text that aligns with the user's expectations.

A prompt can take various forms, ranging from **a simple sentence to a detailed set of instructions.** It is the user's means of conveying the desired task or information to the language model. A well-crafted prompt is crucial for achieving accurate and contextually relevant results.\
\
In the Flow Editor, you can leverage the [**AI Node**](/digital-agent/conversation-flow/nodes-explained) to harness the power of generative language models. Within the modal, you can customize the behaviour of the generative model by providing specific instructions or prompts. These custom instructions guide the model in generating content tailored to your requirements.

<figure><img src="/files/R283Dm0aJ05qbKFq6quB" alt=""><figcaption><p>Increase the quality of generated output with iterating instructions in various steps. Overall, you may set 3 types of instruction - one <strong>system promp</strong>t and several <strong>user or assistant prompts.</strong></p></figcaption></figure>

***

## Crafting effective prompts

In the realm of prompting, the art lies in constructing instructions that yield precise and relevant model outputs. This section explores key principles for crafting effective prompts, ensuring developers can harness the full potential of language models.

Here are some general guidelines:

<details>

<summary>Focus on clarity and conciseness</summary>

Prompts should be clear, concise, and devoid of unnecessary complexity. Precision in language enhances the model's ability to interpret and generate accurate responses. Avoid ambiguity and aim for straightforward instructions that align with the desired task.<br>

<mark style="color:red;">Unclear:</mark> \
`"Build a conversational script."`

<mark style="color:green;">Clear:</mark> \
`"Develop a chatbot script for assisting users with product inquiries."`

</details>

<details>

<summary>Provide contextual information</summary>

Provide the necessary context for the model to understand the task. Context enhances the relevance and coherence of generated content. Include essential details that set the stage for the desired output, guiding the model in the right direction.

<mark style="color:red;">Insufficient context:</mark> \
`"Answer questions."`

<mark style="color:green;">Sufficient context:</mark> \
`"Design responses for a chatbot to address customer queries about account management."`

</details>

<details>

<summary>Take time balancing specificity</summary>

Strike a balance between specificity and generality. While specific prompts yield focused outputs, overly constraining the model might limit creativity. Tailor prompts to guide the model without stifling its ability to generate diverse and contextually relevant content.

<mark style="color:red;">Overly Constrained:</mark> \
`"Create a scenario for handling customer complaints about a specific product with a red logo."`

<mark style="color:green;">Balanced:</mark> \
`"Develop a scenario capable of addressing customer concerns and feedback related to our product line."`

</details>

<details>

<summary>Don't fear experimentation</summary>

Foster a culture of experimentation by urging developers to explore diverse prompt formulations. Variations in wording, structure, and length open the door to a nuanced understanding of the model's responsiveness. This iterative approach serves as a dynamic tool for developers to uncover the most effective prompts tailored to specific tasks.\
\
Try variations like `"Craft a conversation about..."` and `"Construct a dialogue for..."` to observe how the chatbot adapts to different user inputs and scenarios.

</details>

<details>

<summary>Adjust temperature and max tokens</summary>

Experiment with the <mark style="color:blue;">**temperature parameter to control the randomness of the output.**</mark> Higher values (e.g., 0.8) encourage more randomness, while lower values (e.g., 0.2) produce more focused responses.

:thermometer:**Higher Temperature (e.g., 0.8):**

* Encourages more randomness and creativity.
* Yields diverse and imaginative outputs.
* May result in less coherent or unexpected responsess
* Best use for: Creative writing, brainstorming

:snowflake:**Lower Temperature (e.g., 0.2):**

* Produces more focused and deterministic responses.
* Generates contextually aligned and predictable outputs.
* Best use for: Tasks requiring consistency, precise responses

Be mindful of the <mark style="color:blue;">**max tokens parameter to control the length of the generated content.**</mark> Adjust it based on your desired response length.&#x20;

**Higher Max Tokens:**

* Generates longer responses with more details.
* This may result in verbose outputs.

**Lower Max Tokens:**

* Produces shorter, concise responses.
* Ensures content remains within specified length limits.

</details>

<details>

<summary>Try different prompt types</summary>

The effectiveness of a prompt significantly influences the output of a language model. GPT responds differently to various prompt structures, making it essential to explore diverse types based on your specific task.\ <br>

#### Instructional Prompts:

* **Definition:** Instructional prompts guide the model with specific instructions or directives.
* **Use Case:** Suitable for tasks requiring precise and structured responses.
* **Example:** `"Provide a step-by-step guide on how to troubleshoot a software issue."`

#### Question-Answer Prompts:

* **Definition:** Question-answer prompts involve posing questions to the model for informative responses.
* **Use Case:** Ideal for tasks where obtaining specific information or insights is the primary goal.
* **Example:** `"What are the key benefits of using renewable energy sources?"`

#### Completion Prompts:

* **Definition:** Completion prompts involve incomplete sentences or phrases that the model completes.
* **Use Case:** Useful for tasks requiring the model to generate coherent and contextually appropriate content.
* **Example:** `"The sun sets, and the stars begin to..."`

#### Scenario-Based Prompts:

* **Definition:** Scenario-based prompts present a hypothetical situation for the model to respond to.
* **Use Case:** Effective for generating narrative or creative content based on given scenarios.
* **Example:** `"Describe a futuristic city where humans coexist with advanced AI."`

#### Conversation-Style Prompts:

* **Definition:** Conversation-style prompts simulate an ongoing dialogue with the model, often involving back-and-forth exchanges.
* **Use Case:** Valuable for tasks requiring a conversational tone or interactions.
* **Example:** `"You are a virtual assistant. A user asks, 'What's the weather like today?' Respond accordingly."`

</details>

***

## Prompt template for beginners

Start small and simple.

{% code title="System prompt" overflow="wrap" %}

```
You are a {role/persona}. Your role is/you are tasked with {general task}. I need you to {needs to fullfill}. Be brief in your answers. Always respond in {language/format}.
```

{% endcode %}

{% code title="Assistant prompt (opt.)" overflow="wrap" fullWidth="true" %}

```
Here is some additional information:
- {context}
- {knowledge}
- {specific details}

Here's what you gonna do: 
- {task's steps, details}, eg. {example}
Please DON'T {forbidden steps}.
In case you {cannot fullfil the task}, respond with "This is a fallback message".

Otherwise, respond with {output format}.
```

{% endcode %}

{% code title="User prompt" overflow="wrap" %}

```
This is user's input: {input_variable}


```

{% endcode %}

***

## Veteran prompter field notes

* **DO NOT** use "be helpful" in your prompt for chatbot behaviour, since it often leads to jailbreaks, as the virtual assistant engages in off-topic conversations in order to comply.
* When defining desired output, it is better to use the verb "respond" than "answer", since the latter leads to lengthy, wordy output.\
  `Respond with two or three sentences maximum.`\
  `Respond with "Sorry, I cannot provide a relevant answer".`\
  `Respond just with a whole number.`


# Prompting techniques

## Prompting techniques based on provided examples

The "x-shot" terminology in the context of prompting language models like GPT refers to the number of examples or shots provided to the model during the prompt. Let's break down the concept:

<details>

<summary>Zero-shot prompts</summary>

A zero-shot prompt is a way of interacting with GPT where you provide a prompt or instruction without explicit examples or training data for that particular task.

`Prompt: Tell a joke.`

Since no example is provided, the model would answer based on its pre-trained knowledge of what jokes are like. The answer might be something like this:

`Output: What do you call fake spaghetti? An impasta! 🍝😄`\
&#x20;

Here are a few more examples of zero-shot prompts:\
`Prompt: Summarize the following paragraph: [Insert paragraph here].`

`Prompt: Translate the text to French.`

`Prompt: Classify a movie into drama, comedy or romance. Movie: Titanic`

`Prompt: Tell me what type this pokémon: [Insert pokémon name] is.`

</details>

<details>

<summary>One-shot prompts</summary>

A one-shot prompt is similar to a zero-shot prompt in that it involves instructing a language model like GPT to perform a task but with a slight difference. In a one-shot prompt, you provide the model with a single example or demonstration of the task you want it to perform.

`Prompt: Tell a joke. For ex.: Knock, knock! Who's there? [...]`

Since you provided an example, the model may have a better idea of what its task is:\
`Output: Knock, knock!` \
&#x20;       `Who's there?` \
&#x20;       `Lettuce.` \
&#x20;       `Lettuce who?` \
&#x20;       `Lettuce in, it's cold out here! 😄`

Here are more examples of one-shot prompts:

`Prompt: Translate the following English text to French: ‘Hello, how are you?’ Example: ‘Good morning’ in French is ‘Bonjour’.`

* N-shot learning is based on the idea of providing the model with N examples or shots of a particular task or concept.

`Prompt: Compose a poem about the beauty of a sunrise. For example, a poem about the moon might go: ‘Glowing orb in the night’s sky, casting shadows, shining bright.`

`Prompt: Classify the Pokémon into categories. Provide information such as its Generation, Type, and any additional relevant details.`

</details>

<details>

<summary>Few-shots prompts</summary>

Few-shot prompting involves providing the model with a small number of examples to guide its understanding of a specific task. This additional context helps the model generalize more effectively.

<pre data-title="Prompt" data-overflow="wrap"><code>Here are some quotes from Shakespeare's plays.
1. "To be, or not to be, that is the question:"
<strong>2. "All the world's a stage, and all the men and women merely players."
</strong>3. "We are such stuff as dreams are made on, and our little life is rounded with a sleep."
Generate text on making breakfast in the style of Shakespeare.
</code></pre>

{% code title="Output" overflow="wrap" %}

```
To cook, or not to cook, that is the morning quandary: Whether 'tis nobler in the mind to suffer the grumbles and rumbles of an empty stomach, Or to take arms against a sea of hunger, and by opposing, end it? To fry: to scramble; No more; and by a scramble, to say we end the heartburn and the thousand natural pangs That flesh is heir to; 'tis a consummation devoutly to be wished.
```

{% endcode %}

Here are more examples of few-shot prompts:

{% code title="Prompt" overflow="wrap" %}

```
If user asks you to wait (utterances like: A moment, please!/ Just a second./Hold on. etc.), answer with "Sure, take your time, no problem.".
```

{% endcode %}

</details>

<details>

<summary>Multi-shots prompts</summary>

Multi-shots, or N-shot learning is based on the idea of providing the model with N examples or shots of a particular task or concept.

The more diverse and representative your examples are, the better the model can grasp the underlying pattern.                                                            &#x20;

{% code title="Prompt" overflow="wrap" %}

```
Classify the sentimental meaning of a given sentence. Focus on the nuances, for example:                                                
    The new game is pretty shit. Meaning: Negative                     
    Turn up the radio! That's my shit. Meaning: Positive               
    Girrrl, I live. I've almost shit myself. Meaning: Positive         
    What type of shit is this? Meaning: Ambiguous                      
    You must try these fries. They're the shit! Meaning: Positive      
    What a mess! Pick your shit and clean up! Meaning: Negative       
    DnD? That's that rolling dice, role-playing elves, orcs and shit,    right? Meaning: Neural                                              
Sentence to classify: I don't remember shit, bro! 
```

{% endcode %}

{% code title="Output" overflow="wrap" %}

```markdown
The sentiment of the sentence "I don't remember shit, bro!" can be classified as Neutral. This classification aligns with the context of expressing a lack of memory without a strong positive or negative emotional tone.
```

{% endcode %}

Be aware that language models may struggle with ambiguous or poorly defined tasks. Provide enough context in your examples to guide the model in the right direction.

\
While providing multiple examples is a powerful strategy for improving the chances of getting the desired output, <mark style="color:red;">it's not necessarily a guarantee of 100% success.</mark>

The process often involves iterations and fine-tuning. Even with multiple examples, it might be necessary to adjust the prompt, refine the examples, or experiment with different approaches.

</details>

#### Purpose of x-shot Prompting

* **Flexibility:**

  X-shot prompting provides a way to interact with language models at varying levels of specificity. Depending on the task and the complexity of the instruction, you can choose the appropriate number of shots.
* **Guidance for the Model:**

  The number of shots helps guide the model's understanding of the task. Zero-shot relies solely on pre-existing knowledge, while one-shot and few-shot prompts provide specific examples to influence the model's behaviour.
* **Task Adaptability:**

  X-shot prompting allows the model to adapt to a wide range of tasks without extensive task-specific training. It leverages the model's pre-trained knowledge and generalization abilities.
* **User Control:**

  Users can control the level of specificity and guidance they provide to the model based on the task requirements. This gives users a versatile tool for various natural language processing tasks.

***

## Prompting techniques based on chaining

Chaining techniques involve breaking down the task into smaller sub-steps of thought to be solved and linking them together as a series to guide the model's responses in a coherent and context-aware manner.

<details>

<summary>Chain-of-thoughts prompting</summary>

**The Chain-of-Thoughts** prompting technique is a powerful approach to guide the conversation coherently and logically. It involves building gradually on the previous parts of a response to create a flow of thoughts.\
\
It's about creating a natural flow within a single prompt, guiding the model to follow a coherent chain of thoughts in its response. It involves building on the information provided by the model in a single, continuous interaction.

<pre data-overflow="wrap"><code>Prompt:
You are a virtual assistant helping a user plan their day. <a data-footnote-ref href="#user-content-fn-1">Start by asking the user about their priorities for the day</a>. Once you have this information, <a data-footnote-ref href="#user-content-fn-2">guide them through creating a schedule, including time for work, breaks, and any specific tasks they mentioned.</a> Additionally, inquire about <a data-footnote-ref href="#user-content-fn-3">potential challenges or changes that might occur during the day</a> and how the user plans to <a data-footnote-ref href="#user-content-fn-4">adapt their schedule accordingly.</a>

</code></pre>

\
\
:brain:**Here's a step-by-step guide how you can effectively use this technique:**

* Begin with a clear and concise introduction to set the context for the conversation. This helps both you and the model understand the focus.

{% code title="Start of a prompt" overflow="wrap" %}

```
Prompt:
You are a software developer working on a new project. Describe briefly the initial steps you would take to plan and organize the development process.

```

{% endcode %}

* Use the initial part of the response as a foundation for generating coherent continuation.

{% code title="Continuation #1" overflow="wrap" %}

```
Once you have the project requirements, how would you prioritize tasks in the roadmap?
```

{% endcode %}

* Elaborate. Encourage the model to provide more detailed and specific information by asking follow-up questions.

{% code title="Continuation #2" overflow="wrap" %}

```
Can you elaborate on how you identify dependencies and manage the critical path in a software development project?
```

{% endcode %}

* **I**ntroduce scenarios or challenges. Incorporate realistic scenarios or challenges to test the model's problem-solving skills.

{% code title="Continuation #3" overflow="wrap" %}

```
Imagine you encounter a situation where a critical task is delayed. How would you adjust the project plan to mitigate the impact?
```

{% endcode %}

* If the model provides a vague or unclear response, guide it by specifying the type of information you're looking for. This helps to get more precise answers.

{% code title="Final prompt" overflow="wrap" %}

```
Prompt:
You are a software developer working on a new project. Describe briefly the initial steps you would take to plan and organize the development process. Once you have the project requirements, how would you prioritize tasks in the roadmap? Can you elaborate on how you identify dependencies and manage the critical path in a software development project? Imagine you encounter a situation where a critical task is delayed. How would you adjust the project plan to mitigate the impact?
```

{% endcode %}

**More chain-of-thought prompt exepmples:**

<pre data-overflow="wrap"><code><strong>Prompt:
</strong><strong>You're pokédex expert tasked to provide info about pokémons.
</strong>Check user's utterance: {utterance}, if any pokémon(s) are mentioned.
Which of these types: fire, water, grass, electric, normal, rock, ground, fairy, bug, psychic, flying, steel, legendary, ice, fighting, poison, or ghost is pokémon mentioned? Respond only with name of the type (one word, lowercase). If no pokémon is mentioned, respond "none". If pokémon is more than one type, respond with &#x3C;all-listed-comma-separated-types>. If pokémon is of other than listed types, respond "none".
</code></pre>

{% code overflow="wrap" %}

```
Prompt:
You're a skilled translator and playful, creative copywriter who knows many languanges. Translate given input into French. Since output is meant for younger audience, feel free to tone it up a little. Considering sentiment of translated sentence, you may add some emoji to positive statements. 

Sentence to translate: {input}
Respond only with your translation.
```

{% endcode %}

\
**Limitations:**

* CoT prompting heavily relies on the initial thought, and if that was off-kilter, subsequent thoughts followed suit.
* Reaching dead-end, can't return a few steps back to reiterate the process and choose another route, e.g. if initial translation is wrong, output is doom to be unsatisfactory. Tweaking copywriting, adding emoji or any other afterwork won't lead to desired result.

</details>

<details>

<summary>Tree-of-thoughts prompting</summary>

**Tree of Thoughts prompting** is an innovative technique used in the realm of large language models (LLMs) to enhance their problem-solving capabilities.&#x20;

:brain: **Let's break down the basics for you:**

1. **Thought Decomposition**: ToT breaks down the problem-solving process into smaller thought steps. These thoughts should be substantial enough to evaluate their usefulness but small enough to generate diverse samples.
2. **Thought Generator**: This part generates potential next thoughts for each state in the problem-solving tree. There are two strategies:
   * **Independent Thoughts**: Sample independent thoughts from a **Chain of Thought (CoT)** prompt. This works well for rich thought spaces like paragraphs.
   * **Sequential Proposals**: Propose thoughts sequentially using a “propose prompt.” This approach is better suited for constrained thought spaces like single words or lines.
3. **State Evaluator**: Evaluate the progress made by each state in the tree. This serves as a heuristic for the search algorithm to decide which states to explore further. Two evaluation strategies are:
   * Value each state independently by reasoning about it and generating a scalar value or classification.
   * Vote across states by comparing different states and voting for the most promising one.
4. **Search Algorithm**:

   * **Breadth-First Search (BFS)**: Maintains a set of the most promising states per step. Useful for problems with limited tree depth.
   * **Depth-First Search (DFS)**: Explores the most promising state first until the final output is reached or the state evaluator deems it impossible. DFS backtracks to the parent state for continued exploration.

<pre data-title="Example ToT prompt" data-overflow="wrap"><code>System prompt:
You're a travel agent. Your role is to help users brainstorm ideas for trips and help them pick up the right one for them and plan the trip. Be brief in your answers. Respond in English language.

User prompt:
Problem: You’re planning a weekend getaway in {general_area}. List some factors to consider when choosing a destination.
Step 1: For each factor, propose different destinations that align with it.
<strong>Step 2: Evaluate the pros and cons of each destination.
</strong>Step 3: Estimate and evaluate cost. Filter out the most expensive option.
Step 3: Rank the destinations based on fun/cost ratio and your preferences and priorities.
Step 4: Provide a brief resumé with recommendations of the top 3 destinations. 
</code></pre>

**Limitations:**

* **Dependency on Initial Prompts:** ToT heavily relies on well-crafted prompts; poorly designed ones result in suboptimal exploration.
* **State Evaluation Heuristics:** Effective state evaluators are crucial; inaccurate ones can lead to suboptimal exploration.
* **Lack of Global Context:** ToT evaluates states locally, struggling with long-term planning or coordination across multiple steps.
* **Interpretable State Representations:** Understanding state meanings in the tree can be challenging; transparent representations are desirable.
* **Trade-offs in Exploration Strategies:** Choosing between BFS and DFS involves trade-offs in exploration strategies.

</details>

<details>

<summary>Prompt chaining</summary>

**Prompt chaining** is a technique that leverages large language models to **accomplish tasks by breaking them into multiple smaller prompts**. The output of one prompt serves as the input for the next, streamlining the interaction with the AI model. Think of it as assembling a series of building blocks to construct a complete solution.\
\
:question:**How Is It Different from Chain-of-Thought Prompting?**\
While both techniques involve multiple prompts, they serve different purposes:

![](/files/RShccfiGg8uIfmfQyhsN)\
\
:brain: Here's an example of chaining one prompt after another:

{% code title="Initial prompt 1" overflow="wrap" %}

```
System prompt:
You are a librarian, and an expert on recommending books. Your role is to find the best book recommendation based on the user's interests.

User prompt:
This is user input: {user_input}
Based on the input, retrieve books from the database that aligns with the user's interest. Output is a list of book (name, author, year of publication).
```

{% endcode %}

The next step is to take the output of the initial prompt and use it as an input for the next in the chain.

{% code title="Prompt 2" overflow="wrap" %}

```
System prompt: [...]

User prompt:
Here's a list of recommended books: {list_of_book}
Arrange the list in alphabetical order by book name.
```

{% endcode %}

Let's add another prompt to the chain.

{% code title="Prompt 3" overflow="wrap" %}

```
System prompt: [...]

User prompt:
To each book in {arranched_list_of_book}, add from 1 to 5 stars indicating how good said book is (5 stars being the best).
```

{% endcode %}

And another one.

{% code title="Prompt 4 (final)" overflow="wrap" %}

```
System prompt: [...]

User prompt:
Write short resumé on recommended {arranched_list_of_books_with_stars}. Focus on what's common in all the books and ways in which they're unique. 
At the end, you make suggest other topics that may be interesting for the user to explore in a short paragraph.
```

{% endcode %}

\
:notebook\_with\_decorative\_cover: Here's what the final output of chained prompts looks like with the initial input being "*books about artificial intelligence*".

<pre data-title="Output" data-overflow="wrap"><code>Artificial Intelligence: A Modern Approach" by Stuart Russell and Peter Norvig - ★★★★☆
"Life 3.0: Being Human in the Age of Artificial Intelligence" by Max Tegmark - ★★★★★
"Superintelligence: Paths, Dangers, Strategies" by Nick Bostrom - ★★★★☆
"The Age of Em: Work, Love, and Life when Robots Rule the Earth" by Robin Hanson - ★★★☆☆
"The Master Algorithm: How the Quest for the Ultimate Learning Machine Will Remake Our World" by Pedro Domingos - ★★★★☆
Short resumé on the recommended books:

These books collectively offer a comprehensive exploration of artificial intelligence, covering topics ranging from its fundamental principles and modern approaches to the societal and ethical implications of its advancement. "Life 3.0" by Max Tegmark stands out with its visionary perspective on the future of humanity in the AI age, while "The Master Algorithm" by Pedro Domingos provides insights into the transformative potential of machine learning. "Artificial Intelligence: A Modern Approach" serves as a foundational resource for understanding the core concepts, while "Superintelligence" and "The Age of Em" delve into the potential risks and strategies associated with advanced artificial intelligence. Together, they present a nuanced view of AI, acknowledging both its promises and challenges.

Suggestions for other topics to explore:

- Ethical Considerations in Technology: Delve deeper into the ethical aspects of emerging technologies beyond AI.
- Sci-Fi and AI: Explore science fiction novels that envision the impact of artificial intelligence on society and individuals.
- Robotics and Automation: Extend your exploration into the world of robotics and automation, examining their roles in various industries.
- Cognitive Science: Understand the interdisciplinary nature of AI by exploring books on cognitive science and its intersection with technology.
<strong>- Future Technologies: Broaden your horizon by exploring books on other cutting-edge technologies shaping the future.
</strong></code></pre>

\
**Limitations:**

* **Complexity Management**: Balancing prompt granularity can be challenging. Overcomplicating or oversimplifying prompts affects performance. Each prompt in the chain increases the overall time needed to get to the final output, impacting latention in responses.
* **Dependency on Previous Outputs**: Errors in early prompts propagate downstream. Requires careful design and testing.

</details>

{% hint style="info" %}
Designed with prompt chaining in mind, our [AI NODE](/digital-agent/conversation-flow/nodes-explained/ai-node) modal allows you to effortlessly string together a system prompt and several user/assistant prompts. Start with a contextual system message, then seamlessly add prompts to create a fluid dialogue series, or step-by-step process. Dive in and elevate your chatbot conversations with simplicity and finesse! 🚀\
\
[Click here to learn all](/digital-agent/conversation-flow/nodes-explained/ai-node) that is to know about Generative AI node!&#x20;
{% endhint %}

[^1]: First step. (Initiaton).

[^2]: Second step. (Elaboration, exemples)

[^3]: Third step. (Elaboration)

[^4]: Fourt step. (Elabolaration, issues and challenges).


# Product changelog

What´s new in Digital Agent? Read a quick change log overview

## Release 07.10.2025

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.18.20</td></tr><tr><td>Builder</td><td>v2.3.11</td></tr><tr><td>Builder Server</td><td>v2.2.10</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.27.18</td></tr><tr><td>Knowledge base indexer</td><td>v0.2.7</td></tr><tr><td>Voice</td><td>v1.19.12</td></tr><tr><td>Voice Connector</td><td>v2.0.8</td></tr><tr><td>New Outbound app</td><td>v0.0.15</td></tr><tr><td>LLM connector</td><td>v0.0.19</td></tr><tr><td>New bubble</td><td>v0.0.8</td></tr></tbody></table>

### AI node 2.0 - Tools

From this release, AI node now support various tools to be used within its execution (and more will be coming). With this, the API on which the AI node runs is now switched to responses API. However, to not loose backward compatibility and possibility to run on chat completions API - switch between New & Old AI node has been also implemented.

#### New vs Old AI node

Below are the basic rules how New vs Old is goona work:

* All newly added AI nodes to the flow -> 2.0 version is used -> you can switch back to old AI node by flipping the toggle at the top of the AI node
* All existing AI nodes -> old version is kept -> you can switch to 2.0 version but it is IMPORTANT that
  * You test your AI node accordingly
  * You check the configuration. If you have been using Knowledge base tool, you need to configure it again

**NEW AI node - toggle is ON**

<figure><img src="/files/eV8ttfDa6fXDtp5ukjgn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/SSQbjtfHV61GzC998NQS" alt=""><figcaption></figcaption></figure>

**OLD AI node - toggle is OFF & only KB based tools present**

<figure><img src="/files/HjvHyWQmkzT0QRDL5qey" alt=""><figcaption></figcaption></figure>

#### New tools in AI node

These are the new tools in AI node 2.0:

* **Web search**
  * Working only for Open AI provider yet
  * You can configure **Search context size** (how much context is retrieved from the web) and **Country** (refine search based on geography)
  * Use Behaviour to set more context how websearch should be used and when
  * **IMPORTANT notes**
    * With GPT-5, nano model does not support websearch
    * Reasoning effort needs to be set to at least Low

<figure><img src="/files/4WC4CHY7nCocBIYrVwdz" alt=""><figcaption></figcaption></figure>

* **Redirect to human**
  * Gives AI node an ability to handover the conversation to Human operator
  * **Tool description** gives you an option to explain to the Agent, when this tools should be used - so what are the rules when handover should happen
  * You can configure 1..N nodes, where the conversation can be transfered to -> **Rationale** gives you an option to explain, what conversation should be transfered where (i.e. Invoice topics to node representing transfer to finance skill, tech topics to tech skill etc)
  * IMPORTANT -> you should redirect to MSG node ans specify message played to customer

<figure><img src="/files/CWdan4qmHv45l1epJTrK" alt=""><figcaption></figcaption></figure>

* **Transfer to Node**
  * Similar to Redirect to human
  * You can use this tool to transfer the conversation to another specialised Agent (AI node)
  * You can define 1..N transfers representing Agents
* **End process**
  * In similar fashion, you can define situations, when conversation should be ended

#### Attachments support in AI node

Within User input (Configuration section) you can now use attachments. You can do that by choosing a variable, where attachments is stored such as:

* Variable with any naming should contain URL to the attachment. This URL needs to be accessible via Internet
* In case your content can not be exposed to internet
  * Use variable with naming **binary\_XYZ**.&#x20;
  * Upload your attachment to the storage, where our platform has access to (i.e. Blob storage)
  * Use the URL to this storage within the attachment
  * Out platform will take the attachment, convert to base64 and send that for processing to LLM. Base64 is not logged nor stored anywhere
* **Variable type** supported **is a String or List**
* **Attachment type supported are:**&#x20;
  * PNG (.png) - JPEG (.jpeg and .jpg) - WEBP (.webp) - Non-animated GIF (.gif), PDF, DOC, DOCX are supported
  * Up to 50 MB total payload size per request - Up to 500 individual image inputs per request

<figure><img src="/files/KrvZQEqeB88JpM6OLgiM" alt=""><figcaption></figcaption></figure>

#### Other configuration updates

Various changes were done in reagrds to GPT 5 \* models. These are

* **Temperature** needs to be set to 1 -> so you will not be able to change that
* **Reasoning effort** - by default set to Minimal. This directly impacts effect on latency and reasoning tokens, which are more expensive. You can change it to Low/Medium/High for more reasoning type of actions
  * For websearch, at least Low needs to be used
* **Summary** with setting of Auto and Detailed. Reasoning summary is stored with llm response in respective variable - not exposed to customer

**Response format** - if you use JSON, word json needs to be used in your Behaviour prompt.

<figure><img src="/files/tWguJuGBPTS7C0LOAef7" alt=""><figcaption></figcaption></figure>

### New Bubble MVP

New bubble has been deployed on customer test bringing convergence of Text & Speech (avatar coming later). It will appear as 3rd option in the bubble in Digital Studio called "**New Chat"**

<figure><img src="/files/pujBS2IjVwQwJNqAKSkH" alt=""><figcaption></figcaption></figure>

Within this release, you are able to:

* Set the voice settings directly in the bubble
* Switch between Speech & Text mode
* Use streaming also for chat conversations
* Markdown language is supported for formatting

IMPORTANT - this is still MVP phase. Lot of more stuff is comming, bugs will appear and your feedback is appreciated.&#x20;

**What is in store for new bubble in next releases:**

* Avatar regime
* Bubble customization (colours) direclty in Digital Studio
* Bubble deployment via Deploy button
* js code to use for client web page directly in Digital Studio

**Text mode:**

<figure><img src="/files/UfIUH7TUzRRVw1AkQiwt" alt=""><figcaption></figcaption></figure>

**Speech mode**

<figure><img src="/files/k1rbtsCvM7y7tifSGuQl" alt=""><figcaption></figcaption></figure>

### Removed Advanced & Custom parsing in KBI

For Knowledge base processing, options for Advanced and Custom parsing has been removed.

#### DEV release notes

* NEW\_BUBBLE\_URL (typicaly <https://customer-test.borndigital.ai/da-bubble>)  env needs to be added to Builder deployment
* APP\_AZURE\_VERSION env ('2025-03-01-preview' and later) needs to be added to Llm-connector deployment
* Ingress needs to be updated for DA bubble

## Release 10.09.2025

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.18.12</td></tr><tr><td>Builder</td><td>v2.3.0</td></tr><tr><td>Builder Server</td><td>v2.2.6</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.27.7</td></tr><tr><td>Voice</td><td>v1.19.5</td></tr><tr><td>Voice Connector</td><td>v2.0.4</td></tr><tr><td>New Outbound app</td><td>v0.0.15</td></tr><tr><td>LLM connector</td><td>v0.0.18</td></tr></tbody></table>

### New AI Node

AI node has been redesigned to bring more clarity to all the settings, you can use and need to configure also splitting them to Essentials (needs to be configured almost always) and Configuration, where the rest of the configuration is placed which doesn't often needs to be even touched.

All other nodes will also follow in this pattern. In the **Essential** configuration part, you can modify 2 of the most important parts of the AI node, which are:

#### Essential

* **Behaviour** - here your system prompt goes. This is you role-play section, where you needs to define all your expectations from the AI node

<figure><img src="/files/qrJMTlwvMuMzmDFHEAT1" alt=""><figcaption></figcaption></figure>

* **Tools** - here is you place to specify Knowledge base details (at least for now). Very shortly, more tools will be coming here

<figure><img src="/files/pBKu3FsogLa7Lk9B0RD5" alt=""><figcaption></figcaption></figure>

#### Configuration

In the configuration section you will find all the LLM configuration you are usualy used to tweak. Each section is expandable and should be intuitive to use for LLM users. In more detail:

* **Modifying input for AI response** - if not changed, whatever user says is send to LLM and is responded to based on the Behaviour you have set. However, you can modify it here to whatever you want. You can even add chain of User/Assistant messages

<figure><img src="/files/2AJWQ8yNup4PgXilW88T" alt=""><figcaption></figcaption></figure>

* **AI provider -** choose the LLM provider you want to use here. Models for each providers are updated regularly. With list of models, you can find also information how long (based on benchmark) does that specific model take to generate firs token within its response. This has impact on the final latency.
* &#x20;Latency graph is showing how long would it take to generate audio response of average sentence using chosen LLM model abd STT/TTS setings used within you project. This assumes, that for longer responses you are using streaming option.

<figure><img src="/files/flNaGI76VRWtCzYg5t9h" alt=""><figcaption></figcaption></figure>

* **Preparing the response** - specify the rest of the parameters, which are sent to LLM with your request. If you want to use JSON response format, you need to use word "json" also in your prompt. All other parameters are as you are used to them

<figure><img src="/files/gYlud86STze662MSpKDU" alt=""><figcaption></figcaption></figure>

* **Handling the response** - specify, what you want to do once you get the response from LLM. You can specify to which variable the response is stored, wether it is also stored in LLM conversation history, wether it is shown to the user and wether it is streamed or not.

<figure><img src="/files/zhpT2fxSMswskdjXq7TK" alt=""><figcaption></figcaption></figure>

* **Timeout** - lastly, here you can set the timeout for the LLM response. If the response is not returned within specified time, response\_text will be empty. You need to prepare for this eventuality in the flow

<figure><img src="/files/jhXa53afCm82OrG1mkY5" alt=""><figcaption></figcaption></figure>

### New Message node

Same as of the AI node, Message node has been redesigned. Variables section has been split to Variabled and Tools, Message box has been simplified & new Voice section has been added.

* **Message** - has been simplified, where only 1 input box is present as default. This will be used for all channels. If you need still to specify different message for Chat or Voice channel, you can do it via **Split toggle**. Use the X to see the variables, you are using within your flow.

<figure><img src="/files/XpZAvPWEMt3b8PKzsPIC" alt=""><figcaption></figcaption></figure>

* **Voice** - here you can see TTS settings you are using on the project. You can change them and see the impact on the latency. This will be expanded in the following weeks with ability to synthesise that message to hear the final result.

<figure><img src="/files/ZMZq3UvnyCK6KxP5fIlz" alt=""><figcaption></figcaption></figure>

* **Tools** - are the former Smart functions. For more details, see in the sections below
* **Variables** - in this section, you can define new or work with your variables. For more details, see in the sections below

### New Function node

Also FNC node has been redesigned. IN this node, you can work with the Tools (former Smart functions) and Variables. In addition, you can reset your variables here.

<figure><img src="/files/awCZtCLNsUE1ukJ37f3T" alt=""><figcaption></figcaption></figure>

### Tools section

Former Smart functions (special type of Variable) has been significantly redesigned and given it's own section. Screen to work with the tools has been made bigger to bring:

* **Tool configuration** section on the left side. All the tools configuration parameters are shown here. They are also split to the required ones and the optional ones. You need to define at least the ones, which are required. You may be lucky, as some tools do not require any initial configuration.
* **Documentation** where each tool will have shown it's documentation on the right hand side. You will find there
  * Basic tool description
  * Example of User input and what would be the tool output
  * Explanation of Required parameters and how to use them
  * Explanation of Optional parameters and how to use them

<figure><img src="/files/8Thc87Lzk9cFL9FPsQRM" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/dKJCKaMdIqA7vmDxVis4" alt=""><figcaption></figcaption></figure>

### Variables section

Variables has been also significantly expanded giving you space to not just simply assign values or do basic text operations, but also to work with elaborate IF statements or even bring you own simple python 1 liners (they still need to pass an evaluator).

<figure><img src="/files/0se8cShJYeUk6uQEQpWY" alt=""><figcaption></figcaption></figure>

As remembering syntax is b\*tch, we have brought you also the **most common operators**, which can be dragged into your variable workspace.

<figure><img src="/files/rEsTYrFfLQc1pCd4c20W" alt=""><figcaption></figcaption></figure>

On the right side, you will also fint the copilot - chatbot with basic instructions as system prompt. You can use him to clarify syntax if needed.

In the future, ability to test you work directly here will be coming.

### New Redirect & End node

Redirect and Transfer has been changed as well. Transfer node is truly simple and therefor the author will not spend more time on that. However, **redirect node** is bringing some sections for you to use and we will validate, if such approach is something we will be bringing more:

* **Destination** - as redirect node is used for Human transfer, destination parameter is important. It is still a "simple" variable at the end, but we made a special section for that.
* **Status** - this is also a simple "variable" at the end, but to build dashboards, you usually needs to set at least some statuses within your flow. The idea is to give it this special attention at least at points, where something significant is happenings - which will be Start, Redirect and End node. you can use  variable "status" anywhere in the flow to expand this.

<figure><img src="/files/T9rS2u4kfJ7n7fZ8UCHe" alt=""><figcaption></figcaption></figure>

### Deploy modal

To continue with re-designs, deploy modal has been also taken into action. We again split it to Essential and Extras and brought also latency grap&#x68;**.** To give you more details:

#### Essential **section**

* **General** - selection of available phone numbers is here, from which you need to choose. You can also opt to record (and store) the call recording here.&#x20;
* **Voice** - STT and TTS setup is made here. From this point, you don't need to specify each language if you are using Multilingual type of TTS here. But if needed, use Split toggle for that
  * STT and TTS selection has direct impact on latencies. Latencies graph should be read in a way, that this is the time required for STT to transcribe the utterance and the average length sentence response is synthesised. In case of LLM, this processing needs to be added. In case of static cached response, TTS latency will not occur.
  * Repeat question after no answer -> this is old no\_input limit. Selected number means, that if the user is not reacting to the bot within the same Answer node for more than this number, call is dropped

{% hint style="info" %}
**IMPORTANT:** Different Voice (or any other) setup for each phone number wil not be possible anymore. This was decided to reduce the complexity of the setup, since majority of the cases the setup was the same. If you need to set different voices for different phone numbers, you can still do that -> just deploy different versions and each version can have its own set of phone numbers and Voice setup.
{% endhint %}

<figure><img src="/files/QRKP6al6xXeeJ9y3h4bm" alt=""><figcaption></figcaption></figure>

#### Extras section

Backgroung music, whitelist and blacklist can be specified here.

<figure><img src="/files/4WHjerJy9Y5ctjD1rZvE" alt=""><figcaption></figcaption></figure>

## Release 08.04.2025

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.17.8</td></tr><tr><td>Builder</td><td><a href="https://github.com/Born-Digital-AI/builder/releases/tag/v2.0.4">v2.</a>1.1</td></tr><tr><td>Builder Server</td><td>v2.1.0</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.26.0</td></tr><tr><td>Voice</td><td>v1.18.0</td></tr><tr><td>Voice Connector</td><td>v1.17.3</td></tr><tr><td>New Outbound app</td><td>v0.0.14</td></tr><tr><td>LLM connector</td><td>v0.0.14</td></tr></tbody></table>

### <mark style="background-color:green;">Product & Organization dropdowns in New tab modal</mark>

Now, when you want to open new Tab, you will be able to choose a Product and Organization, from which you want to open new project from

<figure><img src="/files/RAKrwajKdBFEiC80PWd4" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">New Whisper Cloud variants for TTS</mark>

Now, when deploying your project on some Phone number, you will be able to choose Whisper Cloud variants - specifically Whisper Open AI and Whisper Azure. Just few remarks:

* Whisper Open AI -> service is not hosted in European Union. To generate audio from average sentence, it takes around 700ms
* Whisper Azure -> here we have very limited quote on requests for a region in EU which is 3 per minute.  To generate audio from average sentence, it takes around 500ms

### <mark style="background-color:green;">Recently closed tabs</mark>

If you want to reopen the Tabs, which you have recently closed - you will be able to from now. Just look for 3 vertical dots in the top right corner

<figure><img src="/files/ebqohu902B4Nxr1G4vNR" alt=""><figcaption></figcaption></figure>

## Release 06.03.2025

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.17.3</td></tr><tr><td>Builder</td><td><a href="https://github.com/Born-Digital-AI/builder/releases/tag/v2.0.4">v2.0.4</a></td></tr><tr><td>Builder Server</td><td>v2.0.2</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.24.10</td></tr><tr><td>Out Calls</td><td>v1.13.7</td></tr><tr><td>Voice</td><td>v1.16.14</td></tr><tr><td>Voice Connector</td><td>v1.16.20</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.100</td></tr><tr><td>LLM Connector</td><td>v0.0.8</td></tr></tbody></table>

### <mark style="background-color:green;">New Workspace = Home</mark>

As part of the Digital Studio redesign initiative, we have decided to make significant updates to the Workspace section. Below are the main changes.

#### **Organization and Product selection in left menu**

Organization and product selection has now been moved to the left menu, where you can now switch easily &#x20;

* between product you want to work with (either Digital Agent or Insights)
* between organisations - please note, that you will be able to see Organizations dropdown only if you are member of multiple organisations

<figure><img src="/files/2ydegl6NTFILFZdNDKHv" alt=""><figcaption></figcaption></figure>

#### **Home section (previously Workspace)**

Previous **Workspace** section **has now expanded to Home**, where all activities outside of specific Project will be happening. You will be able to always get back to Home page by selecting Home icon in the top left corner.

<figure><img src="/files/YvjPc8t2d4ruBLLfny4e" alt=""><figcaption></figcaption></figure>

Home menu is now consisting of:

* **Projects** where all projects, which you can access, are organized
* **Organization** where Admin can manage their organization and all users can manage Data sources for their projects (Input data mainly for users)
* **Help** section, where our Documentation is linked and also email to our support team can be generated

Projects section has also expanded providing multiple ways, how you can see your projects. These includes:

* **Recent** - you can see **last 10 projects** you have opened or made changes in (for given organization). If you don't see any - don't worry. They will appear there once you open any project
* **Favourites -** you can mark any project as your favourite (just use "star" icon on the project detail) - and you will see them all here&#x20;
* **Folders** - you can create your own folders in which you can then organise your projects. These folders are your own and will not be applied to different users. **Each user can use their own folder structure**
* **All projects -** here you will simply see all the projects you have access to

&#x20;

<figure><img src="/files/auHCRUDfSpuHXCFADX2a" alt="Projects section &#x26; Recent view"><figcaption></figcaption></figure>

<figure><img src="/files/FtLocrLefglFSEoMKnAx" alt="Projects section &#x26; Folders view"><figcaption></figcaption></figure>

#### **Project settings**&#x20;

We move from the left menu to the main part of the Home page - Projects. In whichever view you choose, you can:

* **Open Project settings by single click** on your selected Project tile
  * Project settings will appear in the bottom right corner
* **Open Project** as such (flow or configuration) **by double click on the Project tile**, or by choosing Open in the project settings

<figure><img src="/files/PFrOna1o5PN6gEZYENJM" alt=""><figcaption></figcaption></figure>

#### **Filters & Search**

Now, in all projects section you are quickly able to filter your projects by:

* **Live** parameter -> all projects, which have been deployed to Phone Number
* **Trained** parameter -> all projects, which are trained (meaning at least 1 version is trained)

You can also use modified Search bar at the top of the page. you can search by Name, or some tags like Owner & Editor. Important - results of the search will be shown in the modal and you can open projects from there

#### **Project in tabs**

Once you open any project, you will be redirected to new tab as shown below. IMPORTANT change here is, that now you will be able to open Multiple projects at the same time and switching between them - even though they are from different organization.

<figure><img src="/files/1RXbpGXsEkw2c4rGEUBN" alt=""><figcaption></figcaption></figure>

Left menu within opened project stayed mostly without changes. However, we have included possibility to:

* See that project version is trained or not
* Mark project as favourite
* Open Project settings

As part of the left Project menu

<figure><img src="/files/CWtIu60hnpnh0T3CErP3" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">Tables - new design</mark>

All data grids across the app were redesigned to a new, improved layout. These updates enhance usability and provide additional functionality for better table management.

1. **Resizing Columns**
   * Users can now adjust column widths to be larger or smaller as needed
   * This functionality is available in all data grids, including those on the *Campaigns* page
2. **Advanced Filtering**
   * A new filtering system has been added to simplify data search.
   * Users can define operators and input values to filter specific columns.
   * To apply filters:
     1. Click the **filter icon** in the upper right corner.
     2. Enter the desired values and press enter
3. **Quick Text Search**
   * A simple text-based search field is available for quick filtering.
   * Users can enter search terms, press *Enter*, and instantly see the filtered results.

<figure><img src="/files/lgDZesutjyBd6zjFRdeg" alt=""><figcaption><p>Input data with filter in data grid</p></figcaption></figure>

<figure><img src="/files/X1eqT9hHrYzzRCW8UpOg" alt=""><figcaption><p>Recordings data grid</p></figcaption></figure>

### <mark style="background-color:green;">Knowledge Base updates</mark>

#### **Index**

Clicking on the index name opens a modal displaying a table of documents.

<figure><img src="/files/PU8ES0k61x1NYmMijYmC" alt=""><figcaption><p>Modal with indexes</p></figcaption></figure>

#### **Documents**

Clicking on a document name opens a modal for editing the document.

<figure><img src="/files/1JVP6yZ97tcSzydmB8Up" alt=""><figcaption><p>Edit document dialog</p></figcaption></figure>

#### Indexer upload status

Within the Knowledge Base tab, while uploading documents there is a modal showing all **newly created documents and their upload status**. Now, with high number of documents being uploaded, **user can scroll through them.**

<figure><img src="/files/q6BIvY6KwoAnhzMZgQnp" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">Disable utterance processors</mark>

To improve performance, we introduce a new configuration option for projects that do not contain any intents of type *Training Set*. These projects will automatically bypass all utterance processors (such as transformers, correctors, and stop words processing), as these operations are unnecessary and can negatively impact CPU performance.

**Configuration Details**

* **Parameter Name:** `disable_utterance_processors`
* **Type:** `Boolean` (`true/false`)
* **Friendly Name:** *Disable Utterance Processors*
* **Description:**

  > If set to `true`, all utterance processors (i.e., transformers, correctors, stop words) will be disabled.

**Behavior & Default Settings**

* **Default Value:**
  * `true` → If the project does **not** contain any *Training Set* intents (other intent types may still be present).
  * `false` → If the project contains at least one *Training Set* intent.
* **Automatic Adjustment During Training:**
  * The flag is evaluated and set during training.
  * If an intent of type *Training Set* is added before training, the flag is set to `false`.
  * If all *Training Set* intents are removed, the flag is set to `true` during the next training cycle.
* **Sync Behaviour (Flow Editor & Code Editor):**
  * If **sync between Flow and Code editors is enabled**, the flag is automatically updated based on the project's intents.
  * If **sync is disabled**, the flag follows the Code Editor setting:
    * If the flag was not previously set in Code Editor, it defaults to `false`.
    * If the flag is present in Code Editor, it remains unchanged.

**Implementation in Configuration**

The `disable_utterance_processors` parameter is available in both:

1. **YAML Configuration**
2. **Flow Editor Settings**

<figure><img src="/files/sILSBZe6zwwUqabjB26G" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">ANS node - Advanced settings change</mark>

#### Maximum listening time is now allways higher than noInputTimeout

The `noInputTimeout` parameter determines the duration the system waits for user input before timing out.&#x20;

The `maxListeningTime` defines the maximum allowable listening period once input starts.&#x20;

In cases, where these times has been set to the same value, shut\_up signal would be send to conversation in case this time is reached (so maximum listening time takes precedence). **Now, in newly created ANS nodes, Maximum listening time is allways set to higher number than No input time.**

<figure><img src="/files/4TTps7zBtIQIrqZmr92q" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">ANS node - default intent type</mark>

In the *Add Intent* modal, we have changed the order of options for intent type as follows:

* **Generative AI** (First)
* **Training Set**
* **Keywords**
* **Condition**

**Updated Default Selection:**

When user is creating a new intent, the default selection is now **Generative AI** (previously set to *Training Set*).

These changes ensure a more intuitive workflow by prioritizing *Generative AI* as the default intent type.

<figure><img src="/files/JaEHa69CMXQDLCnQxf1o" alt=""><figcaption></figcaption></figure>

## Release 14.11.2024

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.16.0</td></tr><tr><td>Builder</td><td>v1.19.0</td></tr><tr><td>Builder Server</td><td>v1.21.0</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.24.0</td></tr><tr><td>Out Calls</td><td>v1.13.7</td></tr><tr><td>Voice</td><td>v1.16.0</td></tr><tr><td>Voice Connector</td><td>v1.16.2</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.97</td></tr><tr><td>Password page</td><td>v0.0.4</td></tr><tr><td>LLM Connector</td><td>v0.1.1</td></tr></tbody></table>

### <mark style="background-color:green;">Beta testing of colour scheme of Digital studio</mark>

As a test we've come up with a slightly altered - cool toned - variant of green for our Digital Studio. Feel free to share with us your feedback, which variant works better for you.

<figure><img src="/files/4fFBsT8Qa2GAkcdzO7O5" alt=""><figcaption><p>Colors scheme</p></figcaption></figure>

<figure><img src="/files/q9vRp7IbZJAY4fHXdt5x" alt=""><figcaption><p>Landing page</p></figcaption></figure>

<figure><img src="/files/VrtB4UmPmvT54y84g9Ol" alt=""><figcaption><p>Workspace</p></figcaption></figure>

<figure><img src="/files/mKtftLvg0nr7yxmyNtRb" alt=""><figcaption><p>Conversation flow</p></figcaption></figure>

<figure><img src="/files/bHV5RWLylRkkJc2MuSzB" alt=""><figcaption><p>Alerts</p></figcaption></figure>

### <mark style="background-color:green;">New multilingual speech to text provider (Whisper) added</mark>

<figure><img src="/files/wcBqnl3Vo3k60lOq0dqH" alt=""><figcaption><p>Whipser as new STT choice</p></figcaption></figure>

A new **Speech-to-Text** provider option, **Whisper**, has been added to the platform, enhancing transcription capabilities for users **mainly in the multilingual area**.&#x20;

Whisper, developed by OpenAI, is renowned for its accuracy and versatility across multiple languages. It excels at recognizing various accents and dialects, making it a powerful tool for diverse, multilingual applications. Whisper’s strengths lie in its robustness and adaptability, offering reliable transcription even in less-than-ideal audio conditions.

Whisper also requires less time for preparing a transcript leading to lower latencies when used.

As Whisper doesn't support continuous recognition - our implementation **leverages voice activity detection (VAD) to differentiate speech from silence** in an incoming audio stream, sending only the relevant audio chunks to the transcription service. This approach reduces processing demands and improves transcription accuracy and responsiveness.

{% hint style="warning" %}
As use of Whisper is still in the trial phase, for **production uses of Whisper**, discuss with the product team.
{% endhint %}

<details>

<summary>Technical details of implementation</summary>

1. **Receiving Incoming Audio Stream**
   * The Voice app receives the audio stream as a series of small chunks (typically between 10-200 ms in duration).
   * Previously, each chunk was sent directly to Azure's STT service; however, this alternative flow will first filter the chunks through a VAD.
2. **Initial Processing via Voice Activity Detection (VAD)**
   * All audio chunks are passed through the WebRTC VAD, which classifies each chunk as speech or non-speech.
   * The WebRTC VAD is configured for **30 ms chunks** and set to a **sensitivity level of 3** for aggressive silence detection. Only speech chunks are collected for transcription, excluding non-speech sounds like background noise.
3. **Chunk Collection for Transcription**
   * When the VAD detects speech, the app starts aggregating the relevant chunks into a virtual WAV file.
   * Collection stops upon detection of a non-speech segment after speech, marking the end of the speech segment.
4. **Sending to Whisper STT**
   * The generated WAV file is sent to the Whisper STT service for transcription. Whisper STT is pre-configured on a GPU cluster for efficient and fast transcription.
   * Transcription requests are issued only after speech has ended, allowing the STT service to process meaningful audio segments efficiently.
5. **Handling Interruptions in Speech**
   * To ensure fluid interactions, the app incorporates a short "pause-detection buffer" (configurable by chunk count).
   * If new speech is detected within this pause buffer, any pending transcription response is discarded, and a new transcription request is initiated with the combined speech chunks.
   * This step minimizes interruptions by avoiding unnecessary requests and overlapping transcriptions.
6. **Receiving and Finalizing Transcriptions**
   * When a transcription result is received, the app ceases further audio processing until the transcription is complete.
   * This mechanism prevents overlapping transcriptions and optimizes resource use.

</details>

### <mark style="background-color:green;">Reference node in new design</mark>

**Reference nodes have been updated to match the appearance of their original nodes.** The background colors of the reference nodes are now lighter versions of the original colors, and they have the same shape, making them look more similar.

<figure><img src="/files/B7Zq5CVejMl8C1ZbAJc6" alt=""><figcaption><p>Reference nodes</p></figcaption></figure>

### <mark style="background-color:green;">Duplex - Possibility to be able to jump to Voicebot speech</mark>

**User speaking with voicebot will now be able to interupt the voicebot in his speech.** This has been long in the discussion, but with LLMs now also possibly contributing to the success of the call.

{% hint style="info" %}
With old NLP based conversation flow, this functionality would almost all the time lead to not understanding and transfer to the human operator.
{% endhint %}

This feature needs to be TURNED ON, if you want to use it, in the Advanced settings in each Answer node, where you want to use it.

PICTURE

{% hint style="warning" %}
IMPORTANT - be careful with this functionality, as any audio input may interrupt the voicebot in their speech.&#x20;
{% endhint %}

**But its not just that -** The Voice Interaction Interruption API now allows external applications (User, Digital Human touchscreen etc) to interrupt the system's voice processes, whether it's speaking back a response or listening to a user. This feature is useful for making real-time adjustments, enabling external signals to take precedence over ongoing tasks.

<details>

<summary>Technical Behaviour Specifications</summary>

* **Interrupting During Listening (STT)**:\
  When the system is in the STT phase and receives an interruption signal from an external application:
  * The listening process stops immediately.
  * Any provided utterance (or an empty one if none is given) is sent directly to the NLP system for processing.
* **Interrupting During Speaking (TTS)**:\
  If the system is in the TTS phase and gets an interrupt signal:
  * The TTS playback stops right away.
  * The interrupt signal or utterance is sent directly to the NLP system.
  * The system skips the STT phase after the interruption, ensuring quick processing of the signal.
* **Priority of External Signals**:\
  Any external signal received takes priority over ongoing STT or TTS interactions, ensuring immediate action is taken.

#### Payload Structure

When sending a request to the endpoint, the payload should include:

* **State (optional)**: Indicates whether the voice interaction is currently in STT or TTS. If not specified, the system uses the active state.
* **Utterance (optional)**: A text string for the user’s input to be processed. If omitted, an empty utterance is sent to the NLP system.
* **Signal (required for interruptions)**: A boolean value that, when set to true, interrupts the current voice interaction and prioritizes the provided signal or utterance.

</details>

### <mark style="background-color:green;">Project version is shown in project dropdown again</mark>

**In header is now next to project name is now again visible information about version.**&#x20;

When user change the version of project he can see it there and it is not nescessary to go to version history to check wich version of project is In use.&#x20;

<figure><img src="/files/497X8ZjYfBr8Wgx4be4s" alt=""><figcaption><p>Project version on this project is 0.14 on workspace</p></figcaption></figure>

### <mark style="background-color:green;">Updated By information in the Version history</mark>&#x20;

Now, in Version history modal, **you will be able to see who made the last changes to the flow.** This information **is updated automatically wich each save** (manual or automatic) of the version. Just a reminder, project version is automatically saved with each Open/Close of the node and all other activities on the conversation flow page.

<figure><img src="/files/CI4lBdFHWyLw01dV5G6D" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">Knowledge base and conversation transfer between muliple logic</mark>

We have encountered a bug, when **if you had a Transfer node in the project and were using the Knowledge base, in some conversations the knowledge base would not be pulled by the AI node.** This was caused by not correct project id used by back-end in that conversation. As a workaround, knowledge base was needed to be uploaded also to the project, where the Transfer node led.

**This bug has been fixed.**

### <mark style="background-color:green;">Pasting text to start of Message node</mark>

Bug with pasting text at the beginning of the text box has beed fixed.&#x20;

<figure><img src="/files/xvmFdGKDv3jsM9hwsqEe" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">ElevenLabs spending has been added to logs</mark>

As part of Cognitive services spending log, **we have added spending monitoring specifications for the ElevenLabs Text-to-Speech (TTS) service**, focusing on tracking characters synthesized and audio duration. These metrics are essential for monitoring usage and performance, similar to the current logging for multilingual TTS.

<details>

<summary>Technical details</summary>

To accurately track and report on ElevenLabs TTS synthesis, log the following metrics in the payload, each under a specific key for easy access and standardization.

**Metrics and Keys**

1. **Characters Synthesized**
   * **Key**: `elevenlabs_tts_characters`
   * **Description**: This tracks the total number of characters synthesized for each TTS request, including all characters in the provided text that were processed to generate audio.
   * **Data Type**: Integer
2. **Synthesized Audio Duration**
   * **Key**: `elevenlabs_tts_duration`
   * **Description**: This records the total duration (in seconds) of the audio generated from the input text.
   * **Data Type**: Float

</details>

### <mark style="background-color:green;">**Copy of flow elements is working again**</mark>

Copying of flow elements has been fixed working now also with all of the node content and also between projects.

<figure><img src="/files/YuLiHvLMuamxTDoitQcy" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">**Various Design and Functional changes**</mark>

* New nice animation when waiting to load the data
* Design fixes after new design system implementation
* New way, how counter is generated in Yaml - leading to quicker BOT responses, especially with long conversations
* Voice-connector has been updated - only user speech part is sent to Voice with STT, reducing completely the situations, where BOT can listen to itself
* Azure multilingual voices has been added
* Support for new out-calls up in Voice-connector, Voice and NLP has been added
* In NLP, fixes has been made to prevent conflicting DB updates in coversation history leading to not correct stated in some cases, where non=blocking fetch\_url has been used

## Release 30.09.2024

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.15.26</td></tr><tr><td>Builder</td><td>v1.18.3.1</td></tr><tr><td>Builder Server</td><td>v1.20.0</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.23.4</td></tr><tr><td>Out Calls</td><td>v1.13.3</td></tr><tr><td>Voice</td><td>v1.15.17</td></tr><tr><td>Voice Connector</td><td>v1.15.17</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.96</td></tr><tr><td>Password page</td><td>v0.0.4</td></tr><tr><td>LLM Connector</td><td>v0.1.1</td></tr></tbody></table>

### <mark style="background-color:green;">New LLM Providers integrated with our solution</mark>

**The AI node now supports integration with various LLM providers including Azure, OpenAI, Anthropic, Gemini, and Grog**. This allows business users to choose the best solution based on their business needs, improving flexibility and performance.

#### **Provider Descriptions:**

• **Azure**: GPT 4o mini for Standard model and GPT 4o for Advanced model. Best for big corporate clients. It excels in handling large-scale deployments with robust security and compliance requirements. **It's compliant with GDPR requirements for clients in EU.**

• **OpenAI**: GPT models directly from Open AI provider. Newest models available very quickly with much higher limit for maximum token per minute spend. **Data may be processed outside of EU.**

• **Gemini**: Alternative if Open AI models shoyuld not be user. To be used mainly in EN languages, local languages after thorough testing. Flesh and Pro models, where:&#x20;

* **Gemini Flesh** shows higher speed with comparable quality and price compared to **GPT 4o Mini**
* **Gemini Pro** showing higher quality than **GPT 4o** with lower price but also speed

• **Grog**: Optimised for **high-speed responses and low-resource environments with high amount of input data**. It’s a good choice for lightweight voicebots where speed and efficiency are critical without sacrificing too much on quality. To be used mainly in EN languages, local languages after thorough testing.

* **Llama small** (3.1 8B): very quick in responses, slightly lower quality and lower price compared to GPT 4o Mini
* **Llama big** (3.1 70B): comparable quality with 4o Mini, slightly higher price

• **Anthropic**: Good for logical reasoning. To be used mainly in EN languages, local languages after thorough testing.

* **Sonnet** (Claude 3.5): best for programming and complicated logic. Slightly more expensive than GPT 4o with higher context window.

#### **AI node changes**

UI of our AI node slighlty changes, where Provider and Model name are shown to the user right away. Default is Azure and Standard model, but you can choose you provider now. You need to be sure, if you want to use different than Azure provider in terms of:

* GDPR rules and requirements of your client
* Quality of responses for your context, especially in non EN languages

<figure><img src="/files/02XosAz9SFbRLHe3u1Gf" alt=""><figcaption></figcaption></figure>

#### **General technical info:**

New LLM service needs to be deployed to support non Azure LLM providers. In case the service is not deployed, old implementation will be still supported for several releases using Azure Open AI LLM provider only.

#### **Environment variables changes needed:**

**Builder-Server**

```
LLM_CONNECTOR_API_URL needs to be added with URL to LLM Service deployment

For each provider, Friendly names and actual models names needs to be provided in a form: 
friendly name (i.e. Standard) | model name (i.e. gpt-4o-mini)

Such as:
LLM_PROVIDER_AZURE_MODELS: Standard|gpt-4o-mini;Advanced|gpt-4o
LLM_PROVIDER_OPENAI_MODELS: Standard|gpt-4o-mini;Advanced|gpt-4o
LLM_PROVIDER_GEMINI_MODELS: Gemini Pro|gemini-1.5-pro
LLM_PROVIDER_ANTHROPIC_MODELS: Haiku|claude-3-haiku-20240307
LLM_PROVIDER_GROQ_MODELS: Llama small|llama3-8b-8192;Llama big|llama3-70b-8192;Mixtral|mixtral-8x7b-32768
```

**NLP Engine**

```
LLM_CONNECTOR_URL needs to be added with URL to LLM Service deployment
```

### <mark style="background-color:green;">New design system</mark>

About **80% of new design system components has been developed and applied to as-is UI of the Digital Studio**. The biggest changes can now been seen in buttons, checkboxes, icons, tabs, drop-down and switch options, Avatar menu, navigation panel, textfields, alerts, tooltips, stepper and scroll bars. Just see for yourselves. Now, rest of the components will be developed in parallel with complete workspace redesign and creation of templates.

### <mark style="background-color:green;">Custom parsing documents - Better support for PDF files</mark>

In knowledge base section, upload of PDF file now has better support for parsing of the document.

### <mark style="background-color:green;">Call end signals now properly propagated to the flow</mark>

Starting now, the **system will now transparently log and display how each call ended, both in interaction logs and technical logs**.&#x20;

This includes detailed reporting on the success or failure of **call redirects to human agents.** For all SIP transfers (both attended and unattended), the outcome of the transfer—whether successful or not—will be logged, providing greater transparency and control over call handling.&#x20;

{% hint style="info" %}
If a transfer is successful (202 Approved for SIP REFER or 200 OK for SIP INVITE), the call will be connected to human operator. **In case of failure, information is send back to flow and alternative steps such as API call can be employed to manage the fallback situation.**
{% endhint %}

**Call end information is also now stored in the&#x20;**<mark style="color:purple;">**call\_end\_type**</mark>**&#x20;variable**, which can be leveraged for reporting and visualisation as part of Kibana dashboards.

Call End type of information stored in <mark style="color:purple;">**call\_end\_type**</mark>**&#x20;variable**:

• **call\_finished**: Logged when the call is ended by the digital assistant or an automated process.

• **call\_end\_customer\_hangup**: Logged when the customer explicitly hangs up the call.

• **call\_redirected**: Logged when a transfer to a human agent (SIP transfer) is successful.

• **call\_redirect\_error**: Logged when a transfer to a human agent (SIP transfer) fails, allowing for alternative handling.

{% hint style="info" %}
With these enhancements, businesses gain improved reporting and monitoring capabilities, ensuring accurate tracking of call outcomes for more informed decision-making.
{% endhint %}

### <mark style="background-color:green;">Possibility to show/ hide password</mark>

New functionality to show and hide password was added - just click on the eye icon.

User can use it on login page, My account page, Organization page, reset password and change password page.

**Show password**

After clicking on the icon of an open eye, the password is shown and icon changes to closed eye.

<figure><img src="/files/2uMcXrNKrBDQaRZm7l3c" alt="" width="320"><figcaption></figcaption></figure>

**Hide password**

After clicking on the icon of closed eye, the password is shown as asterisks again and icon changees to opened eye.

<figure><img src="/files/bd5irE0vVBwCJToMwIg5" alt="" width="320"><figcaption></figcaption></figure>

### <mark style="background-color:green;">Digital studio loading</mark>

The digital studio loading is now much faster then in previous release. When user f.e. restart the page it shows load around 490 ms. On slower internet is the load time a but longer.

<figure><img src="/files/8JCFt62Nm9ztG1vyDPRK" alt=""><figcaption></figcaption></figure>

### <mark style="background-color:green;">Organization dropdown</mark>

The bug, where in some of cases Organizatin dropdown was not shown is now fixed.

## Release - 27.08.2024

### Digital studio - overview

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Chatbot Bubble</td><td>v2.15.19</td></tr><tr><td>Builder</td><td>v1.17.32</td></tr><tr><td>Builder Server</td><td>v1.19.10</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.22.21</td></tr><tr><td>Out Calls</td><td>v1.13.3</td></tr><tr><td>Voice</td><td>v1.15.12</td></tr><tr><td>Voice Connector</td><td>v1.15.13</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.96</td></tr></tbody></table>

### Refresh button within active campaign

To prevent issues with huge amount of data loading in Digital Studio, we have introduced **Refresh** **button** within active campaign page.

Now, when the campaign is running and you would like to see the actual progress, use this button to fetch most updated data.

If you don't use Refresh button, data will be fetched every 2 minutes, if the page is active.&#x20;

<figure><img src="/files/ati4WlsrQtaoe051LGNy" alt=""><figcaption></figcaption></figure>

### Recordings page changed to Conversations page

**The Recordings page now is changed to Conversations page** and is showing all conversations within the respective project, including chat ones.

Each conversation in DB has now information, wether the recording was stored or not. If Yes, recording will be shown also in Digital Studio - if not, only transcript will bw show - as shown below:

<details>

<summary>Recording in Transcripts</summary>

**Recordings** will appear in the transcript **if call recording was enabled** for the project.

<img src="/files/sojpO2pQSitrMvuAlUrv" alt="" data-size="original">

&#x20;If **recording** was **disabled**, the recording will not be included in the transcript.

<img src="/files/KvqKphAckifD0HR3IdVT" alt="" data-size="original">

</details>

### DTMF processing set up

> <mark style="color:red;">**From this release, DTMF processing will be turned OF as a default setting and needs to be turned ON, if we want to process DTMF signal in ANS node.**</mark>

In the advanced settings of ANS node, a new toggle switch labeled **"Turn on processing of DTMF signals"** is introduced. **By default, this toggle is set to OFF.**

A new variable which was set by enable DTMF in YAML configuration, `process_dtmf_signals`, is added to the YAML configuration. This variable controls whether DTMF signals are processed.&#x20;

The voice processing logic is updated to respond to the state of the `process_dtmf_signals` variable:

* **When the toggle is ON** (`process_dtmf_signals` is `true`), **DTMF signals are processed** as they are received.

<figure><img src="/files/mhMOM5rfVmbzyXlSMuMs" alt=""><figcaption></figcaption></figure>

* **When the toggle is OFF** (`process_dtmf_signals` is `false`), **DTMF signals, though received, are ignored** and not processed.

<figure><img src="/files/kl3sm2FaDCYt65ibySmN" alt=""><figcaption></figcaption></figure>

#### **Steps for Configuration**

**Access ANS node advanced setting**:

* Open the respective ANS node configration
* Go to the Advanced settings
* Locate the new option to toggle

<figure><img src="/files/eQlxvSZulvGS7ZL3GisY" alt="" width="285"><figcaption></figcaption></figure>

**Default Settings**:

* For all existing accounts, this setting will be enabled by default.

<figure><img src="/files/pVp9SBjasoKbMtkiuQJi" alt="" width="359"><figcaption></figcaption></figure>

### Transfer on SIP level

This feature allows administrators to configure the transfer type (attended or unattended) for each SIP account individually. This update provides greater flexibility by allowing transfer types to be configured per SIP account while maintaining a default setting for the overall environment. Previously, the transfer type could only be set globally across the entire environment using an environment variable. With this update, you can maintain a default transfer type and customize it per SIP account as needed.

**No change needed for existing SIP account registrations.**

<details>

<summary><strong>Configuration</strong></summary>

1. **Default Transfer Type**: Continue using the `TRANSFER_TYPE` environment variable to define a global default transfer type for the entire environment.
2. **SIP Account-Specific Configuration**:
   * **Backend Changes**: A new database column was created to store the transfer type (`"A"` or `"U"`) for each SIP account.
   * **Behavior**: If a transfer type is specified for a SIP account, it will override the global default for that account. If not specified, the system will fall back to the global default defined by the `TRANSFER_TYPE` environment variable.

</details>

### SIP/ Refer- optional header parameter

In our current SIP redirect implementation, **optional SIP headers are defined using the `X_<variable>` format**. This feature enhances compatibility with various PBX systems by allowing administrators to control the inclusion of optional SIP headers in SIP REFER requests. This feature is available in the SIP account settings within the Voice Connector and can be controlled via the Digital Studio interface.

**New Implementation**

New configuration option allows administrators to **enable or disable the sending of optional SIP headers in SIP REFER requests.**

**Configurable SIP Headers**:

* **New Option**: In the Voice Connector settings, under the SIP account configuration section, a new toggle will be available to control whether optional SIP headers (e.g., `X_destination`) are sent with SIP REFER requests.
* **Default Setting**: The default setting for this option will be **ON** (i.e., optional SIP headers will be sent). This setting will be applied to all existing SIP accounts.

<figure><img src="/files/Px2oMBn5Tur1cIsz7KVs" alt=""><figcaption></figcaption></figure>

* **Turning Off SIP Header**: When this option is turned **OFF**, only the `Refer-To` header will be sent in the SIP REFER request, and the `X_destination` and other optional SIP headers will be omitted.

<figure><img src="/files/b8GJpu3xUP48tHLXzwNn" alt=""><figcaption></figcaption></figure>

**Digital Studio Interface Configuration**:

* This feature is configurable via the Digital Studio interface (through `builder-server`).
* Administrators can toggle this setting on or off per SIP account within the Connector section.

**Conference Call Feature Update**:

* The conference call feature respect this new configuration setting. If optional SIP headers are turned off, conference calls will be handled without sending any `X_<variable>` headers in SIP REFER requests.

### Import/ Export LLM configuration for CIA projects

#### FE changes

There was add an Export/Import button into interface.

* When the import is successful, a msg "Import successful" is shown.&#x20;
* When the import is not successful (strange JSON format or any other issue), a msg "Import unsuccessful" is present.

#### BE changes

#### Export functionality&#x20;

The entire LLM configuration, including prompts, custom parameters, etc., is exported into a JSON file. Clicking the **Export** button will generate and directly download the JSON file.

#### Empty configuration

If the user exports an empty configuration, the JSON file will be generated with no fields filled in, which is acceptable.

#### Import functionality

When importing, a file explorer opens to allow the user to select a JSON file from their PC.

The system checks the format of the JSON file:

**Correct Format**: The configuration is imported, and any existing LLM configuration is completely replaced.

**Incorrect Format**: The user is notified with the message **"Import unsuccessful."**

### Utterance\_language extractor&#x20;

The extractor **utterance\_language** returns the ISO code of the detected language

## Release - 15.07.2024

### Digital studio - overview

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Builder</td><td>v1.17.14</td></tr><tr><td>Builder Server</td><td>v1.18.12</td></tr><tr><td>Chatbot Bubble</td><td>v2.15.6</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.22.15 <mark style="color:red;">(IMPORTANT ENV CHANGE)</mark></td></tr><tr><td>Out Calls</td><td>v1.13.0</td></tr><tr><td>Voice</td><td>v1.15.6</td></tr><tr><td>Voice Connector</td><td>v1.15.5</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.91</td></tr></tbody></table>

### Conversation DB table migration (NLP application)

Part of the changes within NLP application is migration of conversations table to enable quicker bot responses, analytics being used also on BOTs and to have all conversations, not just voicebot ones in the Recordings tab in the studio.

**This migration to run requires these changes in deployment:**

#### **To migrate table to new structure:**

```
DATABASE_MIGRATION_CHECKPOINT = "CreateGetConversations"
DATABASE_MIGRATION_BATCH_SIZE = (default is set to 5000)

IMPORTANT: temporarily increase liveness & readiness  probes delay to allow migrations to run
```

#### **To migrate back to original table structure:**

```markup
DATABASE_MIGRATION_CHECKPOINT = "RevertConversations" 
```

{% hint style="warning" %}
**NLP with version 1.22.10 and higher needs to have the table migrated.**
{% endhint %}

### To prepare for new conversations page

Migration of the DB table is also a preparation for the new conversation page in digital studio, where instead of recordings - all conversations will be shown.

To support, that these conversations, if having a recording as well, can have that recording being played from the digital studio, **release of voice-connector need to happen.**

#### Voice connector related information:

```
Version: v1.15.5
ENV: NLP_ENGINE_URL={URL for NLP Engine}
```

## New AI node property variable

We have completed a minor deployment on the Customer-Test environment, specifically related to the indexer functionality. This update introduces important changes that you need to be aware of:

### New Automatic Variable Population in AI Node

When using the indexer in the AI node, the following variables are now automatically populated and can be utilized within your workflows:

### **FINAL DOCUMENT Variables:**

* **kb\_document\_id**: Contains the internal ID of the document used. This ID can be used for advanced API calls to the indexer, if needed.
* **kb\_document\_name**: Contains the name of the document used for the final answer.
* **kb\_document\_url**: Contains the URL of the document used for the final answer. This will be empty if the URL is not populated in the document.

<figure><img src="/files/XVmLJQ04GPG67WJP5TJ2" alt=""><figcaption></figcaption></figure>

**Use Case Example:** To display to the user which document was used to prepare the answer, you can use the MSG node after the AI node. For instance:

```kotlin
For more information, check this document:
[{kb_document_name}]({kb_document_url})
```

or

```csharp
My answer was based on this document:  
[{kb_document_name}]({kb_document_url})
```

The end result will be a clickable link to the document used for the answer. Ensure the URL is populated in the Knowledge Base tab and is the URL of the original document.

### INDEXER Related Variables

The following variables are now available for indexer-related data:

**indexer\_returned** where result of the index search to the indexer is stored. It's json format with

* list of documents, from which the snippets were found based on the question and snippet size
* for each document
  1. id of the document
  2. url of the document
  3. name of the document
  4. labels for the document
  5. description = annotation od the document
  6. individual chunks (again, as list)

**Use Case Example:** For reporting and troubleshooting, you can check which snippets have been found and what document descriptions were used to find the best answer without needing to check technical logs. This can also be used within the flow to work with JSON-structured variables.

<figure><img src="/files/XRPWIMuQ3ffKNW5oV7ft" alt=""><figcaption></figcaption></figure>

### **AI NODE primary variable, where the response of GPT is stored**

The primary variable where the GPT response is stored remains the **gpt\_response** variable. This JSON structure now also includes:

* **gpt\_response** variable (or however you call the variable in the AI node)

[it's a json structure variable, where originaly you were working with (or AI node used bu default) the key "response\_text"](#user-content-fn-1)[^1]

* **Now it also contains these keys:**
  1. function\_call -> if the AI node used function, you will see it here and use in the flow or troubleshooting. This key contains

     name of the function used

     arguments -> in our case questions, which GPT used to send to indexer
  2. error -> if there was an error response form the AI node/gpt

**Example:**

<figure><img src="/files/MPt5vLpR27cA2m6Ec475" alt=""><figcaption></figcaption></figure>

### Design System Change is Coming

We are glad to announce a desig system unification and update for the Digital Studio. Here are the key changes already deployed with many more to come:

<figure><img src="/files/RdVpw3HrNnJmToZQz17b" alt=""><figcaption></figcaption></figure>

* **New Default Font**: We have adopted Montserrat as our new default font.
* **Updated Color Scheme**: The color palette has been revamped to be aligned with our official colors.

{% hint style="info" %}
This is just the beginning of the changes coming in following weeks.
{% endhint %}

### Two-Factor Authentication for Clients

You can now set up two-factor authentication using an authorization key on your mobile phone to meet specific organizational security needs.

<figure><img src="/files/PHfAYcNCR3IiRVpZd99T" alt=""><figcaption></figcaption></figure>

### Role Management for Admins

Admins can now change user roles within their organization. This feature allows for the promotion and demotion of users via the /organization interface. See the GIF below:i

<figure><img src="/files/mUFsAUDagOrkCRDDwWfW" alt=""><figcaption></figcaption></figure>

### Knowledge Base Improvements

* When creating the index, annotations are now automatically created in the project language, with future plans to unify this process.
* Uploading documents will now automatically generate a document description as an annotation.

<figure><img src="/files/bgyXNasU3ZSF7KR1gl4S" alt=""><figcaption></figcaption></figure>

### Technical and Business Variables in Overview

You can now toggle to display both technical and business variables in the variables overview:

<figure><img src="/files/zosayQ3E9uRDAKSMNy37" alt=""><figcaption></figcaption></figure>

* **Business Variables**: Created by the user.
* **Technical Variables**: Automatically generated by Digital Studio, such as:
  * Location
  * Phone number
  * Conversation
  * Channel
  * Header Parameters

### **Additional changes** <a href="#additional-improvements" id="additional-improvements"></a>

* **Application Performance:** We have enhanced the performance and logic of the Digital Studio, ensuring greater efficiency and a smoother user experience
* **Bug Fixes and Improvements:** Model queries have been optimized for increased speed and efficiency, contributing to overall system reliability and performance

***

## Release - 07.06.2024

### Digital studio - overview

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Builder</td><td>v1.17.4</td></tr><tr><td>Builder Server</td><td>v1.18.6</td></tr><tr><td>Chatbot Bubble</td><td>v2.15.1</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.22.4</td></tr><tr><td>Out Calls</td><td>v1.13.0</td></tr><tr><td>Voice</td><td>v1.15.3</td></tr><tr><td>Voice Connector</td><td>v1.15.0</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.88</td></tr></tbody></table>

### Index Parsing Methods Improvements

We have introduced new capabilities to enhance the parsing of documents into multiple chunks within the Index:

* **Simple Parsing Method - Delimiters:** You can now split documents by setting a delimiter (ENTER or double ENTER). The document will be divided into snippets based on the chosen delimiter. Default delimeter means snippets will be parsed with the same approach as before

{% hint style="info" %}
Use this method in case you have a clear TXT document (for example FAQ type), where you have paragraphs of text woth questions / answers and you have ENTER or double ENTER between the paragraphs. Created snippets will be then created based on these paragraphs
{% endhint %}

<figure><img src="/files/gKcoInCS1IjIQiMjukig" alt=""><figcaption><p>Index simple parsing with delimiter example</p></figcaption></figure>

* **Custom Parsing Method:** Select specific areas to split into snippets using the **SHIFT + ENTER** command, allowing for more control over how the snippets are creating. For now, upload just one document at a time if you want to use this method

{% hint style="info" %}
When you upload your document, set the Custom parsing method and you press Upload -> txt version of the document will be shown to you on the next page, where you can decide by yourself how the snippets will be created
{% endhint %}

<figure><img src="/files/Mzlrg5qnF1THRyzxLUis" alt=""><figcaption><p>Index custom parsing example</p></figcaption></figure>

{% hint style="info" %}
The default parsing method remains unchanged, with parsing still performed after a certain number of characters.
{% endhint %}

​

### Export/Import Index from Knowledge Base Tab

We have enhanced our Knowledge Base tab to allow you to **easily export and manage indexes.** You can now export one or multiple indexes with a simple click. Additionally, we've updated the functionality to ensure that the exported indexes can be seamlessly re-imported.

**Copy indexes** functionality can be also used if you just want to copy the index (either to the same, or other project).

{% hint style="info" %}
This will help you to move your fine tuned index from Test to Prod for example. All content of your index is exported (incl. snippets) and are uploaded to the new environment in the same way. **You can also export and import whole project configuration, which includes also indexes now**
{% endhint %}

<figure><img src="/files/mmkfCKgqv41hMeKYSTYJ" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This week, we upgraded our default embedding models from **text-embedding-ada-002** to the latest **text-embedding-3-large**. We recommend copying the active indexes in your project, which will copy it but use new embedding model to create your embeddings.&#x20;

See <https://openai.com/index/new-embedding-models-and-api-updates/> to check why the new model is better, especially in non English languages.
{% endhint %}

### **U**pdated URLs in Digital Studio

We redefined how the **URLs are structured** when using our product. The unique Project ID is now integrated directly into the URL structure, as well as information on which tab are you located and which element you have opened.

With this update, **you can now share exact node paths or project paths** within the conversation flow with your colleagues. When they access the shared URL, the connected project with the specified node will appear, streamlining teamwork and facilitating more frequent project sharing.

<figure><img src="/files/bB9dZ5b9VGGaCHOw6wAH" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This improvement applies to all aspects of Digital Studio, as well as in Customer Insight Analytics product
{% endhint %}

#### Old URL structure: <https://customer-test.borndigital.ai/digital-agent/conversation-flow>

#### Updated URL structure: <https://customer-test.borndigital.ai/digital-agent/64df3ed850e70791449cceab/conversation-flow/MSG\\_START>

### **M**essage Node Announcement Enhancements

You can now **use Announcements in your Message node** UI directly and set their behaviour for Chat conversations.

<figure><img src="/files/x0jI0THnYb6SVllFSp1h" alt=""><figcaption></figcaption></figure>

### **Additional changes** <a href="#additional-improvements" id="additional-improvements"></a>

* **Global Fallback Counter in Answer Node:** You can now create a global fallback counter for ANSWER nodes, instead of having individual counters for each node. This means, where applied, that **fallbacks count in the whole conversation is considered.**

<figure><img src="/files/J0PlifUzp7ZoNgJJMGcy" alt=""><figcaption></figcaption></figure>

* **Digital Email Processing** tile has been removed from the main page, since email bot is now part/combination of both main products.
* **Technical Logs Removed from Sidebar:** As part of our UI improvements, access to Technical Logs has been removed from the sidebar, resulting in a cleaner and more user-friendly interface
* **Application Performance:** We have enhanced the performance and logic of the Digital Studio, ensuring greater efficiency and a smoother user experience
* **Bug Fixes and Improvements:** Model queries have been optimized for increased speed and efficiency, contributing to overall system reliability and performance

***

## Release - 09.05.2024

### Digital studio - overview

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Builder</td><td>v1.16.2</td></tr><tr><td>Builder Server</td><td>v1.17.1</td></tr><tr><td>Chatbot Bubble</td><td>v2.14.0</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.22.1</td></tr><tr><td>Out Calls</td><td>v1.13.0</td></tr><tr><td>Voice</td><td>v1.15.0</td></tr><tr><td>Voice Connector</td><td>v1.15.0</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.83</td></tr></tbody></table>

​

***

### **Project Export and Import via .ZIP Files Now Includes Indexes** <a href="#personalized-notepad" id="personalized-notepad"></a>

You can now export and import your project as a .ZIP file along with all connected assets. Please note that this process may take some time.

{% hint style="danger" %}
The file structure for imports has changed. You will need to create new export and import packages moving forward.
{% endhint %}

<figure><img src="/files/0quqQH6fsoLcxYmJnVUa" alt=""><figcaption><p>Importing the indexes is possible</p></figcaption></figure>

{% hint style="info" %}
This feature is currently operational on MacOS. However, a minor bug has been identified on Windows (Edge and Chrome browsers). We are actively developing a hotfix for this issue.
{% endhint %}

### **Enhanced Knowledge Base Index!**

We've upgraded our knowledge base!  You can now edit, delete, or add new chunks in one dialog.&#x20;

<figure><img src="/files/1gMhzkbzncmCJWfy11DB" alt=""><figcaption><p>Knowledge base chunk details explained</p></figcaption></figure>

### **Project Deletion and Associated Asset Removal**

Deleting a project will also remove all connected assets. A new dialog box will confirm that the following related assets will be deleted:

* Knowledge base indexes
* Campaign data
* Annoucements settings

<figure><img src="/files/I2UQ8yRU33Ginb7UaYo5" alt=""><figcaption><p>Deleting the project</p></figcaption></figure>

### **Enhanced Capability: Creating New Nodes within Intents**

We have introduced the ability to create new nodes directly in the 'Answer' node of intents, enhancing the user experience by providing a more straightforward workflow.

<figure><img src="/files/bZiqiHdLoKpn2N3g0HCl" alt=""><figcaption><p>Creating new nodes from intent dialog</p></figcaption></figure>

### **Export Flow images with or without Comments**

You can now export your project flow as a \*.PNG file, either including or excluding project comments. Test out both options to determine which best suits your needs.

<figure><img src="/files/3rNylmHaVCs8vEneo6Mk" alt=""><figcaption><p>You can now export image of your flow with/without comments</p></figcaption></figure>

### **Additional changes** <a href="#additional-improvements" id="additional-improvements"></a>

* **Application Performance**: Enhancements to the performance and logic of the Digital Studio now deliver greater efficiency.
* **Bug Fixes and Improvements**: Model queries have been optimized for increased speed and efficiency.
* **Knowledge Base Indexer**: Document descriptions are now limited to 1024 characters.
* **Campaign Reports in XLSX**: You can now export campaign data directly to XLSX format from the campaign page.

We are committed to continuous improvement and innovation to serve your needs better and exceed your expectations. Future updates are on the way, and we thank you for your ongoing support.

***

## Release - 28.03.2024

### Digital studio - overview

<table><thead><tr><th width="366">Application</th><th>Version</th></tr></thead><tbody><tr><td>Builder</td><td>v1.15.0</td></tr><tr><td>Builder Server</td><td>v1.16.0</td></tr><tr><td>Chatbot Bubble</td><td>v2.14.0</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.21.0</td></tr><tr><td>Out Calls</td><td>v1.11.1</td></tr><tr><td>Voice</td><td>v1.14.0</td></tr><tr><td>Voice Connector</td><td>v1.14.0</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.80</td></tr></tbody></table>

​

***

### Application speed enhacements <a href="#personalized-notepad" id="personalized-notepad"></a>

In our latest update, the focal point of our sprint was the enhancement of speed and performance across the Digital Studio. Our dedicated efforts have culminated in significant optimizations, enabling us to achieve up to a 90% reduction in loading times for various queries through comprehensive refactoring.

<details>

<summary><strong>Key Performance Improvements:</strong></summary>

#### **Project Management Efficiency:** We've drastically improved the speed of:

* creating new project
* deleting the project
* version history
* training the project
* deploying the project
* choosing the phone number
* project information within your workspace,&#x20;

&#x20;      and thus making projects smoother and more efficient.

#### **Conversation Flow Enhancements:** Loading times for:

* models
* saving project version

&#x20;       in Conversation Flow have been notably reduced, streamlining your workflow.

#### **Improved Campaign Management:** The load time for the:

* campaign model page&#x20;

&#x20;       has been significantly decreased, along with enhanced.

**More enhancements on the horizon promise further speed optimizations.**

</details>

### Better uploading documents async way  <a href="#personalized-notepad" id="personalized-notepad"></a>

Uploading documents to your Knowledge Base Index is now asynchronous, allowing you to monitor the progress of each file in real-time.

<figure><img src="/files/kr6M8FUnyk2Vn18ZdqPG" alt=""><figcaption><p>Indexer asynch way uploading</p></figcaption></figure>

### Better uploading documents in bubble  <a href="#personalized-notepad" id="personalized-notepad"></a>

**Enhanced Visibility in Chatbot Bubble:** The document upload process within the chatbot bubble has been revamped for greater visibility. Stay tuned for additional updates.

<figure><img src="/files/EerKfTXInpTcT29Er2Ww" alt=""><figcaption><p>Better uploading in bubble</p></figcaption></figure>

### Application Status Bar Expansion

We've integrated the Indexer application into the app status bar. This addition allows you to view all active applications and their deployment versions, including the Indexer app.

<figure><img src="/files/2yZDav6EstZ7CTyiNPjT" alt=""><figcaption><p>Indexer app is in APP status</p></figcaption></figure>

### **Additional changes** <a href="#additional-improvements" id="additional-improvements"></a>

* **Indexer Performance and Logic:** The performance and underlying logic of the Indexer application have been enhanced for greater efficiency.
* **Frontend Improvements:** Minor technical updates have been made to the Flow Editor, enhancing usability.
* **Elevated Customer Experience:** The process of creating a new, blank project has been streamlined, focusing on user-friendliness.

We are committed to continuous improvement and innovation to serve your needs better and exceed your expectations. Future updates are on the way, and we thank you for your ongoing support.

***

## ​​Release - 08.03.2024

### Digital studio - overview

| Application                  | Version |
| ---------------------------- | ------- |
| Builder                      | v1.14.1 |
| Builder Server               | v1.15.0 |
| Chatbot Bubble               | v2.13.0 |
| NLP Engine & Intent resolver | v1.20.1 |
| Out Calls                    | v1.11.1 |
| Voice                        | v1.13.0 |
| Voice Connector              | v1.13.0 |
| Knowledge Base Indexer       | v0.1.75 |

​

***

### Variable overview  <a href="#personalized-notepad" id="personalized-notepad"></a>

We've introduced a user-friendly modal dialogue that displays your project variables at a glance. You can now easily identify where each variable is used across your project and swiftly navigate to change their configurations. Plus, we're showing default variables to streamline your future projects. When the blank is used in columns, these variables are defaulted when starting the project. Check out the new interface in action below:

<figure><img src="/files/ToOWXq3uOMVIaFtZ9PRj" alt=""><figcaption><p>See the Variables you are using in your project</p></figcaption></figure>

### Enhanced Admin Controls&#x20;

Admins now have more flexibility with project variable settings:

{% tabs %}
{% tab title="SECRET" %}
By default, it's set to NO. Switching it to YES ensures variables are kept out of logs and not displayed anywhere. They content can not be "copied" to another variable, enhancing your project's privacy.
{% endtab %}

{% tab title=" LOGGED" %}
Initially set to YES. If changed to NO, it helps protect sensitive data (like personal client information) by preventing it from appearing in logs.
{% endtab %}

{% tab title="API EDITABLE" %}
Set to NO by default. Turning this on allows selected variables to be edited externally via API, useful for dynamic updates like chat interactions.&#x20;

If at least 1 variable is defined in API editable section as YES, it is possible to update from chat interactions only variables marked as API EDITABLE YES
{% endtab %}
{% endtabs %}

### Simplified interactions using shortcuts

We're excited to announce new shortcuts to make your Digital Studio experience even smoother. These shortcuts are designed to enhance your workflow and help you navigate the studio with ease. Check out the new shortcuts in action below:

<figure><img src="/files/5ja4aACuOyM6O8pd9TrX" alt=""><figcaption></figcaption></figure>

Dive into this update and leverage the power of automated web scraping to bolster your knowledge base!

#### Learn, how to use shortcuts&#x20;

You can find a comprehensive overview of all the new shortcuts within the app. Just navigate to FILE -> Shortcuts modal to learn more and incorporate them into your projects.

{% tabs %}
{% tab title="Deployment" %}
Ideal for training, deployment, and various project management tasks.

<table><thead><tr><th width="256">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + S</td><td>Save</td></tr><tr><td>ALT + SHIFT + S</td><td>Save model version</td></tr><tr><td>ALT + SHIFT + I</td><td>Import</td></tr><tr><td>ALT + SHIFT + E</td><td>Export</td></tr><tr><td>ALT + SHIFT + T</td><td>Train version / untrain</td></tr><tr><td>ALT + SHIFT + F</td><td>Test in debug</td></tr><tr><td>ALT + SHIFT + D</td><td>Project Deploy</td></tr></tbody></table>
{% endtab %}

{% tab title="Edit" %}
Streamline your editing process with these handy shortcuts.

<table><thead><tr><th width="301">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>CTRL + C</td><td>Copy</td></tr><tr><td>CTRL + V</td><td>Paste</td></tr><tr><td>CTRL + X</td><td>Cut</td></tr><tr><td>CTRL + D</td><td>Duplicate</td></tr><tr><td>ALT + F</td><td>Find</td></tr><tr><td>Shift + Left mouse</td><td>Multiselect</td></tr></tbody></table>
{% endtab %}

{% tab title="Essentials" %}
Familiar essential shortcuts, now with ALT replacing CTRL for improved accessibility.

<table><thead><tr><th width="237">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + Y</td><td>Redo</td></tr><tr><td>ALT + Z</td><td>Undo</td></tr><tr><td>ESC</td><td>Escape the node</td></tr><tr><td>BACKSPACE</td><td>Delete node</td></tr><tr><td>END</td><td>Previous node</td></tr><tr><td>ALT + G</td><td>Group selection</td></tr><tr><td>ALT + SHIFT + G</td><td>Ungroup selection</td></tr></tbody></table>
{% endtab %}

{% tab title="Nodes" %}
Effortlessly create multiple nodes with a simple click on the canvas. Press ESC to revert to the normal cursor.

<table><thead><tr><th width="266">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>SHIFT + M</td><td>Message node</td></tr><tr><td>SHIFT + A</td><td>Answer node</td></tr><tr><td>SHIFT + D</td><td>Decision node</td></tr><tr><td>SHIFT + F</td><td>Function node</td></tr><tr><td>SHIFT + G</td><td>Generative AI node</td></tr><tr><td>SHIFT + R</td><td>Redirect</td></tr><tr><td>SHIFT + T</td><td>Transfer </td></tr><tr><td>SHIFT + E</td><td>End</td></tr></tbody></table>
{% endtab %}

{% tab title="Tools" %}
Navigate UI changes quickly with shortcuts for the move tool, hand tool, and comment tool.

<table><thead><tr><th width="175">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>ALT + V</td><td>Move tool</td></tr><tr><td>ALT + H</td><td>Hand tool</td></tr><tr><td>ALT + C</td><td>Insert comment</td></tr><tr><td>ALT + SHIFT + C</td><td>Show/hide comment panel</td></tr><tr><td>ALT + SHIFT + N</td><td>Open / hide notepad</td></tr></tbody></table>
{% endtab %}

{% tab title="Zoom" %}
Enhance your project view with quick zoom in/out shortcuts.

<table><thead><tr><th width="229">Shortcut</th><th width="186">Name of the action</th></tr></thead><tbody><tr><td>Mouse wheel</td><td>Zoom in / out</td></tr><tr><td>SHIFT + 1</td><td>Zoom to fit</td></tr><tr><td>SHIFT + 2</td><td>Lock interactivity</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Special Note for Mac Users:**&#x20;

Don't worry, we've got you covered! Mac users can enjoy these shortcuts by using the OPTION key in place of ALT, and the COMMAND key instead of CTRL.
{% endhint %}

### Web scraping for Knowledge Base Indexing

Enhance your knowledge base with our latest addition: a web scraping function. This new feature automatically populates your knowledge base index with data collected from the web. See how it seamlessly integrates and enriches your resources:

<figure><img src="/files/qYEFtlgZPNBkP7ijlGcg" alt=""><figcaption></figcaption></figure>

Dive into this update and leverage the power of automated web scraping to bolster your knowledge base!

### Enhanced Application Cursors

Experience enhanced efficiency with our new application cursors! Creating multiple nodes is now as easy as pie. Utilize the shortcut SHIFT + M to add numerous message nodes to your project instantly, or press ALT + C for quick comment creation.&#x20;

<figure><img src="/files/T8eSH9u45ZW7MVyCZM9S" alt=""><figcaption><p>Custom cursors and multiple nodes creation</p></figcaption></figure>

For single nodes, simply drag and drop from the node panel. Try these out and streamline your project development!

### Easy Navigation to Previous Node

Navigating to the previous node has never been easier. Now, with just a click, you can access the last connected node modal, allowing you to see the pathway and understand how nodes are interconnected within your project. Discover this intuitive feature:

<figure><img src="/files/I0BPDurFG3y5RMIK9HCP" alt=""><figcaption><p>Go to previous node hasn´t been easier</p></figcaption></figure>

Embrace the simplicity of moving through your project's nodes!

### Knowledge Base Enhancements

We've upgraded the knowledge base to now allow changes to document annotations. Tailor annotations to better suit your needs with ease. Check out the improved functionality:

<figure><img src="/files/fMvk2kyIuFfCWKt5ZJYs" alt=""><figcaption><p>Customize your description according your needs</p></figcaption></figure>

### **Additional Enhancements** <a href="#additional-improvements" id="additional-improvements"></a>

* Minor bug fixes and technical improvements have been implemented to ensure a smoother user experience.
* Application speed has been optimized, resulting in faster performance and reduced loading times.

We're committed to continuously improving our application to meet your needs and exceed your expectations. Stay tuned for future updates, and thank you for your continued support.

***

## Release - 13.02.2024

| Application                  | Version |
| ---------------------------- | ------- |
| Builder                      | v1.13.0 |
| Builder Server               | v1.14.0 |
| Chatbot Bubble               | v2.12.0 |
| NLP Engine & Intent resolver | v1.19.1 |
| Out Calls                    | v1.11.0 |
| Voice                        | v1.12.1 |
| Voice Connector              | v1.12.0 |
| Knowledge Base Indexer       | v0.1.68 |

​

### **Enhanced Commenting Capabilities**  <a href="#personalized-notepad" id="personalized-notepad"></a>

To foster better cooperation among users, we've introduced an advanced commenting feature. Now, you have the flexibility to add two types of comments:&#x20;

* general comments that aren't tied to any specific node
* node-specific comments for more targeted feedback.&#x20;

This enhancement is aimed at smoothing collaboration among editors and users, unlocking new possibilities for project development.

<figure><img src="/files/Gl92AYuGSj4v6F2cNlI3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Stay tuned for our next release, where we will introduce shortcut keys to further enhance your experience with the builder. These shortcuts are designed to make navigation and operation within the application more intuitive and efficient.
{% endhint %}

### Simplified cURL Integration for Efficient API Interactions

We're excited to introduce a streamlined cURL pasting capability, designed to facilitate easy interaction with APIs through GET and POST requests. This feature enables the direct inclusion of cURL commands into smart function variables, automating the data fetching and submission processes.

<figure><img src="/files/KslMl6b8sKS7LJ4hZ33h" alt=""><figcaption></figcaption></figure>

### **Cursors Upgraded for Precision and Ease**

Following valuable user feedback, we've rolled out new cursor options to improve interaction with the application:

* The **Default Cursor** activates modal views of nodes upon selection.
* The **Hand (Move) Tool** allows for seamless movement without interacting with node modals.
* The **Comment Insertion Cursor** enables you to effortlessly add comments exactly where you need them.

<figure><img src="/files/EyOeSl24Fav8fcmUOZKI" alt=""><figcaption></figcaption></figure>

### **Fixed edge links names** <a href="#open-ai-multilanguage-support" id="open-ai-multilanguage-support"></a>

The edge link name will always follow your connections between nodes now. This streamlines a more cleaner and user-friendly connections. This used to be an issue in past, now it´ s solved.

<figure><img src="/files/0WRYoo6Vx2LpjezPYMj9" alt=""><figcaption></figcaption></figure>

### **Adding the File to Top navigation** <a href="#open-ai-multilanguage-support" id="open-ai-multilanguage-support"></a>

We've reimagined the top navigation to streamline user flow and enhance accessibility. Highlights include a new import feature for \*.zip files, expanding the file dropdown panel with exciting new functionalities.

<figure><img src="/files/lI6vxeYkYZY4dM5bKAkU" alt=""><figcaption></figcaption></figure>

### **Training Set Editing in Answer Node**

Editing training sets is now more intuitive than ever. With the "Open Training Set" feature, you gain a clearer overview of the utterances used in training sets, allowing for more precise adjustments.

<figure><img src="/files/sMsob3DgBXknFHiMR5rf" alt=""><figcaption></figcaption></figure>

### **Additional Enhancements** <a href="#additional-improvements" id="additional-improvements"></a>

* Minor bug fixes and technical improvements have been implemented to ensure a smoother user experience.
* Application speed has been optimized, resulting in faster performance and reduced loading times.

We're committed to continuously improving our application to meet your needs and exceed your expectations. Stay tuned for future updates, and thank you for your continued support.

***

## Release - 30.01.2024

### Digital Agent overview

<table data-header-hidden><thead><tr><th width="425"></th><th></th></tr></thead><tbody><tr><td>Application</td><td>Version</td></tr><tr><td>Builder</td><td>v1.12.56</td></tr><tr><td>Builder Server</td><td>v1.13.14</td></tr><tr><td>Chatbot Bubble</td><td>v2.11.14</td></tr><tr><td>NLP Engine &#x26; Intent resolver</td><td>v1.18.10</td></tr><tr><td>Out Calls</td><td>v1.10.5</td></tr><tr><td>Voice</td><td>v1.11.6</td></tr><tr><td>Voice Connector</td><td>v1.11.3</td></tr><tr><td>Knowledge Base Indexer</td><td>v0.1.65</td></tr></tbody></table>

### **Personalized Notepad**:  <a href="#personalized-notepad" id="personalized-notepad"></a>

Introducing a notepad feature for project specific notes, enhancing your project creation experience. Take notes during meeting with client, or just write down what still needs to be done for that project.

<figure><img src="/files/jeO1jCubmVVfhf0gaMQy" alt=""><figcaption></figcaption></figure>

### **Undo/Redo Functionality**:  <a href="#undo-redo-functionality" id="undo-redo-functionality"></a>

Newly added undo and redo buttons allow you to easily revert or repeat changes. You can undo up to 10 last actions.

<figure><img src="/files/sMCJacAJxJwWKKmajohj" alt=""><figcaption></figcaption></figure>

### **Document Upload via Bubble**: <a href="#document-upload-via-bubble" id="document-upload-via-bubble"></a>

Uploading documents is now supported using choosing "Allow file upload" advanced feature for ANS node. Default is OFF, it needs to be used for each ANS node, where you want to allow the upload. Document is stored as Base 64 string in the uploaded\_document variable.

<figure><img src="/files/lI6vxeYkYZY4dM5bKAkU" alt=""><figcaption></figcaption></figure>

### **OPEN AI Multilanguage Support**:  <a href="#open-ai-multilanguage-support" id="open-ai-multilanguage-support"></a>

We now support OPEN AI's multi-language voices, where you can choose from 6 available voices. Important - STT is not multilingual yet.

<figure><img src="/files/VcK2UtPyP9Q1CCpX09M7" alt=""><figcaption></figcaption></figure>

### **Enhanced Flow Navigation & Create new in new modal**:  <a href="#enhanced-flow-navigation-and-create-new-in-new-modal" id="enhanced-flow-navigation-and-create-new-in-new-modal"></a>

Easily navigate your flow with the 'go to next' feature and directly access Target nodes from an open node to track conversation flow. Additionally, create new nodes within an existing node for enhanced organization.

<figure><img src="/files/stCieTraPigeknptKACu" alt=""><figcaption></figcaption></figure>

### **See the training set in each modal in table form:**  <a href="#see-the-training-set-in-each-modal-in-table-form" id="see-the-training-set-in-each-modal-in-table-form"></a>

Discover where your training set is utilized instantly in the training set overview\.Explore this feature now!

<figure><img src="/files/syex5hbQ07Ffl88xwpKq" alt=""><figcaption></figcaption></figure>

### **Improved Search Functionality**:  <a href="#improved-search-functionality" id="improved-search-functionality"></a>

Our enhanced search now displays both 'text' and 'speech' inputs and variables, offering a more comprehensive search experience

<figure><img src="/files/cxqFCS2GVhPOUgWKcKER" alt=""><figcaption></figcaption></figure>

### **Additional Improvements:** <a href="#additional-improvements" id="additional-improvements"></a>

* **Zoom Function Enhancement**: Resolved issues with the zoom function, ensuring a smoother user experience.
* Small bug fixes

#### **Born Digital product team!** :love\_letter:

[^1]:


# Insights changelog

What´s new in Digital Agent? Read a quick change log overview

## Release 24.11.2025

| Application  | Version |
| ------------ | ------- |
| Orchestrator | 1.11.77 |
|              |         |
|              |         |

### Analyzing images inside an email

From this release, the attachments analysis supports also images inside the email body, not just the files attached to an email.

To turn this feature on, no further adjustment is needed - it's an enhancement to the existing emails attachments processing, which can be turn on with a toggle in Data sources section.

<figure><img src="/files/ixqwr65OuaITmSL5i8TL" alt=""><figcaption></figcaption></figure>


# Starting up

Discover essential steps from sign-up to profile customization and organization settings. Learn to navigate sign-in, password recovery, and tailor your experience effortlessly.

<table data-view="cards" data-full-width="false"><thead><tr><th data-type="content-ref"></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/0k64BItgsKYqcfrGCBbd#signing-up">/pages/0k64BItgsKYqcfrGCBbd#signing-up</a></td><td></td><td>Begin your journey by easily creating your account with our intuitive sign-up process</td></tr><tr><td><a href="/pages/0k64BItgsKYqcfrGCBbd#login-process">/pages/0k64BItgsKYqcfrGCBbd#login-process</a></td><td></td><td>Access your account securely and effortlessly by following simple login procedures</td></tr><tr><td><a href="/pages/06CBUy6RXRVr7MymBFAJ">/pages/06CBUy6RXRVr7MymBFAJ</a></td><td></td><td>Customize and personalize your experience with easy-to-access settings tailored to your preferences</td></tr></tbody></table>

***

## Signing-up

When initiating your journey with Digital Studio, you'll receive an email from our dedicated customer support team. This email will guide you through the process of setting up your password.

<figure><img src="/files/HXpsoQeI4CqqaHbsL1p3" alt=""><figcaption><p>Sign-up via support e-mail</p></figcaption></figure>

<details>

<summary><strong>Step-by-Step Guide:</strong></summary>

1. **Requesting Your Workspace:**  Contact <support@borndigital.ai> or get in touch with your dedicated sales manager to request your new workspace.
2. **Receiving the Confirmation Email:**  Look out for an email from <support@borndigital.ai> in your registered email inbox.
3. **Setting Up Your Password:**  Click on the provided link within the body of the email to set up your password for accessing the application. Don't worry; you can modify it at any time.
4. **Choosing a Secure Password:**  Create a password for your account. We strongly recommend using a password management application to ensure its security.
5. **Successful Password Setup:**  Once you've successfully set your password, proceed to the login page to access your account.

</details>

{% hint style="warning" %}
*Administrators have the authority to create users. However, regular users cannot create administrators. For more information, refer to the organization page.*
{% endhint %}

***

## Login process

After successfully and carefully choosing your new password, it´s time to login into Digital studio for a first time. It´s simple, just type your e-mail and password.

Follow these steps in the short GIF below:

<figure><img src="/files/cvETyAwNdRBZxKoo7gmV" alt=""><figcaption><p>Login to Digital Studio</p></figcaption></figure>

<details>

<summary>Login step by step:</summary>

1. L**ogin Procedure:**
   * Use the simple login screen to access Digital Studio.
   * Enter your email and the newly created password.
2. **Accessing Digital Agent:**
   * After entering your credentials, you'll be directed to Digital Agent, your project workspace.

</details>

### Forgot Password

Should you forget your password, we've streamlined the recovery process to ensure ease of access.

*Note: The legacy name of the Digital Studio app was Voicebot Builder.*

<figure><img src="/files/aiPx5tv9dXUAqEgY83Cg" alt=""><figcaption><p>Forgot password - short summary</p></figcaption></figure>

<details>

<summary>Forgot password - fixing step by step</summary>

1. Click "Forgot Password" on the login screen.
2. Enter your connected email.
3. Click the "Request Recovery Password" button to initiate the recovery process.
4. Check your email inbox for a message from <support@borndigital.ai> and click the sent link.
5. Create a new password for your account.
6. Return to the login screen and input your new credentials.

</details>

### **Helpful Tips**

* **Email Location:** Recovery links might be found in your automatic or spam folder.
* **Troubleshooting:** For any issues, contact us at <support@borndigital.ai>.
* **Password Safety:** Remember to save or securely store your new password.
* **Password Management:** Use a password management application or plugin (e.g., Sticky Password) to safeguard your private passwords

{% hint style="success" %}
**Password Strength:** Create a strong password by mixing alphanumeric characters, including uppercase, lowercase, and special symbols, to enhance security.
{% endhint %}

{% hint style="danger" %}
**Warning:** Avoid using simple numerical passwords or incorporating personal information like your name, email, address, or dates to ensure maximum security.
{% endhint %}


# My settings

Welcome to the "My Settings" section! Here, we'll provide you with a concise overview of your personal and organization settings.

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th data-type="content-ref"></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/06CBUy6RXRVr7MymBFAJ#my-account">/pages/06CBUy6RXRVr7MymBFAJ#my-account</a></td><td>Customize your experience, update your profile information, and set preferences that suit your needs.</td><td><ul><li><strong>Profile Customization:</strong> Tailor your profile to reflect your identity and preferences within the app.</li><li><strong>Personal Preferences:</strong> Adjust settings to match your workflow and optimize your user experience.</li><li><strong>Account Information:</strong> Update and maintain your account details effortlessly.</li></ul></td><td></td><td><a href="/pages/06CBUy6RXRVr7MymBFAJ#my-account">/pages/06CBUy6RXRVr7MymBFAJ#my-account</a></td></tr><tr><td><a href="/pages/06CBUy6RXRVr7MymBFAJ#organization">/pages/06CBUy6RXRVr7MymBFAJ#organization</a></td><td>Explore the organizational settings that impact the broader framework within which you operate.</td><td><ul><li><strong>Workspace Management:</strong> Configure and organize your workspace settings to enhance collaboration</li><li><strong>Access Permissions:</strong> Administer access levels, roles, and permissions within your organization.</li><li><strong>Team Collaboration:</strong> Facilitate seamless teamwork and communication among team members working on voicebot projects.</li></ul></td><td></td><td><a href="/pages/06CBUy6RXRVr7MymBFAJ#organization">/pages/06CBUy6RXRVr7MymBFAJ#organization</a></td></tr></tbody></table>

***

## My account

Within the settings section, you'll find "My Account," where you can manage and personalize your profile information and preferences.

Here, you can view essential details about your profile and assigned roles:

* **Profile Overview:** Review your personal information and roles associated with your account.
* **Language Preferences:** Select your preferred language from the available options. Currently, we offer ENG, CZ, SK, and HU, with plans for additional supported translations in the future.

<figure><img src="/files/I5WAsE18ScKPtGW7eKhk" alt=""><figcaption><p>Your account settings</p></figcaption></figure>

<details>

<summary>What Can You Change in Your Account?</summary>

Empowering you to tailor your experience, here are the elements you can modify:

* **Name and Surname:** Update your displayed name information.
* **Language Selection:** Easily switch between available language options.
* **Password Management:** Change your password at any time for enhanced security.
* **Customize Preferences:** Tailor your settings based on your preferences.
  * **Show/Hide Chat Bubble:** Toggle to display or hide the chat bubble within the Flow editor.
  * **Show/Hide Typing Indicator:** Choose whether to view the typing input within your chat bubble in the Flow editor.

</details>

***

## Organization

Within the platform, organizations are composed of users with on of these roles:

* **Service provider admin** (also superadmin)**:**&#x20;
  * **Role Overview:**&#x20;
    * This is the system administrator with full permissions and visibility in the platform
  * **Permissions:**
    * Can create organisations and assign users to them (Admin or User roles) without limit
    * Can manage phone numbers and SIP trunks connected to the environment.
    * Has access to all projects and can assign users to any project within any organization.
    * Can create, train, and deploy projects.
    * Has access to both Conversation and Technical Dashboard reporting tabs.
* **Admin:**&#x20;
  * **Role Overview:**&#x20;
    * Manages the organization and has administrative permissions for the organization they belong to.
    * Permissions:
  * **Permisions:**
    * Can create Admin or User accounts within their organization.
    * Has access to all projects created within the organization.
    * Can assign users to any project within their organization.
    * Can create, train, and deploy projects.
    * Has access to both Conversation and Technical Dashboard reporting tabs.
* **User:**&#x20;
  * **Role Overview**:&#x20;
    * Regular user with limited permissions, focused on projects they own or are assigned to.
  * **Permissions:**
    * See only the project, they are assigned on
    * Can create, train, and deploy projects they are assigned on.
    * Can assign users to the projects they own or are an editor of.
    * Has access to Conversation and Technical Dashboard reporting for projects they are involved with.
* **Enduser:**&#x20;
  * **Role Overview**:&#x20;
    * This role has limited access, focusing only on the operation part of the projects they are assigned to, primarily as a viewer. In general is able to see Statistics and update data, which are used by Bots in real operation
  * **Permissions:**
    * See only the projects, they are assigned on and can be assigned only as Viewers
    * Has access only to the Knowledge Base tab (with ability also to update indexes) within the design part of assigned projects, can not see Conversation Flow and Training set.
    * Can view Statistics, Campaigns, and Recordings related to the projects they are assigned to.
    * In Assets section, has access and visibility only on Input data and media upload

{% hint style="info" %}
*For privacy issues, we blur unwanted personal information in our videos.*
{% endhint %}

<figure><img src="/files/SHl1g0hE2EgbQpDAglEm" alt=""><figcaption><p>Organization settings - basic overview</p></figcaption></figure>

**Managing Organization:**

* **Creating New Organization:** Establish a new organization for your projects.
* **Adding Users:** Invite new users to your organization to collaborate efficiently.
* **User Creation Tutorial:** Easily add new users to your organization via organization settings.

***

### Create a user

Tutorial for adding the new user to your organization step-by-step. Simply go to organization setting.

{% hint style="warning" %}
Make sure you have enough rights within your organization . Users for example can´t create admins, or higher user roles.&#x20;
{% endhint %}

<figure><img src="/files/0rvIobsmJaftElnklqau" alt=""><figcaption><p>Add a new user to your organization</p></figcaption></figure>

<details>

<summary><strong>Creating a New User step-by-step</strong></summary>

1. **Click "+ New User":** Access the organization settings and select the option to add a new user.
2. **Enter Colleague's Details:**
   * **Name:** Enter the colleague's name. This name can be modified later in their personal settings.
   * **Email Address:** Input the teammate's email address where the invitation and instructions will be sent.
3. **Assign Organization and User Roles:**
   * Ensure the correct organization is selected for the new user.
   * Choose the appropriate user role for the colleague within the organization (Superadmin, Admin, or User). It's crucial to assign the right level of access and permissions.
4. **Customize Access Settings (Optional):**
   * Access to Kibana Technical Logs: Toggle this option to allow or disallow access to technical logs. This is recommended for more advanced users and admins but can be unchecked if unnecessary.
5. **Generate Invitation Email:**
   * Once the details are filled, generate an invitation email. This email will include a "create password" link, allowing the new user to set up their account.

</details>

{% hint style="warning" %}
*Users do not have the capability to create higher roles such as Admins within the organization.*
{% endhint %}

Now, it's time to [start working with Digital Agent](broken://pages/7ymHaIktBDcWlPeb2J89)

### **Deleting Users (Admins Only)**

* Admins can delete users from the organization's user tables. Find the user's name, click "More," then "Delete." Confirm the action in the popup.
* If you encounter any issues or need assistance, feel free to contact us. Let's solve it together!


# Contacts for you

Having an issue, question or some idea for a cool feature? Contact as at info\@borndigital.ai


