0

I am currently writing a Cortana app using Microsoft's Bot Framework and LUIS for language processing.

The goal is to have the user specify a direction and axis for movement. For example: Move Z Axis Up.

In LUIS I have this translated with axis and direction entity like so: Move {axis} axis {direction}.

My question is: where is the proper place to validate this input? If the user says "Move Z axis left" obviously this makes no sense since z axis can only move up and down.

Should this be done programmatically in my Cortana app or can it be done using LUIS? Any help is appreciated. Thank you

Ashley
  • 422
  • 6
  • 18

2 Answers2

0

You could try training LUIS to recognise it as a erroneous intent, so that you can proceed to handle it in your app code.

This might be the better way as LUIS will learn over time to recognise such intents and then provide more accurate results.

Shawn Tjai
  • 46
  • 3
  • Would the correct way to train LUIS in this manner be to follow [this guide](https://learn.microsoft.com/en-us/azure/cognitive-services/luis/train-test) and send the incorrect attempt to the None Intent? – Ashley Mar 30 '18 at 16:20
0

If you want to bring your user more details about why it's not working, you should do it on your code side. If it is made on LUIS side, you will either not flag the direction as an entity or throw the None intent given how you train it. From my point of view, it's not the good solution as you don't know which error is happening.

And you should also train your bot with the right combinations.

Nicolas R
  • 13,812
  • 2
  • 28
  • 57
  • This is a good point, because I would like to handle the error smoothly. So you think the correct solution would be to pass all attempts (even erroneous ones) through LUIS to my code and handle it there. I'm not sure what you mean by train the bot with the right combinations though? Any documentation you can share? I was just thinking of having an array with hard coded correct combinations to check against, but obviously this isn't an ideal solution. – Ashley Mar 30 '18 at 16:24
  • The exact implementation depends on your detailed cases, I can't provide a "perfect" solution without knowing them. It looks like you should declare an "axis" entity, a "direction" entity like you said, then check the combinations on bot code. For the training, I would prefer to provide the right combinations rather than the wrong ones, but these wrong should not be in None intent – Nicolas R Mar 30 '18 at 16:46