Intent consisting of just a single slot?

Let’s suppose I have an entity “cars” consisting of types of cars “Ford”, “Honda”, etc.
I have a “Drive” intent with a slot (“cartype”) pointing to Lists.cars.
The “Drive” intent has samples like:

  • Drive the [cartype]

  • I want to drive the [cartype]

  • Let’s take the [cartype] for a spin

  • etc.

Now I want to set up a new intent to capture what happens when the user only types a car (ex: “Ford”).
I set up an intent “Car_type_only” with slot cartype pointing to Lists.cars and I gave only one sample:

  • [cartype]

When I run this and give user input “Ford”, I am expecting to trigger the “car_type_only” intent, but instead I’m getting the “Drive” intent with a confidence value of 1!

Any ideas?
Note: what I’ve described above is a simplified example, not my actual intents/entities

I’m interested too, I’m facing a similar problem…
Has anyone solved this one?

Hi @nathanielgranor, thanks for posting on the forum !

Your use case is a bit an edge one, it’s quite difficult for an nlp algorithm to guess with only one word.

For sure we will try to improve it but I can propose you an easy hack.

Put everything in one intent only. When detecting it, use the event given by botpress to check if the base utterance was only one word (or maybe two).

Ford -> intent Drive -> Check words -> less than 2 -> Car_only

Let's take my Ferrari -> intent Drive -> Check words ->more than 2 -> Drive

Hope it helps !

Happy building :robot: !

Hey guys,

As @PierreSnell said, its indeed a really difficult task for our NLU.

I think what you guys want, is a way to extract an entity carType, without the need to identify an intent with slots.

If so, here’s a few workarounds we use to solve this problem:

Lets say you want to get the desired car type from your user, What you could do is:

  1. Write down full utterances like
    • Drive the [cartype]
    • I want to drive the [cartype]
    • etc…
  2. Try to correctly extract the slot carType with a slot skill in your flow.
  3. If intent drive is detected, but no slot was extracted, ask the user specifically to give the car type he wants.
  4. Get the car type by looking at field entities in the event.nlu.

You could also do it mannually (this is basically the approach @PierreSnell proposed):

  1. If event has only one word and event.nlu.entities include entity carType then take the same flow Path as if the intent was Drive.

In Botpress Albert, a version we unfortunately stopped developping few weeks ago, we introduced a concept called Prompt, which could extract any user information. Unlike the Slot skill, the prompt could also automatically extract entities, whitout the need for an intent to be detected.

I feel like this is exactly the feature that you guys need. If so, I think we are planning on bringing it back in botpress in the next few weeks.

Does this answers your questions? Does anybody have a better idea?

Anyway, thanks for your contribution on the forum,

hope this information helps,

François

@frank_levasseur, to your question, that wasn’t what I was trying to do in my original scenario. I did need to extract the entity, yes. But imagine there were several intents related to the carType entity: Drive, Fix, Wash, etc. If the user entered a carType without one of those intents, the goal was to ask them “what do you want to do with your [carType]”? and then offer them a choice that would clarify their intents: (Drive it, Fix it, Wash it, etc).

I don’t remember exactly what I did for a workaround (the project was for an event in March and I haven’t looked at it since then). I think I may have just filled in the car_type_only intent with more sample utterances (“Tell me about the [carType]”) as well as the plain one.

The feature I’d really like here is to be able to have a default intent for a given entity. If you detect the entity but have low confidence about any of the specific intents that use that entity, fall back to that entity’s default intent. Of course, this gets more complicated if the user’s utterance contains multiple matched entities but you could have a precedence for the entities I suppose.

Ok, I better understand.

Then again, I think your best bet is to make a custom algorithm based on the value of event.nlu. This use case is too nested and I don’t see any feature comming in botpress to solve this case more generally.

As I said earlier, your bot can have a certain behavior if only one word was extracted and this word is an entitiy of type carType.

If you think of anything or have a better solution, please share it with us in this thread.

François