This Code Pattern will demonstrate a methodology to build an assistant which can answer queries regarding the Covid Insurance Policies of various companies. And it will also compare the policies and top-up related queries given by them. In Watson Assistant, we will create Dialog skill and using the search skill capability develop a model in Watson Discovery that will understand the policies and provide an interactive interface to the user. This application will come in handy for various insurance brokers and also a layman who wants to know and compare the policies of various companies.
When user has completed the pattern he will-
- Know how to connect a UI to Watson Assistant and create Dialog Skill.
- Send sample documents to Watson Discovery answer train custom model.
- Take personal details from the user using
Context variables
and use them in the Search Query to get personalised results. - User will learn how to integrate insights generated with Discovery back to Assistant.
- Upload Documents on the Watson Discovery-to train the model using SDU on various Policy Documents.
- Watson Assistant will interact with the User to take personal details.
- After collecting personal information, search skill is initiated.
- The results will be fetched from the Watson Discovery-where the model has been trained on various Policy Documents.
- Showcase the results to the user.
- Setup IBM CLOUD account
- Create Watson Assistant.
- Set up Discovery Service.
- Create Search Skill and connect to the Discovery service
- Copy Integration ID and update to Flask.
- Run the flask App.
Create an IBM Cloud Account
- Login to IBM CLOUD
- Click this link to create Watson assistant service.
- Enter the service name as
Watson Assistant-CovidInsurancebot
. You can choose to enter any name you like. - Ensure you select the right region, organisation and space.
- Under
Pricing Plans
, selectLite
plan. - Click
Create
. - Watson Asistant service instance should get created.
- Go to IBM Cloud Resource list and click on the Watson Assistant service instance created in above steps.
- On the Watson Assistant Resource list page, click
Launch Watson Assistant
.
- Click
Skills
tab in the side bar.
- Click the
Create skill
button. - Select the
Dialog skill
box - Click the
Next
button. - Select the
Import skill
tab.
- Click on
Choose JSON file
. - Browse to the cloned repository parent folder -> WA-Skill.
- Select
skill-Covid-Health-Insurance.json
and clickOpen
.
- Click this link to create Watson Discovery Service.
- Enter the service name as
Watson Discovery-In
. You can choose to enter any name you like. - Ensure you select the right region, organisation and space.
- Under
Pricing Plans
, selectLite
plan. - Click
Create
. - Watson Discovery service instance should get created.
-
Click
New Collection
and name it asCovid-Insurance Policies.
-
Click on
Upload Documents
and upload the policy documents in the Data Folder.
-
Click
Skills
tab in the side bar. -
Click the
Create Search skill
button. And name it asCovid-Discovery-insurance-skill
-
Select the
Discovery Instance
created in the above step(section 3.1). And ChooseCovid-Insurance Policies
collection-created above in section 3.2. -
Click on the
Covid-Discovery-insurance-skill
, you just created and configure theDisplay Card
. -
Click
Assistant
tab in the side bar. Select the Assistant Created and link the Search skillCovid-Discovery-insurance-skill
with this Assistant.
-
Click
Assistant
tab in the side bar. Select the Assistant Created and link the Search skillCovid-Discovery-insurance-skill
with this Assistant. -
Click on
Add Integeration
on the right side and choose Web Chat Integeration. And Click onEmbed
- In the repo
template/UI.html
, under line 418, update the copied integration ID within the script tag
- Navigate to cloned repo folder
pip install -r requirements.txt
- Then run
python app.py
-
The UI will show you the various Insurance Policies that are offered
-
The UI will show you the various Insurance Policies that are offered