How to Create New Activity

Each unit of dialog performed by the digital persona is a specific activity. Activities are afterward grouped together within skillsets.

Example:

  • Greeting is one activity

  • Asking the user about a problem is a different activity

  • Providing a solution for the user’s problem is yet another activity

Digital personas encompass both social and business skills, each serving distinct purposes and involving different types of activities.

When creating activities, it is recommended to focus on one type of activity at a time. Complete the development of activities for one type of skillset before proceeding to the next to ensure clarity and effectiveness.

  1. Navigate to the asset “Activity”

  2. Click on “Create”

  3. Fill in fields as described in the Activity Properties Table

Activity Properties

Property Description

Activity Asset Name

Create a concise name for the activity.

Example: Finding solution for user’s problem

Tags

Select from the predefined tags to determine if this activity is a part of the social skillset, or business skillset.

Note: Tagging is not required, but strongly recommended for future quick findability.

Description

Provide a short description of what this activity does.

Note: The description is used by the language model only to choose which of the activities available to the persona suits best the actual context of the dialog.

Example: This activity finds the best solution when user asks digital persona to help him solving a problem.

Main Prompt

Describe what exactly should happen while the digital persona performs this activity.

Tip: As this section is the core of the activity, make the Main Prompt as detailed and precise as possible. Think of what can happen in this activity and provide the language model with examples.

Example of the weak main prompt:

[.exampleblock] ---- Help the client resolve their problems with telecommunication services. If necessary, inquire to what exactly is the problem. Answer the client’s questions connected to troubleshooting, should they ask some. To get relevant suggestions ALWAYS call the getTroubleshootingInfo function. Gradually (one suggestion per turn) in the order in which the solutions are written, present the client with one of the possible ways to solve the problem at hand, until you exhaust all solutions or until the client says that the problem is resolved. Choose only suggestions that the client has not tried yet. If during the troubleshooting you encounter a service that is not active for the user, inform them about it. If there are no more suggestions, inform the client that the only thing left to do is to connect them with a human operator and suggest doing so.

${if(context.turn.latencyMaskingText != null) "You must not repeat the same phrase as the one that you’ve just pronounced. <LAST_PRONOUNCED_PHRASE>" + context.turn.latencyMaskingText!! + "</LAST_PRONOUNCED_PHRASE>" else "" } ----

Example of the strong main prompt:

[.exampleblock] ---- Help the client resolve their problems with telecommunication services. If necessary, inquire to what exactly is the problem. Answer the client’s questions connected to troubleshooting, should they ask some.

To get relevant suggestions, ALWAYS call the getTroubleshootingInfo function.

FIRST: Begin by clearly informing the user about the state of their services. - If all necessary services are active, confirm this and then immediately transition into the first troubleshooting step in a natural way. - If any required service is inactive, inform the user about it before presenting relevant troubleshooting steps.

THEN: Proceed with troubleshooting: - Gradually (one suggestion per turn), in the order in which the solutions are written, present the client with one possible way to solve the problem. - Only suggest solutions that the client has not tried yet.

IMPORTANT: You must go through all the relevant suggestions in the correct order before stating that the problem is complex and might need resolution by a human operator. If no solutions work, ask the client if they want to be transferred to a human operator.

${if(context.turn.latencyMaskingText != null) "You must not repeat the same phrase as the one that you’ve just pronounced. <LAST_PRONOUNCED_PHRASE>" + context.turn.latencyMaskingText!! + "</LAST_PRONOUNCED_PHRASE>" else "" } ----

What is the difference: The improved version of the prompt is formatted using white space (line-breaks) and the Markdown syntax. Not only does this make it more humanly readable for the designer for editing, but it also improves the performance of the LLM that creates the speech.

End Prompt

Define the conditions when the language model shouldn’t choose this activity anymore. In other words, End Prompt defines the goal of this activity – once the goal is achieved, the language model will not choose the activity anymore.

Example of the weak end prompt: The client has been provided with the suggestions about the solutions for the problem they described.

Example of the strong end prompt: The client’s problem has been resolved or all the suggestions have been depleted.

What is the difference: The stronger version also considers the user expressing that their problem has been resolved, which is a valid reason to conclude the activity.

Should End Conversation

Choose whether this activity should end the conversation between the digital persona and the user.

Note: Farewell activities will usually have “Yes” in this field; other activities typically have “No”.

Once you have defined all the necessary features of the activity, click on the Save button in the bottom-right corner of the window and then on the Publish button in the project pane.

Without publishing, no changes or new assets will occur, even if they have been saved.