NLU - When testing, does every utterance have to match an intent

My gut feeling tells me that you will need some structure in your NLU and much more examples to get something viable. You may wanna give Chatito a try to start!

2 Likes

Chatito is neat. If you like it, you may also be interested in the latest version of Chatette - which is a superset of Chatito.

1 Like

Thanks for the suggestion. We’ve tried it but we’re a little apprehensive about the stuff that comes out of it.

What Chatito does is make random permutations of the words and small utterances you put into it. Therefore you’ll get a lot of ‘nonsense’ sentences like: ‘what is your thankyou name please thank you’? (that one was the best I could come up with from the top of my mind).

This means the bot’ll learn that any random combination of certain words that belong to something you think is an intent will actually be an intent. This can give problems if certain intents share the same words (something that happens a lot in Dutch).

1 Like

@Remy, take a look at Chatette, it allows you to be more nuanced with the rules than Chatito does, and you can force certain combinations to always be present in the output despite the randomisation. If you are careful with your generation rules in Chatette, you can avoid most situations like this. It does take a bit of getting used to.

1 Like

你想要的是是一个默认的值吗?

Uhm, yes? I don’t speak chinese, sorry!

Google translate tells me it’s “What do you want is a default value?” but I don’t know what default value you mean.

I agree that at the beginning one has the feeling that Chatito (or its boosted variant Chatette) does a bit of random stuff. But if you learn to use it carefully, you can structure your dataset in a way that avoids you writing a lot of repetitive examples, and if you write a script that allows you to load your data from a markdown file, you can even sample properly examples from certain categories to ensure that your training dataset properly represents all the variability in your intent.

For example, if you have 100 examples in your dataset, but 20 involve an entity and 80 don’t, and you feel like your NER is not performing as you wish. You can use a Chatito variable on your 20 examples and put the placeholder for the variable in those examples. Then, you sample say 80 examples from those 20 with the variability in the value of your entity. You get 160 examples and a nicely balanced and distributed dataset. This can make all the difference.

As another example, suppose that you have an intent that is about “ask_restaurant”, but that people are asking for one kind of restaurant in a different way that they would ask for another kind of restaurant. Typically it would be something like

- I wanna have some [chinese food](cuisine:chinese)
- I wanna have some [pizza](cuisine:italian)

You can easily replace this by

 - I wanna have some ~[food]

and be careful about how you write the values for food (making sure that the articles are there or that the sentence makes sense; naming the variable properly usually helps checking that quickly). Then, you can make easy new examples by doing

- I wanna have some ~[food]
- ~[food] please
- ~[food] plz
- gimme ~[food]
- show me ~[food] plz

If you started with 10 cuisines, you’re already with 50 examples with 15 lines of text. In my experience, working with ~5 entities and using examples that usually compose of 2 or 3 small subphrases… I can easily get 100000’s examples for one intent. Then I sample and I get a very varied dataset for one intent that I generated within half an hour. After that, if you do some user testing and see that some fundamental variants of your examples are missing, because of the structure of your dataset, you can quickly jump from 100000’s to 500000’s or even millions.

1 Like