3
votes

LUIS is normally used as a dispatcher with multiple QnAs or used parallel with QnA or as an (If else) to redirect to a QnA. As also mentioned in link below:

Look use-cases mention in the answer

I want to transfer knowledge from LUIS to QnA:

LUIS: Extracts things like entities and intents from utterances, but in most of the above scenarios what we are transfering are only the utterances but not the information about intents and entities from LUIS.

QnA metadata: metadata filters (Key value pairs) to boost some answers, when we query the qna base afterwards.

Here are my questions:

  1. Is this scenario plausible to transfer not only the session.message or utterance but also entity and intents to the QnA services?

  2. To implement it using metadata for example intent: something and entities: some products , and passing the intents and entities from LUIS to be compared with this metadata in QnA services, is this also reasonable?

  3. If above concepts are wrong, then is there another way to transfer knowledge from LUIS to QnA service? In my little knowledge, LUIS is more intelligent service than QnA and QnA is mostly used as a solid QnA base but if we give control to LUIS, then may be even questions that have different entities or way of presentation but same context can be mapped to desired QnA pair in QnA database.

  4. Finally can someone help me to come up with how to implement this in node.js? if possible you don't have to write code from scratch, just this intent and entity transfer logic from LUIS to metadata of QnA. ofcourse if this logic is feasible.

2
Let me see if I understand this correctly. While LUIS is normally just used to determine if an utterance should be sent to a QnA knowledge base in these types of situations, you want to connect QnAMaker to LUIS in such a way that LUIS is able to help QnAMaker come up with an answer because you're worried QnAMaker might not be intelligent enough to retrieve the correct answer from the utterance on its own. Is that correct?Kyle Delaney
I notice you didn't use the botframework tag. Are you trying to make a bot or something else?Kyle Delaney
Correct! I know QnA Maker is intelligent enough to retrieve good answers to some extend, but if we are implementing LUIS in the pipeline, it uses NLP, extract intents and entities, if we have complex utterances i think LUIS can possibly help imrpove the accuracy of mapping same contextual (intent) questions , even if there entities or way of presentation is different. Yes eventually this is going to be a bot so let me edit that Tag, Thank you and looking forward to your further response.waqar.ghani

2 Answers

2
votes

I found that QnA Maker has a lot of problems with questions that have an overlapping part.

E.g. with questions of the same type like definition questions:

  • What is an apple? Tell me what an apple is.
  • What is a pear? Tell me what a pear is. Explain me what a pear is.

QnA Maker is relatively dumb - it is based on a search engine rather than actually understanding the language. It cannot find out what the key concept of the question is for example.

Therefore it is important to reduce overlap and have more uniqueness in the questions.

The solution I came up with, was to cluster similar questions and to model them as Intents in LUIS. The answers can then be in QnA Maker. E.g. DefinitionQuestion intent in LUIS with entity extraction:

  • What is X? Tell me what X is. Explain me what X is

Then with logic in your bot you can put all definitions (instead of the whole questions) in QnA Maker and tag them as definition. When a definition intent is recognized by LUIS, you can extract the X entity and query QnA Maker for X using a strict filter with the questiontype:definition tag.

1
votes

It's very common for people to want to integrate LUIS and QnAMaker somehow, such as here and here. There's official documentation about how to do it here. What you want to do seems to be a little different from the usual implementation, though.

If I may paraphrase, it sounds like you're trying to use LUIS to boost the intelligence of QnAMaker. This is neither possible nor necessary. It's not possible because LUIS and QnAMaker are designed with simple interfaces that receive a single message as input, which is to say QnAMaker can't work with LUIS's intents and entities. It's not necessary because QnAMaker is already designed to be as good as it can be at what it does. If there was a way to make it smarter with LUIS's algorithms then that functionality would be builtin and you wouldn't have to implement that yourself. Remember that both of these are Microsoft AI services, so I wouldn't expect one to have secrets that are beyond the reach of the other.