1 / 7

Nikhil Malhotra : HARNESSING THE POWER OF NLP

Discover how Nikhil Malhotra is leveraging the full potential of Natural Language Processing (NLP) to transform businesses.

Download Presentation

Nikhil Malhotra : HARNESSING THE POWER OF NLP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NikhilMalhotra:HARNESSINGTHE POWEROFNLP • IfthelastdecadewasthedecadeofvisionbasedA.I., this decadewould bethedecadeofconversationalAI.Conversationandtheabilitytohaveadiverselanguagesettocommunicateisoneofthosetraitsthat distinguishhumansfromtherestoftheanimalworld.Weareseeingan avatar,previouslyunknownandun-fathomed.WhenChatGPTbecame alive,peoplesawthepowerofgenerativeAIandmodellingforthefirst time. • Naturallanguageisaverbose,sometimesunformed,nongrammatical, andoftennon-specificlanguageusedforgeneralcommunications amongsthumanbeings. • Weusethisformattocommunicatewithothers,butwealsousethe sametoformulatethoughtsinourhead.FormalLanguagesincontrast arestrictunchanginglanguages,likesthosewehaveallreadin schools, viz.chemistry,mathematics,etc.Asimplecomparisonbetweenthetwo isdrawnhere: • FormalLanguages • Strict,Unchangingrules • ApplicaonspecificlikeMathsandChemistry • Noambiguit • Canbeparsedbyregularexpressions • Inflexible:nonewterms • NaturalLanguages • Flexible,evolvinglanguage • Unspecificandused inmanydomainsandapplications • Redundantandverbose • Expressiveandambiguous

  2. Difficulttoparse • Veryflexible • Ithasbeenatrystamongstthecomputingcommunitytounderstand language.Oneofthefirstrealattemptsthatwasmadewastoconsidera languageasaformulationofsymbolsandthesesymbolsconveycertain things,whichenablethoughts.AnexampleiswhenIusedtheterm “CRAB”.Almostinstantaneously,weknowwhatthismeans.The symbolcrabisacombinationofasoundandthevisualimagerythatyou getwhenyouhearthisword. IfIsaytheterm“Kavouras”,mostnon-Greekspeakerswouldhaveno ideawhatIamreferringtohere.Itwouldappearastheneuronfiringhas suddenlystoppedasthelanguageisunknowntothespeaker. “Kavouras”isacrabinGreek,andsincethehumanbrainhasnotseenor heardthatsymbol,thisappearstobeawordoutofcontext.Thiswasthe primaryreasonwhyearlypractitionersconsideredlanguageameansof recognizingsymbols,athoughtprocesswhichhadtobediscardedfor naturallanguageprocessingtoevolve. Machinesdonotunderstandtextashumansdo,sothestartoftheNLP wasreallyencodingtextinaformatthatamachinecanunderstand. Machineshoweverdounderstandnumbers,sothestartofNLPwasto converttextinsomeformatofnumbers. Wecanunderstandthisbetterusingasentence.Letussaythesentence thatthemachineistryingtounderstandis:“Theanimalcrossedthestreet.”

  3. Thesentenceaboveisbrokendownusingwordsastokens.Let’stake thefirstwordwhichis“The”.Theprocessistofind“The”inour list/databaseofvocabularyandformulateavectorforthesame.Letus assumetheword“The”comesatposition4137andthetotalnumberof uniquewordsinourvocabularyare30,000sothefinalvectorarray wouldlooklike: [Position:4137] [0,0,……………………………………….1, 0,…………………………..] Bynow,mostofyouwouldhaverealizedthatposition4137has1and therestofthe30,000elementsinvectorare0whichgivesthisthename asone-hotencodingvector.Thistechniqueallowsustoprovidea significantmeaningtothewordwith1beinginthepositionbasedon vocabulary Itwassoonfoundoutthatalthoughone-hotencodingvectorworks, therearechallengeswhensomeonewishestofinddifferencesor similaritiesbetweensimilarkindoftexts.Iwouldusecanexampleofa pairofsentenceshere. “Iwishtogotothehotel”and“Iwishtogotothemotel” Theyareverysimilarin theirsemanticmeaning,astheintentdelivered bythissentenceisapersontryingtogotoalocationtostay.The challengeisthatwithone-hotencodingvector,it’sdifficulttofindthe semanticmeaning. Whenthesetwosentenceswouldthusbecompared,theywouldappear markedlydifferent.Thisgaveriseto amechanismto encodewordsas vectors,whichprovidemeaningandcontexttothewordandsentence, leadingtothecreationof aword2vecorwordtovectortechnique. Word2vectakeslargecorpusoftextasitsinputandproducesavector

  4. space,whichusuallyhasseveralhundreddimensions.Eachuniqueword inthecorpusbeingassignedacorrespondingvectorinthespace. Oncethesewordvectorsandsentencevectorsaremade,itisveryeasy forthesystemtodoanalogicalreasoningofaquestionlike“Kingisto queenasfatheristo?”andtheansweris“mother”becausethevectors closelymatchthespaceofamother. Thevectorsonceformattedenableustodoalot of mathematical analysisonthem.Weusethesevectorstodeterminethesemantic closenessofaquestionaskedbyauserandprovideanswerstotheuser. EarlyWord2VecusagewereFAQchatbots.Someexamplesareas follows: FAQbasedchatbots DocumentparsingandSearch IVRbasedautomatedresponse Music2Vec:Anewconcepthasbeento convertmusic-basedtones intoavectorizedformatakintoword2vec.Thisenablesuserswithin applicationslikeSpotifytofindthenearestbasedsongbasedonanote ofmusic Theword2vecapproachtoldusthatwordsarenolongeranisland,and theycarrycontextwheretheyoccur.Infact,thebasicprincipleof Word2Vectaughtusthosewordsofafeatherflocktogether.For e.g., medicaljournalswouldhavewordsthatarequiterelatedtoeachother andquiteunrelatedtoothertopics.

  5. Thenextprocesswithinnaturallanguageunderstandingwas understandingthewordsequences.Sequencesarethecoreofsentence formationand,hence,thecoreofcommunication.Sequencesallowed youtodothefollowing: • Machinetranslation:Jesuiscontent->Iamhappy • Findingnamedentityrecognitionfromasystem:HarryPotter andHermioneGrangeraregoodfriends. • Generatingmusicfromasinglenote • Generatingwords:SomethinglikeChatGPTdoes • Aspecialclassofalgorithmswasneededforthis.Thiswasdoneusing therecurrentneuralnetwork,asshownbelow.TheadvantagesofRNN overVanillaneuralnetworkswerelargebecauseofthefactthatthey couldmodeltimeinthesequenceofwordsandcouldunderstandthe sequenceofwordsbetter.TheissuethatRNNfacedwasthecontext whenthesentencesbecamelonger.Considerthefollowing paragraph. • Ananimalcametoacity.Thecitywaslargeandcacophonic.The animalwasveryscaredasitsawalargenumberofcars,buildings,and otherfeaturesinthecity.Thecitywassolargethatitfoundthatthe forestappearedsmaller. • TheAgeofTransformers • Thencametheageoftransformers,whichisthecurrentage.ChatGPT asoftodayhasbecomethelatestsurgeandtheposterchildofwhat naturallanguagegenerationcando. • PositivesofChatGPT: • NLG:Forthefirsttime,naturallanguagegeneration,whichmeans thegenerationofsequencesofwordsthataregrammatically correct,hasbeenpossibleusingsomemodelofAI. • FoundationalAI:It’safoundationalmodelthatnotonlydoes conversationalAIbutalsogeneratescodepieces.Bydefinition,

  6. foundationalAImodelshavethecapacitytodomorethana specifictask. • LimitedTransparency:Iwouldnotgooutonalimbandsaythatit • istrulyethicalAI,butittriestodoitspart,asthecreatorsseemto havelearnedfrommistakesmadebyothermodelsinthepast. • LimitationsofChatGPT: • Itdoesn’thavethecontextofanenterprise-basedsystem.Inorder forittoattainso,datafortheenterprisehastobesent.Thisitself bringstwoissueswhichiswhetherenterpriseswouldbewillingto sendtheirconversationsandcontextsonacloud-basedsystem. • ChatGPTisalsoconfidentwhenitiswrong.Thiscanbeamajor barrierforenterprise-basedapplications. • YoucanprofessathoughtthatChatGPTwouldeventuallyagree. Asanexample,let’strywritingastatementabout ChatGPT. • ME:“Isawapinkelephantflying” • CHATGPT:“It'spossiblethatyouexperiencedahallucination. • Seeingapinkelephantisoftenused asasymbolforbeingdrunkor havingconsumedothersubstancesthatcancausehallucinations. • However,ifyouareconcernedaboutyourhealth,it'salwaysa goodideatoconsultwithadoctor.” • ME:“Whatareyousaying.IhaveseenpinkelephantsflyingIam sure” • ChatGPT:“Ifyou'recertainthatyousawapinkelephantflying, • it'spossiblethatyouexperiencedavividimaginationoradream. Seeingthingsthatarenottherecanalsobeasymptomofcertain mentalorneurologicalconditions…” • Asyounotice,asahumanbeing,ifIprofessawrongideabetter, ChatGPTwouldrevertthepushback.NowItriedthisagain: • ME:“Isawapinkelephantflying” • ChatGPT:“It'snotuncommonfor peopletohaveunusualor • imaginativeexperiences,andseeingapinkelephantflyingcould beanexampleofthis…”

  7. Theresponseisdifferent,whichgivestheillusionyouaretalkingtoa realperson,whichyouarenot.Ifallofyoutried thesamesentenceasI have,youwouldseeCHATGPTalternatebetweenthetwo answers, whichindicatesthatthemodelalthoughverygood,hassomedefined datafromwhichitgeneratesitsvalues. Inconclusion,Iwouldsaythatwearejustattheprecipiceofwhat artificialintelligencecando.ChatGPTisjust aninitialmanifestation. Theworldaheadappearstobeaseamlesshandoffbetweenhumansand AI.Wehaveto,however,ensurewehumanshavethekill-switchinour hands.

More Related