Upload
nishil-shah
View
971
Download
0
Embed Size (px)
Citation preview
Образецзаголовка
AnIntroduc+ontoChatbots
byNishilShahandKanishkThareja
PreparedasanassignmentforCS410:TextInformaMonSystemsinSpring2016
ОбразецзаголовкаWhatareChatbots?[1]
• ChatbotsarearMficiallyintelligentcomputersystemsthatconversewithhumansusingnaturallanguage
• IniMallycreatedinthe1960stosimulatehumanconversaMonforthepurposeofentertainment
• Today,chatbotsareabundantandoffersophisMcatedservices
ОбразецзаголовкаELIZA[1]
• Oneoftheearliestchatbotsystems• DesignedtomirroraconversaMonbetweenapaMent(theuser)andapsychotherapist(thesystem)
• Usesasimplekeywordmappingalgorithm– Ifakeywordisfoundwiththeuser’sinput,anoutputsentenceisselectedbaseduponarulecorrelatedwiththatkeyword
– Ifnokeywordisfound,ELIZAreturnsadefaultresponsesuchas“Pleasegoon.”or“Canyouelaborateonthat?”
ОбразецзаголовкаELIZA[1]
• Forinstance,iftheinputcontainstheword“sad”,ELIZAcanrespond,“What’sbotheringyou?”
• BaseduponthenoMonthatifausermenMonsafeeling,ELIZAshouldengagethemintoopeningupaboutit
• ELIZAdoesnotunderstandwhattheusersays• Generatesaresponsefrompre-storedsentencesandsentencetemplates
ОбразецзаголовкаCurrentApplica+onsofChatbots[1]
• ChatbotshavemorepracMcalapplicaMonsduetoimprovementsindata/textminingandmachinelearningmethods
• ThemainpurposeofcurrentchatbotsistoincreaseproducMvity
• Commondomainsoftoday’schatbotsareinformaMonretrieval(quesMon-and-answersystems),personalassistance,ande-commerce
ОбразецзаголовкаFacebookM
• AchatbotservicecreatedbyFacebook
• BetalaunchedonAugust27,2015• FewusagesofFacebookMarefindingrestaurantopMonsandvacaMonsuggesMons
• Builtrightintothemessenger;allowsuserstohaveeasyaccessinafamiliarUIsystem
ОбразецзаголовкаSiri
• ChatbotservicebyAppleoniOS• UsesvoicerecogniMonandspeakstotheuser• Sirihas3basicfuncMons– TaskcompleMon:Canperformwebsearches,completetransacMons,makeacall,etc…
– ConversaMonalintent:TakesintoaccountmulMplecontextssuchaslocaMonandMmetounderstandtheuser’ssituaMon
– PersonalizaMon:Sirilearnsabouttheuserandtailorsresponsestoeachindividual
ОбразецзаголовкаHowDoChatbotsWork?
• NaturalLanguageProcessing• DiscourseAnalysis• OntologyLearning• SentenceCompleMon
ОбразецзаголовкаNaturalLanguageProcessing[2]
• Textsystemsinterpretuserinputasa“bagofwords”,eachwordconsideredindependentoftheothers
• Wordscanbefurthersegmentedbylabelingtheirpartsofspeech,tense,etc…
ОбразецзаголовкаNaturalLanguageProcessing[2]
• ContextuallydependentwordscanbefoundusingMarkovChains– Inthesentence,“HowistheApplestockdoing?”,thekeywords“Apple”and“stock”areextracted
• ProbabilisMclanguagemodelscanbeusedtoassignweighMngstowords
ThesetechniquesareusedingeneraltextinformaMonsystems.Let’sfocusontopicsspecifictochatbots.
ОбразецзаголовкаNaturalLanguageProcessing[2]
• Itisnotouenthatauser’sinputisindependentofanycontext
• Thechatbotsystemmustmodelhowseparatetextlinkstogethertoformacoherentdiscourse
ChatbotsystemsmustrecognizethattheuserisreferringtothesamelocaMoninbothinstances.Weneeddiscourseanalysis!
ОбразецзаголовкаDiscourseAnalysis[3]
• DevelopingaraMonal,coherentdiscoursefrommulMpleuserinputs
• IdenMfiesandevaluatespawernswithinaseriesoftexts
• CreatesrelaMonshipsbetweensentencesandenMMes
• 3mainmodelstomodeldiscourse– AnalysisofsemanMcs– Analysisofstructure– AnalysisofintenMon
ОбразецзаголовкаDiscourseAnalysisUsingSeman+cs[3]
• TextisbrokendownintoprimiMveunitscalledelements(ex:enMMes,acMons)
• Together,elementsbuildsemanMcformulas,whichrepresentthemeaningofEnglishwords
Formulafor“eat”:– Agentisanimate– Objectisedible– DirecMonistowardthehumanmouth
• GivesrelaMonshipbetweenobjectsandacMons
ОбразецзаголовкаOntologyLearningCreatesModels[4]
• ChatbotsautomaMcallycreateontologies
• AnontologyisamodelfordescribinganenMMesproperMesandrelaMonships
• Inthisexample,thesystemunderstandsthattheuserlikesmovies
ОбразецзаголовкаOntologyLearning[4]
• Commoncomponentsofontologiesinclude:– Individuals:instancesorobjects(thebasicor“groundlevel”objects)
– Classes:sets,collecMons,concepts,classesinprogramming,kindsofthings
– Awributes:aspects,features,properMes,characterisMcs
– RelaMons:waysinwhichclassesandindividualscaninteractwitheachother
• Themoretheuserinteractswiththechatbot,thestrongertheontologiesitcancreate
ОбразецзаголовкаGenera+ngAResponse[5]
• Nowthatthechatbotsystemhasunderstoodtheuser’sinput,itmustgenerateanappropriateresponse
• SimilartoinformaMonretrieval:ratherthanmatchingtheuser’s“query”toadocument,wearemappingtoonetotwosentences
• Wetakeintoaccountcertainstopwordssuchas“you”,“I”,and“because”thatmaybeimportanttothesemanMcsofthesentence
• ThesystemranksrelevantsentencesbasedonaprobabilisMcfuncMonandselectsthehighestone
ОбразецзаголовкаSentenceGenera+on[5]
• ChatbotsshouldkeepacopyoftheconversaMoninmemory
• PreventsthechatbotfromrepeaMngthesameresponseiftheusersendsinthesameinputmulMpleMmes
• Feedbackbasedupon– Relevanceofresponsetouserinput– SyntacMcalandsemanMccorrectness
ОбразецзаголовкаSentenceGenera+on[5]
• Whataboutsentencesthatarenotinthesystem’sdatabase?
• OnemethodtosolvethisusesageneMcalgorithmtocrossoverexisMngsentencestoproduceanewresponse
• Toimplementthis,wecanusetheconceptoflargestcommonpaRern
• LCP(s,t)=(p1,p2,…,pn)wheren=1andp1=Ø OR
• LCP(s,t)=(p1,p2,...,pn)whereforevery1≤i≤n,pi≠Øandsandtaresentences:– s=s1p1s2p2…snpn– T=t1p1t2p2...tnpn
ОбразецзаголовкаSentenceGenera+on[5]
• s★,t★=firstwordofeachsentence• s\s★,t\t★=eachsentencewithoutthefirstwordAuerfindingtheLCP,wecandefinethecomplementvectorofeachsentence:• Inds=(s1,s2,…,sn)• Indt=(t1,t2,...,tn)
ОбразецзаголовкаSentenceGenera+onExample[5]
• s=Chatbotscansimplifymanytasksforyou• t=Icanfinishmanyassignmentsforschooltoday• LCP(s,t)=(can,many,for)• Inds=(Chatbots,simplify,tasks,you)• Indt=(I,finish,assignments,schooltoday)Assumewerandomlydecidetoswapgenes2and3:• Child1=Chatbotscanfinishmanyassignmentsforyou• Child2=IcansimplifymanytasksforschooltodayItispossiblythatageneratedsentenceisnotsyntacMcallyorsemanMcallycorrect.
ОбразецзаголовкаEvalua+ngAChatbot’sPerformance[6]
• Evaluatedbasedonsimilaritytofluent,humanconversaMon
• Turingtest– JudgeschatwithmulMplechatbotsandscorethemintheirabilitytosimulateahuman’snaturallanguage
• However,“naturalness”issubjecMve• ImportanttotakeintoaccountquanMtaMvedatatomeasureefficiency
ОбразецзаголовкаEvalua+onMetrics[6]
• QuanMtaMve– Timetodevelopresponse– Time/numberofinteracMonstocompleteuser’stask– Numberofre-prompts– Numberofirrelevantsystemresponses
• QualitaMve– Naturalness– Clarity– Friendliness– UsersaMsfacMon
ОбразецзаголовкаLimita+onstoChatbots
• ChatbotsrequireahighcomputaMonalcomplexitytofuncMonefficiently
• LanguageshavemulMpledialectsandvaryingsentencestructuresthatmakeitdifficultforchatbotstoproperlyunderstandtheuser
• ChatbotshavedifficultyansweringabstractquesMons
• Chatbotscannoteasilyrecognizehumorandsarcasm
ОбразецзаголовкаTheFutureofChatbots
• Thepopularityofchatbotsisrapidlyrising• BusinessesinvariousindustriesarestarMngto
implementchatbotstomaketheirservicesmoreseamlessfortheuser
• UsersratherhaveaconversaMonthanclickbuwonsandfilloutforms
• Theywillbeusedtosimplifyonlineprocesses:everythingfromsimulaMngcustomerservicerepresentaMvestohelpingyouorderfood
• NochatbothasuncontroversiallypassedtheTuringtestyet
ОбразецзаголовкаDeepLearning:TheFuture
• DeepLearningisabranchofmachinelearningbasedonasetofalgorithmsthatawempttomodelhigh-levelabstracMonsindatabyusingmulMpleprocessinglayers
ModelsofDeepLearning• Retrieval-basedmodels(easier)
– UsearepositoryofpredefinedresponsesandsomekindofheurisMctopickanappropriateresponsebasedontheinputandcontext
– TheheurisMccouldbeassimpleasarule-basedexpressionmatch,orascomplexasanensembleofmachinelearningclassifiers
– Don’tgenerateanynewtext,theyjustpickaresponsefromafixedset• Genera+vemodels(harder)
– Don’trelyonpre-definedresponses– Generatenewresponsesfromscratch– BasedonmachinetranslaMontechniques;insteadoftranslaMngfromonelanguage
toanother,we“translate”fromaninputtoanoutput
ОбразецзаголовкаCita+ons
[1]:Chatbots:AretheyReallyUseful?hwp://media.dwds.de/jlcl/2007_Heu1/Bayan_Abu-Shawar_and_Eric_Atwell.pdf[2]:NaturalLanguageProcessingforInforma=onRetrieval:the=meisripe(again)hwps://www.ischool.utexas.edu/~ml/papers/lease-pikm07.pdf[3]:Approachestonaturallanguagediscourseprocessinghwp://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.461.5136&rep=rep1&type=pdf[4]:ASurveyofOntologyLearningProcedureshwp://up.informaMk.rwth-aachen.de/PublicaMons/CEUR-WS/Vol-427/paper2.pdf[5]:Evolu=onarySentenceBuildingforChaGerbotshwp://www.cs.iusb.edu/~danav/papers/dv_evchat.pdf[6]:TowardsaMethodForEvalua=ngNaturalnessinConversa=onalDialogSystemshwps://pdfs.semanMcscholar.org/6cf7/3d4998383938b3a6d12acb89a11e8a84a77b.pdf