Build a pragmatic chatbot in 5 days.
By this case study, we know introduce chatbot is a digital transformation which same application category as robotic process automation.
Asset-based agile approach is crucially to make chatbot implementation success. Build and leverage process and service inventory, application and user interface instead of reinvent them.
4. Requirement background
A service fulfillment system in life insurance
company, the batch system run >6000 jobs
daily
Required daily operation support to
collaborate multiple development and
operation team in more effective method
5. Requirement
Application
Platform
Approach to Success
Non stop service
Push required
information by role
Pull information by
human machine
interactive interface
Process automation
support
Automatic sharing
information by
role/group
6. Requirement
- Application: Command Console Consolidation
DEV
SIT UAT
PROD
System user interface
consolidation
Group information
consolidation
On line coach mode
Role base virtual
group
7. Requirement
Application
Platform
Approach to Success
Conversational
platform
training
analytics
Collaboration platform
and design
push/pull
trust circle and coach
Develop tools
Networking tuning
8. Requirement
Application
Platform
Approach to Success
Asset-based Agile
Approach
Behavior-Based
Building tool
Cognitive
Communication Cloud
Domain-Driven
Design
9. Methodology
- realized based on agile approach
Approach Output/Ref
AAA Build asset/service context map • Asset Context Map
• ref: ABCD
BBB Build behavioral specification in
ubiquitous language
• Behavioral specifications
• ref: BDD
CCC Map to intent/entity/context
object
• Dialog flow
• ref: BBR
DDD Refine or build micro service
interface
• Program spec.
• ref: DDD
10. Summary in Objective
- The Chatbot
is
new Architectural Pattern
with Ubiquitous Language
with Learning Mechanism
support Robotic Process
Automation
new Service Interface
with Multi-channel support
with Extendable Integration
and Fulfillment service
is not
new Application
Why reinvent wheel?
11. Robotic Process Automation:
= Autonomation
Autonomation(自働化) = user + control + management
Static routing
Fundamental = ((user + control) + management)
ex.
Process control: integrated control point to process
sales process = (inv shipping(-INV/+COGS) + AR(+AR/-Rev) })
Content-based routing
Supplemental = (user) + (control) + (management)
Ex.
PO Approval hierarchy
Intelligent routing
(user) + (control + management)
Dynamic and intelligent routing by objective, leverage machine learning
Ex.
Load balance
Skill based/Sentiment routing
11
13. Asset-based Agile Approach
Process inventory
Process transformation
Service interface
Service survey
Service package
Leverage current CLI/API into service interface
Asset/Service Inventory Integration
REPL tools: Jupyter
Build by snippet
17. Messaging by level
- Trust Circle
PMO
OP
DEV
• Executive
• Stage Level Message: Progress
• Operational
• Detail Level Message: Error/Priority
• Develop
• Detail Level Message: Error/Log
Trust circle
3 Cycle depend liability /
Define message level
Management and control
Information cost
Coach cost
18. Three pig model for multiple trust circle
Traditional trust circle
PMO
OP
DEV
with chatbot
PMO
OPDEV
* Trust circle is an low transaction cost institutional arrangement to implement
- Democratic centralism, or Nemawashi
- The Pig is people who committed
19. Summary in AAA
Push
Just follow LINE
developer guide
import requests
def send_line_msg(headers, data):
……
def pln_get_jobsts(job_ptn, site=None):
…..
Pull
Webhook get through
NAT
20. DAY 2 – ELABORATION
Behavior-Based Building method
21. Behavior-Based Building method
Push
Proactive
System information
Subscribe by role
Drill down by interactive
service
Pull
Interactive
Link and integrate with
push message
Authorize service by role
29. Process inventory
- Management Flow: job status
Process
Flow
Project TGL
ODS
STAGE ODS
SDM
SDM
RPT
RPT CR CF ML
Template
PROCESS
ODS Template
STAGE
STG_SRC.bat
STG_SRC.sql
STG_SRC.ddl
ODS
ODS_SRC.sql
ODS_SRC.ddl
BSD ID = RPT GROUP
SDM
SDM_CLM.sql
SDM_CLM.ddl
RPT
CLM_001.sql
CLM_001_11G
CLM_001.ddl
OUT
CLM_001_1.rpt
CLM_001_2.rpt
ARC
CLM_001_1.pdf
CLM_001_1.ctl
CLM_001_2.pdf
CLM_001_2.ctl
TAT
JOB = Prog= File JOB = Prog≠ File
Smart
PlanDynam
ic
Schedu
le
Auto
Contro
l
Depend
ency
Inversio
n
31. Process/Asset/Service inventory
Command Purpose Comment
iws_plan.sh Replan after JobPlanner
iws_reset.sh Clear IWS object and replan
iws_restore.sh Restore object from *.log under
1020.ETLSYSods_planner
iws_showdup.sh Show job duplicate
iws_showerr.sh Show job log message when error
iws_backup.sh Backup current IWS object Back up to *.log
Iws_run.sh Run plan in specified data date
Iwsimport.sh Import plan base into IWS
iwsplandate.py Set ETL_DT in variable table
iwssetcalendar.py Set ETL_DT in variable table
Set runcylce to weekly
Set start time = current time – 1min
iws_showstatus.sh Show job status
iws_showlog.sh Show job log …
32. iws Chatbot sequence diagram
Workload Scheduler Chatbot
User
iwsBot
BOT ASST Scheduler Messaging Conv platform prebuild Agent
Start jobs_poll
Show Job Stage
showjobs
Status reply
Push message
Line message
Show Error
showjobs
Status reply
Push message
Line message
Push message
Query Status
Query status
Query intent
Default conversation
Intent status
showjobs
Status reply
Reply message
Reply message
Line message
Pull(Interative)
http://msc-generator.sourceforge.net v6.1
34. BBB
- Domain Language Layer
Cognitive
Communication
Ubiquitous
Language
Service
• Smalltalk
• Sentiment
• Personality Insights
• Domain Model
• Bounded Context
• Domain
• Group
• Predefined Domain
Agent
35. Summary in BBB
Behavior-Based
Mapping Dialog to
Behavior-based model
ex. flask-assistant
from flask import Flask
from flask_assistant import Assistant, ask,
tell
app = Flask(__name__)
assist = Assistant(app, route='/')
@assist.action('greeting')
def greet_and_start():
speech = "Hey! Are you male or
female?"
return ask(speech)
if __name__ == '__main__':
app.run(debug=True)
36. DAY 3 – CONSTRUCTION
Cognitive Communication Cloud
37. Context Free Intent
Dialog flow
Context
welcome
show datadt
show
datadt_site
site
show_cmd
showlog
showlog job
showstatus
showstatus
job
show_status run_cmd
watch
watch_job
rerun
rerun_job
submit
submit_job
Fallback
help escape
smalltalk
env-focused
site command
jobname
38. Domain Driven Design service
DDD
Service
API
CLI
GUI
NLI
Service
API: Application Interface
CLI: Command Line
Interface
GUI: Graphic User
Interface
NLI: Natural Language
Interface
Conversation with context
and guided interaction
Ubiquitous Language
support
43. CCC
- iwsChatbot component
Workload Scheduler
DWC
CLI
API
iwsBot
Job Plan
Job Status
Dynamic
Dependency
Data job
Report job
Export
Google Home
PC
Mobile
Line
Slack
Web
46. For OP and programmer group
Status and error msg Show detail log and rerun
Show error with owner and service level Inquiry detail log and ask action
51. PDCA
Training console is
critical to improve
conversation interface
Feedback is essential
Add command by priority
For example, Add natural
language interface to
Show dependency is
critical to OP
Intent Analysis, to
improve resources
allocation
54. Lesson Learnt in platform
Fundamental
Isolate interactive flow with application logic
fulfillment SDK
message API
language/ framework
training toolset
analytics
Channel independent
multiple channel
Advanced
Device/Service plug-in
assistant framework on device
Service Marketplace
prebuilt bot service
55. Lesson learnt in develop
Intent design principle
Single responsibility principle (SRP)
! – escape, ? – help
Open Close principle (OCP)
show log, show status: two different service interface
Ubiquitous Language design
Don't mess up engine
sys.any is the last choice
Intent group as language-based not service-based
ex. show log, show status should integrate into one intent
Track source code
Find API, like lifespan=1
56.
57.
58. Business Data Store
Case study: Insurance: Data Map
Operational
applications
CONTRACT
GI
TI
FIN
CLM
080
Operational
repositories
Oracle
AS400
SQL server
Data
acquisition
Change
Data
Capture
File
Staging
STAGE
SRC
ODS
ODS
Summary
Data
Mart
SDM
Data
Mart
RPT
FDW
Speed Batch
59. Steps to add command
App flow
python Flask
Microservice
bash IWS
Dialog Train And Test
json Conv Console
Context
json Conv Console
Intent / Entity
json Conv Console
Dialog pilot
Intent
Entity
Context
lifespan
Train And Test
App
Integration test
60. Why NLI
More flexible interface to
multiple channel
Social media
Mail
Service chain
Context sensitive service
Lower cost with higher service
quality
Consistence
Flexible integration
Dynamic Dialog by learning
Difference service/system
Conversion or Legacy
KPI
Service API vs. Improve KPI (or
Learning KPI)
Learn how to learn
Benefit
Familiar interactive
model
Easy to access service
Access channel
without limitation
Issue
Converge
V&V, or Test
UT/SIT/FIT
UAT
61. Approach Roadmap by phase
Inception Elaboration Construction Transition
AAA Asset
Service context
BBB Requirement Specification
CCC Intent
Entity
Dialog
Fulfillment
Chained agent
DDD Language Context driven Testing
64. Chatbot is kind of RPA
Robotic process automation (or RPA)
is an emerging form of business process automation
technology based on the notion of software robots or
artificial intelligence (AI) workers.
Ref to wiki: RPA
It is a process automation case by robot, but
only NLI and no UI
Similarity : In methodology viewpoint, it is.
Different: In current tool category viewpoint, it is not.
Editor's Notes
The core insurance replacement project include many vendor and product.
The daily night batch, run on IBM Workload Scheduler, need solve issue in time to start operation transaction at morning on time.
High communication cost
Unstable response time
High issue finding cost
Need commit service quality
> 6000 job need monitor and locate right resource to solve by predefined service level
Learning By Doing, Learning By Sharing
Learning By Doing, Learning By Sharing
Learning By Doing, Learning By Sharing
AAA, Asset-based Agile Approach
BBB, Behavior-Based Building method
CCC, Cognitive Communication Cloud
DDD, Domain-Driven Design
Plug-in to current App with new service, not create new one
D1: god, grant me - No waste on your grants- Boundary of service- System boundary- Component boundary
Waste elimination.
D2: the serenity to accept the things I cannot change- Open source- Asset-
D3: courage to change the things I can- Changing in process- People- Tech
D4: and the wisdom to know the difference.- refactor all the way, - train tool is the way for robot-
D5: Thanks god. - The system running and people love it. .- Refactor and Plan to next sprint