[SAP CAI] – FIRST LOOK AND FEEL ABOUT SAP CONVERSATIONAL AI

Hi guys, in this article I want to share my understand about SAP CAI and do one simple example about it.

This article look like a first consider about BOT which developed by SAP, advance and disadvantage of its. We also consider we can apply this BOT into business process of customers or not.

WHAT’S SAP CONVERSATIONAL AI ?

SAP Conversational AI offers a single intuitive interface to train, build, test, connect and monitor chatbots embedded into SAP and third-party solutions, a high-performing natural language processing (NLP) technology and low-code features to ensure faster development. Simplify access to information and deliver personalized human-like conversations. Scale businesses by reducing development efforts and costs within support teams. Enhance user satisfaction by automating tedious tasks.

For more details, kindly reference SAP Help.

EXAMPLE DEMO

CREATE SAP CONVERSATION AI ACCOUNT

Because of this is one of technical on SAP so we can login by using SID, PID or UID to login. If we do not have account SAP, we can create new account direct on SAP Conversational AI

CREATE NEW BOT PROJECT

After created account on SAP Conversational AI, we can Sign In. On index page, we can create new bot project by using template

NOTE

With a standard Perform Actions bot, the developer is responsible for creating entities and intents with expressions. The developer is also responsible for building and managing the conversational flow that pulls information from back-end systems to help simplify processes for the chatbot end user.

An FAQ bot retrieves answers to users’ questions from one or more documents (.csv files) that you upload. The document must include predefined pairs of questions and answers. This allows your bot to map the user’s query to the best match and retrieve an answer without interpreting the intent of the question.

To ease the complexity of the FAQ bot, the intents and entities are predefined and hidden, and the bot includes a set of predefined skills. However, you can design the bot responses as per your business needs.

ABOUT NEW BOT BABY

OK, new baby (BOT) was born. As a child, he needs some information which we will input. With a new BOT we will have 4 stages

  • TRAIN – Teach your bot what it needs to understand

  • BUILD – Create your conversational flow with our Bot Builder tool. Here you give your bot skills it can perform

Here you will create skills – things your bot can do – and define when they will be triggered. Your skills are defined by triggersrequirements (information your bot must collect), and the actions.

  • CONNECT – Ship your bot to one or several messaging platforms

  • MONITOR – See how users are communicating with your bot, check if the bot is understanding users correctly, and make updates to the bots intents/entities. Monitoring also lets you see what your users want, and gives you ideas of what additional capabilities you could add to the bot.
CREATE NEW INTENT

This step, we will create new intent for BOT with collection of message which BOT will receive. Look like train for BOT some sentences.

Add Expression for BOT, this step we train for BOT understand languages of user

Next we have to train new intent for BOT

Train bot success

Next, we will check BOT understand what we request or not by using expressing analysis

WORKING WITH SKILL

OK, now that BOT knows How to understand people who talk to it. Next, We will give BOT some skill by using BUILD functionality

Overview about Skill

One skill will have 4 tab :

  • README – Explain skill
  • TRIGGER – Define trigger that determine whatever skill will be executed
  • REQUIREMENT- Define information needs for this skill
  • ACTION – Define action can be carried out by this skill.

Create new skill

Add TRIGGER for new skill

Add ACTION for new skill

Add Condition. We can add many condition in the same time

Choose Message Type

Input text for BOT

Test BOT

CONCEPTS

INTENT

This is the brain of your bot, where all its understanding is stored in the form of intents.

An intent is a collection of sentences that all have the same meaning, even though they can be worded very differently. When a user sends some text to your bot, our algorithm compares it to the phrases in your intents. Then it checks whether the text is close enough to one of them and decides what the intention of the message is.

Example:

  • Are you a bot?
  • Hi, Are You there ?
  • Good morning, how are you ?
FORK INTENTS

As SAP Conversational AI is collaborative, you don’t have to recreate each intent every time you want to use it. You can fork an intent that someone has already created to clone it right into your bot.

EXPRESSION

Click an intent and add sentences you want your bot to understand.

WHAT IS A SKILL ?

Each skill represents one thing that your bot knows how to do. Skills can interact with each other and can be either complicated (such as managing payment by credit) or simple (such as answering basic questions).

Three different types of skills: business, floating, and fallback

  • Business and floating have no structural differences. However, differentiating these two types helps when you have a lot of skills.
  • Fallback skills trigger when no other skill is triggered by the user’s input. Most of the time, you’ll have only one skill of this kind, where you can remind the user what your bot can do and ask them to rephrase.
TRIGGER

We want to activate our skill when an expression contained in the @GREETINGS intent is present.

REQUIREMENT

Requirements are either intents or entities that your skill needs to retrieve before executing actions. Requirements are pieces of information that are important in the conversation, and that your bot can use, for example, the user’s name or a location.

Requirements can be mandatory or optional. Mandatory information is defined under Primary requirements.

In above example, we want to extract data of entity parcel-number into variable memory with name is parcel-number.

DEMO TRACKING PACKAGE

REQUIREMENT
  • Customer want to track any package with package number.
  • Customer input package number to BOT
  • BOT reply confirm (Yes/No) to Customer.
  • Customer will confirm with BOT by input YES
  • BOT will call API and return information of Package
SET UP WEB HOOK API FOR TRACKING PAKAGES

For demo, I will get Web hook example on internet with information below

Endpoint web hookhttps://sapupschatbot.cfapps.eu10.hana.ondemand.com
MethodPOST
Resource/check_number
/track_parcel
/save_size
/get_location_thumbnail
/images/
/errors

CONFIGURATION

CREATE NEW BOT

CREATE NEW INTENT

This step, we have to create new intent with many many sentences for out BOT can be inderstand what we say.

For demo We will FORK intent from internet here

FORK intent @yes and @no

Because of in BOT, we need display confirm box YES/NO so we have to create or FORK intent @yes and @no

For intent yes at here

For intent no at here

ADD SKILL FOR BOT (BUILD)

  • Set trigger for BOT with only intent @track-parcel

Indicate data Bot need to extract before execute skill, in this step we need add requirement for track number from conversation. This is entity which declared in intent @track-parcel, extract it from conversation and save it into memory

Extraction data from conversation will be success (Complete) or missing because of user can input sentenses which no contain track-number in it. In this case we will reply answer from BOT

Select missing choose message type

Choose update conversation and clear @yes and @no

In case user input right track-number, We will save this track number into memory

{
"raw": "{{uppercase memory.parcel-number.raw}}",
"value": "{{uppercase memory.parcel-number.raw}}"
}

If extract complete, BOT will displat dialog box confirmation

In this case, user will click one button ( YES/NO), after that BOT will receiver conversation through intent @YES or @NO and will run action accordingly

If user click NO button, BOT will reply message and the end.

If user click YES button, BOT will call API. Next we will configure for BOT can call API by using WEBHOOK.

CONFIGURATION WEB HOOK FOR BOT CALL EXTERNAL API
TEST BOT

Input any sentences in intent of BOT.

Input number example 1Z12345E6205277936

Click button NO

In this case, BOT will trigger action @NO and return message

In case, select button YES, BOT will call API web hook and return information of packet

SUMMARY

In this article I shared overview and simple example about SAP Conversational AI. This is just oveview for us can know What’s SAP Conversation AI. We can explore more detail about this to use with SAP Process Automation to create one business process full automatically. Thanks for your reading and any advise kindly leave your comment on this.

Thanks.

Joseph.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.