ݺߣ

ݺߣShare a Scribd company logo
Watson Conversation??
?? ??? ??
IBM	Developer	Outreach	Team
Agenda
Watson Conversation ???
?? ?? ?? ?? ????
???? ???? ???
?? ???? ??? ? Best Practices!
1
2
3
4
?? ?? ?? ????
?? ??? ????!
Watson Conversation UI ?? ??
API ?? ? ?? ? ????
?? Reference Architecture
??? ????, ?? ???, ??
??? ???, ??? ??????
?????.
?? ????! ???? ????
??? ???? ??? ???
Contact	Us
#building-with-watson
#watson-korea
facebook.com/groups/BluemixStudy
wdc-slack-inviter.mybluemix.net
http://stackoverflow.com/question
s/tagged/watson-conversation
https://developer.ibm.com/answer
s/topics/watson-conversation.html
https://developer.ibm.com/kr
Watson Conversation Service
Watson Conversation
Im	Watson.	I	can	help	you		
order	a	pizza.	What	size?
Great	!	Can	I	get	a	
medium?
Perfect.	What	toppings	are	
you	in	the	mood	for	today?
?? ?? ??????(??)? ??? ?? ?
?? ?? ?? ??
???? ???? ????? ???? ???
? ???? ??
?????? 30? Free Trial? ?? ??
Watson Conversation ????
??? ????? ??
???.
?? : ?? --- Intent
?? : ??? ????? - Entity
?? : ? ? -- System	Entity
???? ??
?? ?????
????
?? : ??, ???, ??
?? :
- ?? : ??? ?????
- ?? : ??
???? : ???! -> ???? ????!	->	Response
??? : ???  Entity
?! ??? ??
?????.
?? : ??, ???, ??
?? :
- ?? : ??? ?????
- ?? : ??
- ??? : ???
???? : ??! -> ??? ??? ??!  Action
Watson Conversation ????
??? ????? ??
???.
?? : ?? --- Intent
?? : ??? ????? - Entity
?? : ? ? -- System	Entity
???? ??
?? ?????
????
?? : ??, ???, ??
?? :
- ?? : ??? ?????
- ?? : ??
???? : ???! -> ???? ????!	->	Response
??? : ???  Entity
?! ??? ??
?????.
?? : ??, ???, ??
?? :
- ?? : ??? ?????
- ?? : ??
- ??? : ???
???? : ??! -> ??? ??? ??!  Action
?? Intent	??
?? Entity ??
Dialog	??
Context ??
Action	??
??? Entity ??
Intent
[??]
???? ??? ?? ??, ??? ??, #? Prefix? ????. Watson
Conversation??? NLC(Natural Language Classifier)? ?? ??? Intent
? ????.
[??]
? ?? ?? ??? ??? ????
? ??? ???? ???? ??? ?? ???
? ??? ??????.
? ??? ?????
? ??? ??? ????
#???_??
Entity
[??]
Intent? ??? ??? ???? ??? ? ???? ???? ??? ??
??? ????? ??? ??? ??? ??. @? Prefix? ????.
[??]
? Korea
? IFC
? 13?
? ??
? 13M01
@?? @??
? ??
? ?? ?
? 7? 7?
? ??
? ???
System Entity
[??]
?? ??? ???? @? Prefix? ????.
https://www.ibm.com/watson/developercloud/doc/conversation/system-
entities.html#sys-date-and-sys-time-entities
[??]
? Today
? 2017-04-26
? Now
? Friday
? April 26
@sys-date @sys-time
? Now
? 2pm
? At 5
? 15:30
? From 2 to 3
Dialog
[??]
????? ??? ??? ??? ???? ????. ???? ????
???? ?? Intent? Entity? ???? ??? ??? ????.
[??]
#??
#?? ?????. ??? ???????
?? ???????
@?? ? ?? ??????
Context
[??]
??? ??? ???? ?? ??? $? prefix? ????.
[??]
$user.name? ??????
???? ??????
context:{
user	{
name	:	???
}
}
Watson Conversation Tool
CSV Upload
(question, intent)
Watson Conversation Tool
Watson Conversation
Easy	Tool
Mixed	Initiative	
Dialog
Easy
Integration
High
Accuracy
Easy	Tool
? ?? ???? UI ?? ????
?? ??? ?? ?? ??!
? Intent,	Entity,	Dialog ??? ?
? ??? ??
? ?? ??? ????, ???
? ???? ? ?? ?? ??
??
High	Accuracy
? NLC(Natural	Language	Classifi
er) ?? Intent ??
? NLP(Natural	Language	Proces
sing)? ???? ?? Entity
??
Mixed	Initiative	Dialog
? ??? ?? ???? ?
???? ??? ???
?? ???? ??
? ??? Q&A? ??? ??
??? Context? ????
? ???? ?? ??
Easy	Integration
? Restful	API ??, ???
?? ??? SDK ??
? API	Input/Output? JSON
??? ???? ???
? ?? ??
Watson Conversation API Overview
Watson Conversation API Explorer
POST /message
Watson Conversation API ????
POST /message
{
intents	:	[
intent	:	Greeting
confidence	:	0.99
],
entities	:	[
],
input	:	{
text	:	Hi
},
output:	{
text	:	Hello	HJ
},
context:{
user	:	HJ"
}
}
{
input	:	{
text	:	Hi
},
context:{
user	:	HJ
}
}
Watson Developer Cloud SDK
Watson Conversation ?? ?? ??
Watson Conversation ?? ??
https://www.ibm.com/watson/developercloud/doc/conversation/index.html
API ??
https://www.ibm.com/watson/developercloud/conversation/api/v1/#introduction
API ???
https://watson-api-explorer.mybluemix.net/apis/conversation-v1
?? ?, SDK, Starter Kit
https://www.ibm.com/watson/developercloud/developer-tools.html
????
https://developer.ibm.com/kr/cloud/bluemix/watsonservice/2017/01/13/watsonchatbot-1-
watson-conversation/
?? ??
https://github.com/watson-developer-cloud/conversation-simple
?? ???? (Context)
POST /message
??? ??
POST /message
DB? ???? ??
Output? context? payload context
? ?? ??
Output? context? DB? ??
Payload? ???? ?? DB?? Context? ???
???? ????(??)
Watson Response
{
"output": {
"action": "getPoint"
}
}
??? ??
????
600 ???
????.
Watson Response
{
"output": {
text": $point ??? ????."
}
}
Payload
{
context": {
point": 600
}
}
SPEL ????
Watson	Conversation?? ???? Expression	Language
(??) ??? ?????
??? ???
?? ??
??? ??? ??
??
??? ????? ???
Natural	Language
Classification
Entity
Recognition
?? ??? Reference Architecture
?? ?? ???
???? ???? ???
- ??? ?? ??
?? ??? Tutorial Architecture
???
?????
??????
??????
Conversation
Service ??? ???
???? ??
1. WCS ???
?
2. ?? ????
3. ?? ???
?
4. Intent ???
? ?????
5. Entity?
Dialog ???
?
6. Backend ??
?? ????
?? ?? ??
Bluemix Account ?? ? CLI ??1 2
3 GIT ??
Node.js ??
https://github.com/cloudfoundry/cli#dow
nloads
https://console.ng.mybluemix.net
https://nodejs.org/en/#d
ownload
https://git-
scm.com/book/ko/v1/%EC%8B%9
C%EC%9E%91%ED%95%98%EA%B
8%B0-Git-
%EC%84%A4%EC%B9%98
Developerworks
???? ?? ???? ???? ?? ???? ???
???? 1. WCS ????
[??]
? Bluemix?? Watson Conversation ??? ???? ????
? WCS ?? ????
? ? Workspace ????
? ? Credential ?? ????
???? 2. ?? ????
[??]
? Web Client ? ?? ?? (??)
? ???? ?? (????? ?? ??????, ??)
? ???? ?? (??)
???? 3. ?? ????
??????
?? ???? ???? ??? ??? ??????.
@camomile_bot
???? 4. Intent ???? ?????
https://meetup23th.eu-gb.mybluemix.net/csv/questions
???? 5. Entity? Dialog ????
???? 6. Backend ???? ????
?? ???? Best Practice!
Ground	truth
??
Dialog
??
???
??
??
??
Premise	1.	Data	Driven	Project	!!
Premise	2.	Incremental and iterative
project
??? ?? ???? ?? ??? ????
??? ?
?? ???? ???
? ?? ???? ??
?? ???? ??
??
? ??? ???? ?
??? ??
Ground Truth
? ????? ???
??? ?? ???
? ????? ??
?? ??
? ??? ?? ???
?? ?? ??
??
? WCS? ????
UI? ????.
? ??? ?????
?? ???? ??
??? ?? ???
?.
User Interface
? ? ?? Dialog ?
?? ???? ?
?? ??
? Ground Truth ?
???? ?? ?
?? ??
??
? Dialog ??? ???
?.
? ??? ?? Entity?
????.
?? ?? ??
?? ???? ??? > User Interface
? WCS? ????
UI? ????.
? ??? ?????
?? ???? ?
? ??? ?? ?
???.
User Interface
1. ?? ???? ??? ??
2. ??? ?? ???? ??? ??? ?? !!
? ??? Data driven ???? ! -> ?? ??? ???
??? ??? ?
? ???? ???? ?? ??? ??? ???? UI? ??
? Device Type, UI ?? ?? ????? ?
?? ???? ??? : Ground Truth ??(Intent)
? ?? ???? ??
?? ???? ??
??
? ??? ???? ?
??? ??
Ground Truth
1. Ground	Truth? Machine	Learning ????? ?????
?? Training	Data
2. ??? ??? ???? ?? ??? ?? ???
? Example	C Intent Mapping
? ??? ???? ???!
? ???? ??
?? ???? ??? : Dialog Flows
? Dialog ??? ???
?.
? ??? ?? Entity?
????.
?? ?? ??
1. ???? ???? ???? ?? ??? ??
2. ??? UI/UX? ??
3. ??? ?? Entity ??
? ???? ???? ?? !
? Multi	Step	Dialog? ?? (	Mixed	Initiative	Dialog	!)
? ??? ??
? ??
? ??
? ???
?? ???? ??? : ??
? ??? ?? ???
Question Answer
Question 1 Answer 1
Question 2 Answer 1
Question 3 Answer 2
Question 4 Answer 3
Question 5 Answer 3
. 
Question N Answer N
Question Answer
Question 1 Answer 1
Question 3 Answer 2
Question 4 Answer 3
. 
Question N Answer N
Question Answer
Question 2 Answer 1
Question 5 Answer 3
. 
Question N Answer N
???? Training
Set? Test Set ??
??
Tests
Trained W
atson
Metrics
?? ???? ??? : ??
? K-Fold Cross Validation
? ????/???? K? ?? ?????? K??? ???? ???.
? ??? ?? ??, ?? ??? ?? ? ??.
Training Training Training Training Testing Accuracy / Precision@k
Training Training Training Testing Training
Training Training Testing Training Training
Training Testing Training Training Training
Testing Training Training Training Training
Average: Accuracy / Precision
Accuracy / Precision@k
Accuracy / Precision@k
Accuracy / Precision@k
Accuracy / Precision@k
?? ???? ??? : ??
? Accuracy: ???? Intent? ???? ?? ? ??? ??
? Precision @ k: ???? ?? ?? ?? ??? ?? ?? K?? ??? Intent ??? ???
??? ?? ??? ??
???? ???? ??? ??? ???
? ??? ???
?? ?? ???? ??? ?? K?? ??? Intent? ??????? ?? ???
? ??? ???
?? ???? ??? : ??
? ???? ??? ???? ! Intent Overlapping? ???
??? ?
? ??? Intent ? ???? ?? !
? Intent? ???. ? ?? ???? ????.
? ? Intent? Example? ???? ???? ??? Intent? ???
? ??? ???? ?? Example? ???????
C ???? ?? ???? ??? ???.
? Intent? ???? ???? ? ?? ??? ?? C Example? ????
? Key Task : ??? Intent? ?????.
C ?? ? ?? ??? ??? ?? ???? ???? ??
C Validation ???? ??? ??? ?? ? ??
? ? ?? Dialog ?
?? ???? ?
?? ??
? Ground Truth ?
???? ?? ?
?? ??
??
?? ???? ??? : ??
Contact	Us
#building-with-watson
#watson-korea
facebook.com/groups/BluemixStudy
wdc-slack-inviter.mybluemix.net
http://stackoverflow.com/question
s/tagged/watson-conversation
https://developer.ibm.com/answer
s/topics/watson-conversation.html
https://developer.ibm.com/kr

More Related Content

?? ??????? ?? ??? ! WCS ???

  • 1. Watson Conversation?? ?? ??? ?? IBM Developer Outreach Team
  • 2. Agenda Watson Conversation ??? ?? ?? ?? ?? ???? ???? ???? ??? ?? ???? ??? ? Best Practices! 1 2 3 4 ?? ?? ?? ???? ?? ??? ????! Watson Conversation UI ?? ?? API ?? ? ?? ? ???? ?? Reference Architecture ??? ????, ?? ???, ?? ??? ???, ??? ?????? ?????. ?? ????! ???? ???? ??? ???? ??? ???
  • 6. Watson Conversation ???? ??? ????? ?? ???. ?? : ?? --- Intent ?? : ??? ????? - Entity ?? : ? ? -- System Entity ???? ?? ?? ????? ???? ?? : ??, ???, ?? ?? : - ?? : ??? ????? - ?? : ?? ???? : ???! -> ???? ????! -> Response ??? : ??? Entity ?! ??? ?? ?????. ?? : ??, ???, ?? ?? : - ?? : ??? ????? - ?? : ?? - ??? : ??? ???? : ??! -> ??? ??? ??! Action
  • 7. Watson Conversation ???? ??? ????? ?? ???. ?? : ?? --- Intent ?? : ??? ????? - Entity ?? : ? ? -- System Entity ???? ?? ?? ????? ???? ?? : ??, ???, ?? ?? : - ?? : ??? ????? - ?? : ?? ???? : ???! -> ???? ????! -> Response ??? : ??? Entity ?! ??? ?? ?????. ?? : ??, ???, ?? ?? : - ?? : ??? ????? - ?? : ?? - ??? : ??? ???? : ??! -> ??? ??? ??! Action ?? Intent ?? ?? Entity ?? Dialog ?? Context ?? Action ?? ??? Entity ??
  • 8. Intent [??] ???? ??? ?? ??, ??? ??, #? Prefix? ????. Watson Conversation??? NLC(Natural Language Classifier)? ?? ??? Intent ? ????. [??] ? ?? ?? ??? ??? ???? ? ??? ???? ???? ??? ?? ??? ? ??? ??????. ? ??? ????? ? ??? ??? ???? #???_??
  • 9. Entity [??] Intent? ??? ??? ???? ??? ? ???? ???? ??? ?? ??? ????? ??? ??? ??? ??. @? Prefix? ????. [??] ? Korea ? IFC ? 13? ? ?? ? 13M01 @?? @?? ? ?? ? ?? ? ? 7? 7? ? ?? ? ???
  • 10. System Entity [??] ?? ??? ???? @? Prefix? ????. https://www.ibm.com/watson/developercloud/doc/conversation/system- entities.html#sys-date-and-sys-time-entities [??] ? Today ? 2017-04-26 ? Now ? Friday ? April 26 @sys-date @sys-time ? Now ? 2pm ? At 5 ? 15:30 ? From 2 to 3
  • 11. Dialog [??] ????? ??? ??? ??? ???? ????. ???? ???? ???? ?? Intent? Entity? ???? ??? ??? ????. [??] #?? #?? ?????. ??? ??????? ?? ??????? @?? ? ?? ??????
  • 12. Context [??] ??? ??? ???? ?? ??? $? prefix? ????. [??] $user.name? ?????? ???? ?????? context:{ user { name : ??? } }
  • 13. Watson Conversation Tool CSV Upload (question, intent)
  • 15. Watson Conversation Easy Tool Mixed Initiative Dialog Easy Integration High Accuracy Easy Tool ? ?? ???? UI ?? ???? ?? ??? ?? ?? ??! ? Intent, Entity, Dialog ??? ? ? ??? ?? ? ?? ??? ????, ??? ? ???? ? ?? ?? ?? ?? High Accuracy ? NLC(Natural Language Classifi er) ?? Intent ?? ? NLP(Natural Language Proces sing)? ???? ?? Entity ?? Mixed Initiative Dialog ? ??? ?? ???? ? ???? ??? ??? ?? ???? ?? ? ??? Q&A? ??? ?? ??? Context? ???? ? ???? ?? ?? Easy Integration ? Restful API ??, ??? ?? ??? SDK ?? ? API Input/Output? JSON ??? ???? ??? ? ?? ??
  • 16. Watson Conversation API Overview Watson Conversation API Explorer POST /message
  • 17. Watson Conversation API ???? POST /message { intents : [ intent : Greeting confidence : 0.99 ], entities : [ ], input : { text : Hi }, output: { text : Hello HJ }, context:{ user : HJ" } } { input : { text : Hi }, context:{ user : HJ } }
  • 19. Watson Conversation ?? ?? ?? Watson Conversation ?? ?? https://www.ibm.com/watson/developercloud/doc/conversation/index.html API ?? https://www.ibm.com/watson/developercloud/conversation/api/v1/#introduction API ??? https://watson-api-explorer.mybluemix.net/apis/conversation-v1 ?? ?, SDK, Starter Kit https://www.ibm.com/watson/developercloud/developer-tools.html ???? https://developer.ibm.com/kr/cloud/bluemix/watsonservice/2017/01/13/watsonchatbot-1- watson-conversation/ ?? ?? https://github.com/watson-developer-cloud/conversation-simple
  • 20. ?? ???? (Context) POST /message ??? ?? POST /message DB? ???? ?? Output? context? payload context ? ?? ?? Output? context? DB? ?? Payload? ???? ?? DB?? Context? ???
  • 21. ???? ????(??) Watson Response { "output": { "action": "getPoint" } } ??? ?? ???? 600 ??? ????. Watson Response { "output": { text": $point ??? ????." } } Payload { context": { point": 600 } }
  • 23. (??) ??? ????? ??? ??? ?? ?? ??? ??? ?? ?? ??? ????? ??? Natural Language Classification Entity Recognition
  • 24. ?? ??? Reference Architecture
  • 26. ???? ???? ??? - ??? ?? ??
  • 27. ?? ??? Tutorial Architecture ??? ????? ?????? ?????? Conversation Service ??? ???
  • 28. ???? ?? 1. WCS ??? ? 2. ?? ???? 3. ?? ??? ? 4. Intent ??? ? ????? 5. Entity? Dialog ??? ? 6. Backend ?? ?? ????
  • 29. ?? ?? ?? Bluemix Account ?? ? CLI ??1 2 3 GIT ?? Node.js ?? https://github.com/cloudfoundry/cli#dow nloads https://console.ng.mybluemix.net https://nodejs.org/en/#d ownload https://git- scm.com/book/ko/v1/%EC%8B%9 C%EC%9E%91%ED%95%98%EA%B 8%B0-Git- %EC%84%A4%EC%B9%98
  • 30. Developerworks ???? ?? ???? ???? ?? ???? ???
  • 31. ???? 1. WCS ???? [??] ? Bluemix?? Watson Conversation ??? ???? ???? ? WCS ?? ???? ? ? Workspace ???? ? ? Credential ?? ????
  • 32. ???? 2. ?? ???? [??] ? Web Client ? ?? ?? (??) ? ???? ?? (????? ?? ??????, ??) ? ???? ?? (??)
  • 33. ???? 3. ?? ???? ?????? ?? ???? ???? ??? ??? ??????. @camomile_bot
  • 34. ???? 4. Intent ???? ????? https://meetup23th.eu-gb.mybluemix.net/csv/questions
  • 35. ???? 5. Entity? Dialog ????
  • 36. ???? 6. Backend ???? ????
  • 37. ?? ???? Best Practice! Ground truth ?? Dialog ?? ??? ?? ?? ?? Premise 1. Data Driven Project !! Premise 2. Incremental and iterative project ??? ?? ???? ?? ??? ???? ??? ?
  • 38. ?? ???? ??? ? ?? ???? ?? ?? ???? ?? ?? ? ??? ???? ? ??? ?? Ground Truth ? ????? ??? ??? ?? ??? ? ????? ?? ?? ?? ? ??? ?? ??? ?? ?? ?? ?? ? WCS? ???? UI? ????. ? ??? ????? ?? ???? ?? ??? ?? ??? ?. User Interface ? ? ?? Dialog ? ?? ???? ? ?? ?? ? Ground Truth ? ???? ?? ? ?? ?? ?? ? Dialog ??? ??? ?. ? ??? ?? Entity? ????. ?? ?? ??
  • 39. ?? ???? ??? > User Interface ? WCS? ???? UI? ????. ? ??? ????? ?? ???? ? ? ??? ?? ? ???. User Interface 1. ?? ???? ??? ?? 2. ??? ?? ???? ??? ??? ?? !! ? ??? Data driven ???? ! -> ?? ??? ??? ??? ??? ? ? ???? ???? ?? ??? ??? ???? UI? ?? ? Device Type, UI ?? ?? ????? ?
  • 40. ?? ???? ??? : Ground Truth ??(Intent) ? ?? ???? ?? ?? ???? ?? ?? ? ??? ???? ? ??? ?? Ground Truth 1. Ground Truth? Machine Learning ????? ????? ?? Training Data 2. ??? ??? ???? ?? ??? ?? ??? ? Example C Intent Mapping ? ??? ???? ???! ? ???? ??
  • 41. ?? ???? ??? : Dialog Flows ? Dialog ??? ??? ?. ? ??? ?? Entity? ????. ?? ?? ?? 1. ???? ???? ???? ?? ??? ?? 2. ??? UI/UX? ?? 3. ??? ?? Entity ?? ? ???? ???? ?? ! ? Multi Step Dialog? ?? ( Mixed Initiative Dialog !) ? ??? ?? ? ?? ? ?? ? ???
  • 42. ?? ???? ??? : ?? ? ??? ?? ??? Question Answer Question 1 Answer 1 Question 2 Answer 1 Question 3 Answer 2 Question 4 Answer 3 Question 5 Answer 3 . Question N Answer N Question Answer Question 1 Answer 1 Question 3 Answer 2 Question 4 Answer 3 . Question N Answer N Question Answer Question 2 Answer 1 Question 5 Answer 3 . Question N Answer N ???? Training Set? Test Set ?? ?? Tests Trained W atson Metrics
  • 43. ?? ???? ??? : ?? ? K-Fold Cross Validation ? ????/???? K? ?? ?????? K??? ???? ???. ? ??? ?? ??, ?? ??? ?? ? ??. Training Training Training Training Testing Accuracy / Precision@k Training Training Training Testing Training Training Training Testing Training Training Training Testing Training Training Training Testing Training Training Training Training Average: Accuracy / Precision Accuracy / Precision@k Accuracy / Precision@k Accuracy / Precision@k Accuracy / Precision@k
  • 44. ?? ???? ??? : ?? ? Accuracy: ???? Intent? ???? ?? ? ??? ?? ? Precision @ k: ???? ?? ?? ?? ??? ?? ?? K?? ??? Intent ??? ??? ??? ?? ??? ?? ???? ???? ??? ??? ??? ? ??? ??? ?? ?? ???? ??? ?? K?? ??? Intent? ??????? ?? ??? ? ??? ???
  • 45. ?? ???? ??? : ?? ? ???? ??? ???? ! Intent Overlapping? ??? ??? ? ? ??? Intent ? ???? ?? ! ? Intent? ???. ? ?? ???? ????. ? ? Intent? Example? ???? ???? ??? Intent? ??? ? ??? ???? ?? Example? ??????? C ???? ?? ???? ??? ???. ? Intent? ???? ???? ? ?? ??? ?? C Example? ???? ? Key Task : ??? Intent? ?????. C ?? ? ?? ??? ??? ?? ???? ???? ?? C Validation ???? ??? ??? ?? ? ?? ? ? ?? Dialog ? ?? ???? ? ?? ?? ? Ground Truth ? ???? ?? ? ?? ?? ??
  • 46. ?? ???? ??? : ??