Skip to Content
Technical Articles
Author's profile photo Shubhkarman Singh

SAP Conversational AI Overview & Build your first BOT

Hi Guys,

Welcome to my first blog post. In this series of blog posts, I’ll walk you through the SAP Conversation AI, which is one of the trending products from SAP.

The series will include:

Let’s start with the basics first:

A chatbot is a computer software program designed to simulate human conversation via text or audio messages.

Conversational AI refers to the use of messaging apps, speech-based assistants, and chatbots to automate communication and create personalized customer experiences at scale.

 

Terminology/Nomenclature used in SAP CAI

  1. Intent – An intent is a group of expressions that mean the same thing but are constructed in different ways using a different set of words. Intents are the core of your bot and are responsible for bots understanding. For example, if I want my bot to understand when someone asks for help. Just create an intent called ‘help’ and fill it with every expression a user would say when asking for help.
    • •	Could you help me?
      •	I’m lost, give me a hand please.
      •	Can you help?
      •	What can you do for me?
      
  2. ExpressionsAn expression is a sentence that your bot can understand –- it’s basically something that a user might say to your bot. Expressions are organized into intents and constitute the complete knowledge of your bot. The more expressions you have, the more precisely your bot can understand its users. Example If the intent is order-food, some useful expressions could be:
    •	I’d like to order a pizza.
    •	Can you get some pasta for me?
    •	How about a salad?
    •	A veggie burger and fries would do nicely!
    

  3. Entity –  An entity is a keyword that is extracted from an expression. The bot can automatically detect 28 different entities, such as Datetime, Location, Person, and so on. SAP CAI calls them gold entities. However, you’re not limited to these gold entities. You can also tag your own custom entities to detect keywords depending on your bot’s context, such as city name, if you’re building a bot that can tell the weather.
  4. Skill – A skill is a block of conversation that has a clear purpose and that your bot can execute to achieve a goal. It can be as simple as the ability to greet someone, but it can also be more complex, like giving movie suggestions based on information provided by the user.

There are a few more terms which I’ll explain while we build our first bot.

So now let’s get started with building our first SAP Conversational AI BOT

Use Case – Beginning with simple use cases, this bot will respond to some simple user requests, and the answers will be built-in into the bot, aka Scripted Bots. Later in subsequent blog posts, I’ll show you how to integrate the bot with SAP S4HANA system and make actual business transactions.

 

Step 1. Head over to SAP Conversational AI and create your account on CAI.

Step 2. After logging into your newly created account, click on +NEWBOT

 After you’ve created your bot, you’ll be welcomed by a screen similar to below. Based on the settings you choose while creating bot a few elements like Intents can vary, but we do not need to worry about that now.

Step 3. Create a new intent ‘jokes’.

Step 4. Add Expressions for your newly created intent

Now we have our intent ready, we need to add expressions to it. An expression is a sentence that your bot can understand.

Similarly, add few expressions which mean the same thing. Like

  • Can you tell me a joke?
  • I want a joke
  • How about a joke

Step 5. Create custom entities for – For each expression, consider ‘joke’ as keyword and add it as an entity in each expression.

 

Step 6.  Create a skill

Each Skill represents one thing that your bot knows how to do, and they can interact with each other.

Step 7. Add triggers to the Skill.

Triggers are conditions that determine whether the bot should execute the current Skill or not. If the trigger conditions of the Skill are validated, the bot will run it over other skills.

Step 7. Add requirements (optional step)

Requirements: Describes what information this Skill has to collect, and what questions need to be asked to fulfill the requirements.

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.

Step 8. Add actions for your Skill

An action is something that your bot executes at a specific point when executing a skill. To add actions to a skill, open the Skill on the Build tab, and then open the Actions subtab and click ADD NEW MESSAGE GROUP.

An action can be one of the following:

  • Send a message to the user
  • Call webhook
  • Fallback (that is, redirect the conversation to a human agent)
  • Go to another skill
  • Edit the bot’s memory for the current conversation
  • Change language

 

Similarly, add few more jokes as messages, and the bot will randomly pick jokes from this message group.

Step 9. Now its time to test your BOT.

Click on CHAT WITH YOUR BOT button on the bottom right side of the screen and test your bot with various expressions.

Step 10.  Additionally, you can also debug and check the complete control flow of the execution of bot.


 

NoteIn case you get any error like below :

Make sure you disable the already existing joke intent if it exists.


Parts of this blog post has been taken from below source:

SAP CAI Docs


Upcoming topics in this series of the blog:

I’ll keep updating this blog post for further updates and links to new blogs in this series.

Stay tuned for more upcoming fantastic stuff.

 

I hope you all have enjoyed this blog post, and I’ve been able to make myself clear. Please let me know your thoughts, doubts in the comment section below, and if you enjoyed, please like and share.

Wishing excellent health and safety to all of you and your friends & families.

 

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Pavan Golesar
      Pavan Golesar

      Hi,

      Thanks I tried these and worked fine. However I did not follow each step as mine options were different as you see below.

       

      Author's profile photo Shubhkarman Singh
      Shubhkarman Singh
      Blog Post Author

      Hi Pavan,

      I believe while creating the bot you’ve opted to create a FAQ Bot that will retrieve answers from the FAQ documents.

      To follow the above steps in the blog post, make sure you create a bot that can perform actions.

      check the screenshot below for reference

      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski

      Really nice blog ... I like how you spend time explaining the concepts.

      just want to mention that there are a series of tutorials (and more complicated ones coming) at https://developers.sap.com/tutorial-navigator.html?tag=products:technology-platform/sap-leonardo/sap-conversational-ai

       

      ?

      Author's profile photo Shubhkarman Singh
      Shubhkarman Singh
      Blog Post Author

      Hi Daniel,

      I'm glad you liked the post and thanks for sharing the tutorial series.

      Author's profile photo Rajiv Das
      Rajiv Das

      Nice Blog @Shubhkarman Singh

      Author's profile photo Debnistha Bhattasali
      Debnistha Bhattasali

      Hi, its a well written blog but please could you guide me with my issue. I was making a tracking order chatbot and every time I give the parcel-number it recognizes it as number in entity in the test section. I have trained both my intent and entity with sufficient values.