Search code examples
c#azure-language-understandingbing-search

Luis.ai's prebuilt Entertainment.Search - how to utilize in a chatbot?


I am trying to learn more about LUIS.ai as a chatbot

How do I utilize this prebuilt domain intent?

Right now, I use it to recognize the user's input and when I land in Entertainment.Search I do a BingSearch! I couldn't find anything googling and I did a string search in my copy of [BotBuilder-Samples] (https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp) and didn't find samples that use it either.

Also, while we're at it... what are some examples that utilize [$encyclopedia] entity? I have that too and ended up using another BingSearch.


Solution

  • For the prebuilt intents, they could be viewed as more of templates to aid in the process of speeding up the building of your application. These intents are already trained, so asking intent-related questions are likely to be recognized right away without you needing to add more to the intent.

    Instead of a user needing to add "What are some General rated films playing right now?" to your custom intent, you can use Entertainment.Search which probably already has something similar to it labeled. Then similar utterances are already labeled with the Entertainment.Search intent.

    The way you're implementing it right now works fine. LUIS only provides natural language processing, it doesn't conduct a BingSearch to find more information for you.


    The current implementation of the encyclopedia prebuilt entity allows users to have their LUIS application recognize potential subjects without having to train their model by adding to it a bunch of semi-random pieces of information.

    A good example of using the prebuilt entity would be in using it in a trivia bot, because the encyclopedia prebuilt entity covers a wide range of topics, from rulers of Russia like Catherine the Great to rock bands like Led Zeppelin.

    Here's an example of the response body from the utterance "Catherine the Great":

    "entities": [
      {
        "entity": "catherine the great",
        "type": "builtin.encyclopedia.royalty.monarch",
        "startIndex": 0,
        "endIndex": 18
      },
      {
        "entity": "catherine the great",
        "type": "builtin.encyclopedia.film.film"
      },
      {
        "entity": "catherine the great",
        "type": "builtin.encyclopedia.people.person"
      }
    ]
    

    The thing about NLP (and most NLP offerings) is that you're using it to obtain machine readable information, it goes through an piece of text and passes standardized formats of information back to your application so that your app can act on it.