article by Frank Nimphius, April 2020
Composite bag entities group related entities and items of type string, location and attachment to a single entity that represents a real world object like an order, a booking, a reservation, an incident report and many more. The value for each item in a composite bag entity can be resolved through natural language processing (nlp) or by the user when prompted to enter a value.
A quality of composite bag entities is that they can be resolved without developers to write dialog flow states for each of the contained bag items. Using the System.CommonResponse component or the System.ResolveEntities component, user prompts are automatically generated until the user cancels or completed providing required information.
This article outlines an approach for building model-driven questionnaires using composite bag entities, the common response built-in component and resource bundles. The example use case is a course evaluation skill that students use at the end of a training class to provide feedback about the instructor and the training material and content.
The following screen shots show the course evaluation questionnaire in action. The questionnaire has three sections: questions about the course to evaluate, questions about the course material and trainers and questions about the student rating the course. All three sections are modeled as a composite bag entity so that the user interaction is driven by the entity. For better a better user experience, the dialog flow shows dialogs in between that tell users about what they have achieved and what they are going to do. Each dialog and question offers users an exit out of the questionnaire.
The next image then is an example for a question with pre-defined answers. Notice how the prompt shows context information about the index of the question within the overall range of questions.
After downloading the sample skill (requires Oracle Digital Assistant 20.2 or later), import it to your digital assistant instance and train it. Start the conversation tester and type "I want to provide feedback for a training". After this, just follow the questions.
Download Course Evaluation Sample Skill