Entity kise kehte h? Ham chatbot use karte he usme ham Intent fire karte he Ex. Job Application form ke liye ham enter karte he “I want to apply for a job” Usme hame first field name ki puchta he So ham is intent kehte h “I want to apply for a job” Agar koi user aake kahe “my name is john and I want to apply for a job” To smart bot use name field bharne ko nahi kahega or next question par Chala jaega isme “my name is john” Ek entity hue.
Simple explanation of System Entity System Entity – Aap ne skills me entity dekhi hogi . System jo entity already provide karta he use ham system entity kehte he jo entity ham bina create kare use kar sakte he usme ham ex.sys- currency,sys - number,sys - time,sys -date etc. Agar koi user date field ko entity banana chahta he to custom entity create nahi karega system entity se kam kar sakta he.
Simple example of Custom Entity Baju ki image me aap dekh sakte ho custom entity wo user apne tarike se or apni requirement ke anusar banata he. Ham isme kisi bhi field ke liye entity create kar sakte he Yaha dekh sakte he name ki entity banai hue he jisme user my name is (\d{3}) likh sakta h or entity pas kar sakta he
How to pass entity with form A Form Should be created in HCL Leap. Watson Workspace configuration and form deployment should be done. Basic Training of the form should be done, which requires: Application id and Form id of the form. Creation of intents for user examples in Watson (intent name should not start with #q_ ). Creation of dialog, mapping of the created intent & mapping of app id, form id. Creation of two other context variables “ isInApp : true” “ formName : test”.
How to pass entity with form The form should have scope for advanced training i.e. the form should have components like drop down, radio buttons, currency, email id, single line entry & number fields . The components which need to be displayed in the chatbot should be marked as required in the form (through either of the three methods- required checkbox or through setRequired property or by adding required in the field name in form). IDs of the components (for which the advanced training is to be done) should be provided i.e. the access of the form is to be provided.
Use of System entities First level advanced chatbot training is useful in scenarios where the user answers certain questions of the form in the first sentence itself. For example, consider the scenario below: NOTE : The bot here has skipped two questions and directly asked user the third question.
Use of System entities In the example above, the user has specified job application , user has also mentioned the Hiring Post in the first sentence itself. Therefore, following fields of the form should not be asked to the user: Through advanced training, the chatbot is trained in such a way that it captures those two answers from the user’s first conversation, fill them in the corresponding fields of the form and skip those particular questions when the fields of the form are being asked from the user in the chatbot. Without advanced training, all the fields of the form will be asked from the user, even if the user answers them in the first sentence. For example, consider the scenario below where user answers in first sentence but still the bot doesn’t capture the answer.
Use of System entities Once the form starts, the user has to answer the rest of the questions in the desired format of the components only i.e. Conversational answers are not permitted after the form is called through the intents. Single Workspace (Watson Skill) is required to do this training. Various kind of different validations (even if they are not present in the form) in the fields like numeric field or currency field could be added through advanced training. For the fields like drop down, radio button, generally synonym type entity is used to save only the saved- value of that field in the form, no matter in what format the user writes it. For e.g. there is a radio button in the form with options – yes or no, user writes in desired format but the chatbot picks and saves only the answer in the form. For the fields like email, single line entry, generally a pattern is used to pick only the desired answer from the whole user sentence and fill it in the form.
Use of System entities
Custom Entity
How can bind with Custom Entity Users have created intents in their skills. Now create an entity and give a suitable name for that entity. Give value Name or other and in Synonyms “ My name is ([A-Za-z]{2}) ” If you bind/create one entity so apply the below line of code {" F_FirstNameINP ":"<?@Name!=null ? @Name.value:''?>"} (Please change with your requirement) F_FirstNameINP – Field ID @Name – Entity name Now go to Dialog and add Variable- entity and value-{" F_FirstNameINP ":"<?@Name!=null ? @Name.value:''?>"}
Step-1 Entity name sutaible dedo Value me name and Synonyms me “my name is ([A-Za-z]{2})”
Step - 2 Aap ne jo entity create ki use ham entity me paste kar denge Variable me “entity” and Value “ aapne create kia hua code yaha paste kar do”
Out of Scope Some Components of HCL Leap like table, Multi-select cannot be pre-trained in the user’s conversation. In a staging form, the chatbot cannot be trained to pick up stages from the user’s conversation (unless that stage is a field like a drop down in the form). Also, there is no provision to train the bot to show particular records only. Since only one workspace is provided, the chatbot cannot be trained for conversational flow after the first sentence i.e. once the first field of the form starts, the user cannot further answer anything in the conversational format, he has to answer in the desired format of the field only.