Rasa Livecoding: Custom entities with Duckling

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so it would help if the mic were on that would definitely help us get sound out i have one of my lights off honestly i think it looks okay we're gonna run with it hi welcome to live coding with me rachel today we're going to work with haskell haskell h-a-s-k-e-l-l it's a language we're not actually going to touch it but we will be working with things built in it and those things is duckling so i'm just going to wait a second and make sure everything is good to go with my streams how y'all doing hopefully good all right looks like we've been on twitch how's youtube always takes longer looks great actually i don't know i kind of like this lighting setup when you'll think you don't have to have opinions on it but if you do uh hi faison right duckling what is duckling first of all i should have pulled up there [Music] i should have pulled that up first but i didn't because i'm zero brain right now um so one pretty common question i get is hey i want to extract something from text like a date or an http or a url or an email or a credit card number or something that tends to have the same format every time so pin code for example or or postcode in um other places uh and i recommend and we recommend it raza in general using duckling to do this so duckling scroll in so you all can see um says i still couldn't learn i hope you make it easy easy as possible that's my hope it's um i've been working on a tutorial and just making very little progress not because it's hard because brain bad i've got a you know you know when you have a process running that's taking up all of your ran and you're like i'm i can't quit it it's just got to finish running that's where i am right now um so duckling is a library in pascal haskell pascal um that really efficiently and really predictably will extract entities of certain types so date time addresses um anything where you might be tempted to write a regular expression to do it on your own um you can write a regular expression in raza but we would recommend first seeing if duckling will handle it uh dickshot says can i extract certain strings yes but there's sort of a limited number of classes of things that are built in and you're going to need to do a little bit of futsang if you want something a little bit outside of the the domain that they do um so it's closure oh my god it's closure i thought it was a haskell wow okay um i was wrong with that we're getting closer uh a language i have never touched and one time got an interview question on for a technical interview for a job that had nothing to do with closure i'm still salty about that by the way i it was a bad interview and uh i blame the interviewer um good news i'm not gonna be able to focus very good uh so if you have specific entities that you're looking for that you can provide examples of that perhaps are related to each other in meaning you can do that right in raza by providing um entity examples in your training data in your nlu data um but for a specific class of things duckling is going to be a better choice and that specific class of things includes i got a list in here uh time temperature numbers ordinals distance volume amount of money duration email url and phone number um so basically things where it's going to be written in a relatively limited number of formats more or less uh says ross responds on live sessions thanks oh you're welcome i've tried to um sometimes i get distracted and it takes a while uh hi ravi and if you have more general questions than what we're working on in the um in the live coding on any given day uh starting next wednesday we're gonna be having um office hours on wednesday so it'll be me at least for the first little bit somebody else from the rasa team uh come with your questions and we'll help you out and that's the whole point of the thing for a whole hour it's just answering questions so it'll be wednesday at this time slot uh yep so of course you could write you know a set of regular expressions that would be able to handle common phone number formats but why regular sessions are really hard to debug someone else has already done it for you there's no no call to do that right you do not have to uh so lots and lots of uh discussion uh this is developed by whit ai which is a company that was acquired by facebook so if you look up the duckling repository on github i believe it is now uh part of facebook yep so it's part of facebook archive um yeah and then oh it's been deprecated in favor of this one that's good to know okay i i was like i lost my mind i could have sworn i was in haskell okay so the original version was enclosure the current version that's currently being maintained is in haskell and i'm assuming this is the one that we are using in raza by default um gentleman says i'm here numbers today so duckling is what you would use to extract numbers um so part way there i don't know that we're going to get all the way there but yes we're working towards it uh masterclass class for 2.0 not soon uh but we definitely um yeah there do need to be some some stuff we recorded for for the master class because right now it's really focused on 1.0 which is fairly different i'm gonna am i going to use docker i'm probably just going to run it locally today uh can we extract emails and validate them to check if they really exist or not that's a great question so you would use duckling to extract the entities and then you probably want to run a uh a custom action that does some sort of data validation so um looking it up in a database would be one way of doing that and i have kind of a simple example in the project that we were working on for a while the dialogue dialect quiz bot which i have on my my github where you i had a database it was just like a dictionary that i entered by hand in my actions dot pi file um and then i i just looked up if it was if it was there or not but obviously you could use a database or something else um and also don't store emails as plain text in your python code um unless it's like example example.com or something that you're just using for debugging all right okay that's nothing nobody says that um yeah and then this one it looks like pretty much the same uh uh same things that it extracts uh and also you can see that it extracts not just the value but also information about the um you know about the thing that it has exported like the unit uh this is a credit card number and is saying hey it's from visa so um and we're gonna be working in english today ducking does support other languages and uh oh this is a list of um uh iso codes all right so abbreviations like this one spanish this one's english uh this one's german this one's don't know don't know that one off the top of my head french um hungarian maybe guessing that's hindi i could be wrong um anyway so more languages are exported and you can uh dig into that a little bit more but we are going to uh add it to our current um current project which is basically about to automate answering some of the questions i tend to get pretty often um so one of the questions i get is um do you have a live stream today or something like that so i was thinking what we could do is we could um handle the time component and uh figure out what today is and then have a um a little bit of python code that checks if i have a live stream today so that is the point that we're going to be doing um martinez says can you extract multiple entities from a single user statement using duckling yes and they are not going to be ordered and i believe we talk about that in the docs uh robbie says closure in high school in my first languages i would say that that's for people who are learning programming right now a fairly unusual selection of things um back in the day so like i want to say in the 90s or early 2000s the audience it was pretty common for most nlp to be done in perl um so a lot of people who've been in nlp for a while their first language was was pearl if nlp was what got them into programming in the first place um coffee warn you right now i'm gonna be all over the place today okay uh haskell r is a fantastic package for using haskell and r i'm guessing let's bring the docs back wow uh so first things first we're gonna need to uh include this in our pipeline right so at some point we're going to be able to say like hey we want to use duckling in here um and i believe we just pop it in in our uh in our pipeline and i don't know that it's gonna work well with diet so let's just first see if we can use that and then see how it goes i don't believe i don't believe technique i don't believe text needs to be tokenized before it goes into uh into duckling uh let's just give that a copy paste it in here and see if it gives a big okay so right now we have the diet classifier that does uh intent detection and i think i want uh the duckling entities to be extracted before that do i know that this is gonna work absolutely not have i been trying to work on it for the last day yep how did that go real bad real real bad oh right okay first step let's actually make sure that we are in the directory where our assistant is so i'm doing now is i'm just um seeing if i can retrain my model and if i get uh an error when i do that because of the way that i've put it into my config file mmm domain i messed up how did i miss them value none is not addict all right i believe i need to specify more about duckling um validate please make sure the file is correct in all mandatory parameters specified all of these errors blah blah blah value none is not addict value path slash slot so i do believe i need to add additional information about what the duckling classifier is actually going to be looking for um and specifically i want dates is what i'm going to be looking for now output undies requires nothing okay output example so this is what the uh thing will look like i need to run a duckling server that should be fine if you specify both number and time configuration all right all right here we go um so in my pipeline leaving the inventions open specified we'll extract all okay so i think this actually needs to go first maybe let's get rid of this here because the duckling so a lot of things like diet rely on having the text broken into tokens first like broken down into words in a language like english usually but i don't need anything to be tokenized or anything i am just for the duckling portion of this for the duckling portion of this i am just um interested in the raw text is what i was trying to say there all right uh so the only thing i well let's let's leave number in we might try and do i know uh uh harzone has been asking about numbers for so long and being so patient so we'll leave that in and we might do it for a little bit and then uh english i'm gonna guess that it should be en us like u.s english but we'll find out if that's wrong actually by default the language is used do i know that people are going to be using dates in the english way i do not so i'm just actually get rid of that uh so i'm gonna say us specific i don't think this is gonna work i don't i do not know okay so i don't need to specify the language because it's going to be i don't need to specify the locale because it can be taken by from the language um i do need to specify time zone because the time zone that the events are happening in is specific so my current time zone uh and i don't think that this is gonna work out and then timeout is blah blah blah is how long it will keep asking for stuff and i'm gonna pop that down to one um so first let's fix the spacing issues and then let's check the time zone syntax because i'm almost positive that's not right i'm just straight up guessing uh duckling time zone duck like time zone that should be enough nope this is all about ducks like actual like ducks okay that's not it uh tucking time zone syntax maybe it might be in the um the eye um this one so let's try that in oh no this is this is all closure um started first okay [Music] standing maybe i don't know that this is even the right version to be honest i'm just trying to see if i can find an example of what the time zones look like um [Music] i don't care about any of this oh all right not super helpful uh so oh wait i need to have it open here uh let's see if we can find anything in here about um the time zones extending standard locale license vsd setting up your haskell environment [Music] good queue wheel um uh says how do you know the right order of policies in the pipeline any trick there um so oh i guess i do need the second light that's what's stopping the shadow from showing up uh i'm gonna turn the light on but i'm gonna keep talking so the um some things require being in a specific order right so if a uh it's much less dramatic but also you can't see the shadow behind me um so some things require being in a specific order right so something that requires the input to be tokenized has to come after a tokenizer and it has to come after the tokenizer that it expects and which tokenizer which model expects is you just look that up um and it does have to be the same or you'll run into dimension mismatch errors usually is a common one um or you'll get results out but it'll just be completely nonsensical um yep so just knowing about the models is really the only the only trick there and for duckling it said it required nothing if you'll remember uh so requires nothing so it can come first because nothing has to happen before it but something like the uh uh spacey tokenizer requires tokens so you have to do oh sorry the crf to the extractor you have to have tokens and you might have dense features so tokens something to create tokens has to come before the um the crf entity extractor in the pipeline if that makes sense you can start the server including dimensions yeah so i just want to make sure that the syntax of my pipeline is right so the stuff i get out of my extractor once the servers run is you know right uh how's benson he's good he's probably sleeping now he just came back from his walk a little bit ago uh david says why do you specify the entity recognizer before the tokenizer um i don't need uh tokens for um for duckling it just works on like the raw text string input um and my worry is that if i do my tokenization first it's going to be harder to extract the correct entities because it expects that raw user input i could be doing it wrong we'll find out together all right so you know what i i don't think i actually need to set the time zone right now so let's just get rid of that rather than trying to look it up because it's taking me um it's taking me too long i'm getting distracted all right just let's do make sure that our uh um spacing is correct that looks right right yep i think that's right okay so now let's try to train again and see if it works and we shouldn't need a server running to train um this is basically i'm just training here to check for syntax errors because nothing right now that we're using actually uh requires it all right what do i do please make sure the file is correct and all majority parameters are specified oh the errors in domain not config at all all right um what i do responses so i'm basically just going through what i'm checking um okay okay that's raza i'm just looking for um typos and errors in [Music] is this right value none is not a dick value path slots okay i think because i don't have any slots i should just remove that let's see if we can train now i think that's what the error is but let's find out it's taking a little bit longer a okay excellent um says uh is the entity recognized that you used unsupervised uh so i believe duckling is rule-based right so people have gone through and built the rules by hand to do it um which again you could do yourself but why someone else has done the work and is maintaining it so use the existing resource um it's more efficient uh which entity extractor is the best in terms of performance defining your crf for uh how you increase transformers etc and what situation do you decide which one to use so duckling is used for a very narrow set of things like dates and numbers which is what we're doing now urls emails things like that for entities that you are looking for um uh specifically in raza i would actually recommend diet which is our current recommendation and i believe currently only english is supported so if you're working with english and that's actually a multi-task model that extracts both the entities and the intents together um so that's our our current recommendation that was developed by our research team it's pretty robust it works pretty well we're happy with it um crf is um you know perfectly fine uh maybe not going to have quite as good performance and then for hugging face transformers if you are using a model that's based if you're using a model from that library you want to use the entity extractor from that library as well so that they like the expectations of what the model needs to run or i don't know whatever it is that you're using it for are are met basically so if you start using one library or one pipeline you should keep using that library or pipeline if there are dependencies between the components if that makes sense uh uh david the problems with slots yet i did eventually figure it out uh yep and i would say in general yeah duckling is for a specific set of things that we talked about and then crf is more um more general but yeah if you can use diet um give it a shot it's been working pretty well in pretty much every project i've tried it on i will say i'm predominantly an english speaker my most fluent second language is not written or spoken which does make it a little bit rough uh to do chat bots um but i've had really good success with diet so i recommend it and vincent also has a bunch of algorithm whiteboards so go into a lot more detail about what diet is and what it does all right so um we should now be able to first let's run the dockling server uh which the code for that is in here uh is the there we go here's the um code for running duckling oh i should say we are using docker to answer phases question but we run using it locally um and i have installed docker previously and it's it took a while um if you're doing it on windows just just use their executable it's genuinely the easiest way invalid reference format or is already allocated all right one sec i'm gonna poke around in stuff that i'm doing right now but also i want my thing to look good hi i'm gonna use this one instead doesn't say what i think it says hmm should work um where's already new support is not in use invalid publish ops format should be named by you at logos all right this was working yesterday so i'm excited to see that we're getting uh fun new results big fan of that i'm not um i think i also have duckling installed locally so let's say running [Music] duckling locally that might work as well [Music] how to raise ducklings a step-by-step guide that's not what i want all right pull this up two years ago i'll have the slides once they're done i don't think they're done uh that's okay we've all been guilty okay fascinating can you all hear me now hopefully talk talk talk well uh we'll find out um anyway what i was saying is i could build some somebody could do build something to do this um but don't you have you've got better things to do with your life someone else has already done it just be efficient right um and and use the existing thing um yeah so i think the whole thing where i was talking about like hey look at the entities we've extracted um nobody saw and heard any of that but we extracted some entities so like just from this text i don't have any slots so i haven't set anything but i do have this um all right the the information has been extracted i'm not saving it or doing anything with it but i have identified it right uh we couldn't hear me for 10 minutes no i'm sorry y'all um i had i noticed that i had two audio inputs and i turned off the wrong one sorry okay um yeah so that's what i was just saying is like hey we can you know also a lot of that was just me trying to figure out what the command was to just launch the nlu part and it is raza shell nlu and i just had to figure that out sorry about that well that's how duckling works um let's handle these slots so better better okay fantastic um so i want to do something with day and i also need to find my tab with all the documentation and i think i've just lost it so to pop this up yep okay so the one we're using is uh haskell supported dimensions custom dimensions oh so if you wanted to do uh your own you could also do that like so and um add additional like rules and stuff to extract something more particular um also uh duckling will be a little bit faster than something like hrf um is my gut instinct that i have no evidence for but it feels right right um these rule-based systems tend to be faster to run at inference time just because they're doing fewer things uh extending that add a new locale definitely debug well that's not what i was looking for let's pull that back over here all right step one spell raza and duckling correct there we go okay we're back in the components page uh 2.0 which is the version that we're using so i'm wondering right if germanizer tokenizers futurizers dries our featurizer entities futurizer classifiers all that classifiers there we go okay nope that's the fallback classifier where's duckling why am i so tired i know why i'm tired i know exactly why i'm tired uh intense entity there we go uh all right so it outputs entities how how do i get them there's nutrients those distract full dimensions yeah okay fantastic so my question that is not being answered on this particular page and the uh the docs were rewritten pretty substantially with a 2.0 update so stuff that was in one place is no longer in that place um is being saved in slots i don't think they are so let me add something uh uh graph says uh if you cast your voice i did not record it locally um so there's just going to be a silent spot in the middle of this sorry um vascular says how much documentation is there and there's a box a lot we try to have very thorough documentation so you have you know a lot to answer your questions and also it's a really fully featured library like one of the things that we hope with raza is that it's really flexible and it can answer you know a lot of different use cases and um that you can really extend it and you know help build it and make it your own and it's open source so if you make contributions those are added in and then documented um so yeah it's like building a simple bot is very simple but you can really go as complex as you need to and we want to make sure that people have the ability to um you know know things um martina says is spacey or duckling better in terms of entity extracting they do different things um well spacey does some of that sort of like templatic stuff as well um i would say the species probably gonna be a little bit slower for things like like dates um just because python tends to be a little bit slower than haskell or closure because it's you know python was designed to be easy to learn and not necessarily the fastest possible language and in general older programming languages and things written in older programming languages run faster and are harder to use as a human being with eyes it's just sort of the very general trend and again i have no evidence that uh duckling is faster than spacey that i know of on top of my head but it feels it feels right my intuition uh david says if i just have to use the entity extractor in the intent classifier i would suggest to use a blank or existing language model which should be the approximate size my data set in either case um if you have quite a bit of data i would say train your own language model quite a bit is going to depend on how diverse your you know target case is if people are only gonna say like three things um and they're gonna say those things in like a relatively similar way every time you don't need that much data if people are going to say you know 100 different things and each thing they could say in a wildly different way then you need a lot more data because it's a lot more uncertain basically it's just sort of like a general nlu nlp principle um i would say in general when you're first prototyping start with a pre-trained language model if one is available for a language that you are working with because you're going to be able to get it up and running faster and then later on once it's a little bit more established you can try training your own language model especially once you have user data unless you have a very narrow domain and very few classes and a general language model is giving you weird results broadly yeah but how much training data you need is a function of how complex your question is right so if i want to approximate a function and it's a circle i don't need that many points to figure out oh it's a circle if i'm trying to approximate a function that's like the outline of a stegosaur i need a lot more points to figure out oh it's a sega store and then you know interpolate where the the missing pieces might be does that make sense hopefully that makes sense yeah okay so i think i need to save this as a slot um can i just have a slot day will that work let's try that let's see if just having a slot day will work and i think the number slot was just called number um let's give this a shot and see if it works control c there we go okay um so let's retrain real quick let's retrain except there's a space between raza and train rosita um let's retrain except we spell it right oh i saw like a small clip of like a dolly parton music video for her christmas album that's coming out this morning and i just like started sobbing oh great uh day number's not a validate value paths lots mmm do slots have to be in quotes potentially uh individually thanks um yeah welcome i hope that was helpful wow myself and my teeth okay um let's look up an example i think that's going to be the easiest thing uh so domain and go back to the docs and it is ctrl k there we go ah okay yeah so i have uh royally messed up the syntax so let's try this oh one more time um can i slot types so i'm looking to see if there's a slot type that is specifically for duckling because we we change the way that we do slots um with 2.0 or 2.0x i should say 2.2 plus 2 forward categorical slot float list any custom [Music] unfuturized or deprecated autofill if you're an only model fixman entity and your domain contains this lot with the same name as the entity type the slot will be set automatically with the entity value in this case you don't have two slots let's try to sorry enables me okay so we should be able to just say domain contains a slot with the same name as entity type in this case you don't need to include the thought of subprimes automatically okay uh okay so should you just be able to say uh i'm just gonna say any slots of type n are always ignored during conversations the property influence conversation cannot be set to 2 for this slot type you want to use a custom data structure which should influence the compensation use a custom slot type i don't think any of my slots are going to influence the con so the date won't influence the conversation but the number will so the date can be any but uh so the date can be any but number cannot be because number is going to influence the conversation because we're going to use it to pick the next turn of the conversation uh date it was called day yeah let's see let's go up to where we were doing it that's not it all right entity start end text day value confidence values green day type value and okay so it's called time uh so let's just call this time time there we go and then i'm looking for the number entity number all right number okay so number is going to be i believe we only have an option for float so i'm going to call it a float but know that it will only be not floats uh what was the type yeah i don't think we had integer as a type any influence conversation list used for storing real numbers categorical stories lost which can take one of n values lean true false okay so what i'm thinking about here i'm just walking through my thoughts uh boolean doesn't make sense because you're going to have more than two options right for our numbers uh floats we can give like a maximum minimum and it's gonna it will store it as a float and not a numeral but i think that's okay because we can just say yeah yeah i think we want to do floats because they are numbers um the other option we could have is categorical um where it's gonna be one of these options that we have one of these values um but i think that would be better for if we had it like option one option two option three as opposed to the numbers being one two three um so i wanna make sure that numbers are still numbers even though i don't wanna do math to them i might change my mind and go back and make it categorical in the future we'll find out but maybe all right typefloat uh and then we had to put the min in the max right uh so i'm gonna say that we're gonna have like three options to start with so i'm gonna have our min actually be zero and then our max be three and i think that at any number above three is going to be mapped to three and i think i'm going to have an error here because i put those in as integers and not floats but we'll find out all right let's try training again my u configuration did not change sure didn't uh how do we interact with a deployed bot on k3s using a custom channel i have not worked with k3s i would ask about that on the forums or search in the docs and see if you can find something martina says is there a limit on the number of entities the duckling can extract from a single user statement uh no um can you show how to extract multiple entities using duckling from a single statement yeah so let's um that's a good question raza and i also want to know what the nlu is up to um wait for that to open so it will it will extract multiple entities um and i believe isn't json so i want three mangoes today so three should be extracted as a number and today should be extracted as a date all right so uh entities we have the number entity that's been extracted and the date entity that's been extracted um and i could um uh do that and let's all today and tomorrow so today and tomorrow are both dates and those should both be extracted um so we've got you know the seventh which is tomorrow we have the sixth which is today and then we have the um number here and what was the second part of your question multiple entities using yeah so you just they're all extracted um by by default duckling is going to find everything that you everything that i can find it will find right now it's only looking for numbers and dates because that's what i've specified in my config file by default it's going to look for all of the things it can possibly get so it's going to get urls it's going to get emails it's going to get credit card numbers it's going to get phone numbers it's going to get dates it's going to get times all of that together and it just does it by default because presumably if you're using ducklings because you need uh you you need the entities ctrl c to close that so let's let's try and do the thing where we get the um press one to ask enter one to ask about raza and two two about angle so what i'm going to do is i'm going to have this option uh where people can enter numbers and then i'll give the uh the response to that so um let's close you and we're going to need a rule for this so right now we just have an faq rule and i'm going to add a new one which i'm going to call um option one steps uh so action utter greek because that's the one where we are often options um and then entity oh i don't think this is right um let's look up the numbers uh docs and rules are new in 2.0 pop that open i would like an example please okay okay so we can set a uh lot was set uh is what we should do here so also let's add an intent that's just adding in a number so [Music] wait do we have an inform intent general inform intent yeah let's do that um so what i'm doing here is i'm adding some examples in the inform intent that is hey um i'm entering just a number so i'm gonna also add one and i don't need to specify that these are entities that duckling should extract because duckling is automatically doing that to all text that's coming in okay so save that we're gonna have to retrain but we knew that already uh so back to our rules so now that should be identified as the intent in form why can't i mouse good point intent in form okay so somebody asks is like hey and form and then also we have set the slot um and then condition that and the slot we called number possible information you can include in your under condition include slot with set and active user invent false rules and forms okay so i think it's just going to be hey is there information here but i want it to be exactly equal to something that's not how you suppose a lot even a little bit uh all right so and then we're going to take action utter back to our domain so one is to ask about raza ask rasa we're going to order this i don't think this is going to work uh but hopefully it will break in an informative way let's give this a shot i think we've saved everything so let's retrain i love to just like up arrow past all my typos being like oh that's wrong ooh that's wrong that's wrong too all right we made him whoopsie um but found block start sequence builder ready all right i got rules okay check abs okay so i'm just uh pulling up the docs again uh it says how are rules different from stories so rules will always occur in the order that you um specify them so rules are inflexible stories are more flexible and they're more training data for your um the ways that the conversation can go and using the memoization policy if folks are always following the exact path of the story then the story will continue to unfold but people can say different things and get different intents identified and what's already existing in the story can still be used to figure out what to say next to have a successful conversation rules will always be executed precisely the way that they are written um in general you want to use stories more than rules and only use rules for things like this one where you have a specific thing you always want to happen when the user does something all right how have i messed up i think i've spelled slot with set correctly uh rosa rule check slats value right to the forums uh 21 days that might be a little bit out of us that was up for any value you can put the rules for whatever you can put in stories it's essentially the same format if it works in stories it'll work exactly the same way in rules okay gotcha that's helpful so we can use the same syntax that we can use in stories so raza story slot set value hey bud enrique says with or without the dash in slot was set i'm pretty sure it's with the dash you'll be wrong on that though okay no that's right okay oh you mean the dash under slot was set maybe i feel like here we are in story so this is a stories example and the uh what i just got from that was that the what can i do maybe like it's gone forever i don't think that's going to work either but it might all right let's find out i think we're going to get an error here yep okay entities were detained not a list value passed rules one condition okay value to fail please make sure the file is correct okay so this looks correct and the problem is here with the formatting of the number so so it'd be great if i could have all of the tabs that are underneath my uh there we go that's what i wanted back uh okay [Music] entities cuisine spanish e-n-t-i-t-i-e-s yeah edition this should be under intent if the syntax is supposed to be exactly the same okay so i don't actually need a condition i just need to hey if we have an intent here and then this needs to be lined up with that and then that needs to be lined up with that hey rachel how do you feel about yaml that's fine oh i didn't i didn't erase the wrong thing okay peace out so i'm hoping that what this will work because it's saying hey um if these things occur in this order and there's an intent and form with this uh entity the numbers extracted does it work this is hopeful this is a good progress some water okay amazon says numbers are complicated numbers are complicated not as complicated as words though all right let's see if this works hey rachel couldn't you use um rasa x for this sure could absolutely i could i just don't want to deal with another uh i don't want to deal with another window okay okay okay okay we're doing good we're doing great uh it works we do have a little warning here which is interpreter personality number which is not defined in the domain so i believe i haven't defined it under entities actually i don't have any entities so i should probably probably add those huh um let me just look it up in the docs i'm happy though this is big progress p-n-t-i-t-i yes a domain let's try that yeah it is just entities and then the names the entities so i have these slots time and number that i don't have in my domain and i think when i retrain here and t-i-t-i-s uh i'm gonna get an error that's like there's no training examples for these ones and that'll be fine there aren't uh it's because ducklings handling them and we don't need to provide the training examples for that all right so save that close that control c guess what we're training again didn't need to retrain the nlu click update of the core should i be testing every time i train yeah probably not all right not right now rather let's give this one more shot and i think we should handle that warning and it should work and i finally answered your questions on like i don't know a month after you asked it the first time two will be nothing yup fantastic um okay so let's add the the one for kaggle just real quick uh just as an example so option one i dropped my mouse oh no it got tangled there we go i have my mouse back uh option one and we're gonna add a new one about kaggle so we could use this for anyone so you could just extend this to continue to ask questions um and at this point i should probably um put this on my github uh publicly so you all can see it uh because i know this is something you're interested in in particular so this is how we can um add additional options based on the number and then if i wanted to add buttons i could do that maybe that's what we'll do next friday um so i think that's plenty uh i hope you all are are holding it together a little better than me right now um so today we found out that i have a week old duckling server that's still running um so that's good and we added um duckling entity extracting extraction to our assistant um so that we can get dates and eventually we'll do something with the dates um and also the numbers so that we can enter numbers as like a multiple choice what to do next um with our with our assistant and um because we're doing this using a rule it will always if you know the intent is in form and the entity extracted is the number two it will always always always do this um whereas if this was a story and uh it's a little bit more flexible so there might be instances where the intent was in form and two is extracted but like something else was also extracted that um changed the course of the conversation right um and that's the just a big rule difference between rules and stories is that rules are not as flexible uh yeah enrique says how do you train so fast i mean i have a so two big things so one my model is already trained right um so i'm just updating it and by default if we don't need to update the whole thing we won't just be efficient um that's one two i have a very small model so if you look at my domain uh there's just not a whole lot going on on this assistant right now right it's like 40 lines total um including the version information uh my other the chatbot assistant took longer to train because it just had more things in it and it was doing more things um so that's part of it also this computer uh the computer that i stream from is you know fairly solid it was designed for live streaming coding particularly so it can handle this sort of task fairly well um i think the biggest thing that's contributing to my model training quickly is that it's just small right it just doesn't have a lot of moving parts uh and faces like do i have a tutorial for callback intent when uh i don't have anything to say not just at the moment but uh something that we could do [Music] in the future at some point but you would just do it as a rule right if um if you had a specific thing that you were wanting to use i don't know hopefully that made sense all right thanks for joining everybody i'm calling it because i'm dying squirtle i'm not i'm i'm fine that is just um an internet joke um yeah have a great weekend take care of yourselves uh i will be back on wednesday the 11th uh for the first office hours so if you have questions about like especially deployment uh how do you do different stuff we will be talking about it there whole hour just answering questions um on thursday we're gonna be doing a paper reading group i don't know what paper's gonna be yet i have a list um a few recommendations also feel free to feel free to hit me up with those and then on friday we'll be continuing with live coding i don't know what we'll do maybe buttons we'll see something we'll do something um and i will see you then so have a great weekend take care of yourself stay safe stay healthy and i'll talk to you live next wednesday all right talk to you then bye
Info
Channel: Rasa
Views: 2,695
Rating: undefined out of 5
Keywords:
Id: mNbZ-61035M
Channel Id: undefined
Length: 73min 3sec (4383 seconds)
Published: Fri Nov 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.