none
QnA Maker's Metadata: what is it and how should I use it? RRS feed

  • Question

  • So, I am pretty with Microsoft Azure's tools. I was using Azure's QnA Maker Preview to develop a FAQ bot. But just today, Microsoft released a huuuuge update, making this servisse much more powerful, adding, together with other new features, the concept of metadata. I understood that it is supposed to make your system more powerful, fast and intelligent, but I didn't understand how it should be used and what exactly it does. Can anyone help me to understand this new tool? Thanks!
    Monday, May 7, 2018 8:30 PM

Answers

  • Hi,

    Metadata is a key value pairs you can add to QnA Items, it is optional.  You can use it to either strictly filter or boost certain answers you get back from QnA Maker service when you query it for answers later on.

    For following example, you can see that we have a key value pair -- category:api, when you query for the question, you can use a filter to choose answer just with the tag category:api so that you can get more accurate answer.

    Regards,

    Yutong

    Wednesday, May 9, 2018 6:34 PM
    Moderator

All replies

  • Hi,

    We have our document for QnA Maker, please go and check it. It should be what you want. 

    Regards,

    Yutong

    Monday, May 7, 2018 9:41 PM
    Moderator
  • Hey Yutong, thank you very much for the answer. But I already read the documentation and, for me it's still nuclear what those metadatas are, what they do, in which scenarios they are supposed to be used and etc. Could you help me understand it?
    Wednesday, May 9, 2018 4:52 PM
  • Hi,

    Metadata is a key value pairs you can add to QnA Items, it is optional.  You can use it to either strictly filter or boost certain answers you get back from QnA Maker service when you query it for answers later on.

    For following example, you can see that we have a key value pair -- category:api, when you query for the question, you can use a filter to choose answer just with the tag category:api so that you can get more accurate answer.

    Regards,

    Yutong

    Wednesday, May 9, 2018 6:34 PM
    Moderator
  • I see... But how can it optimize the user's experience? How does the metadata makes the answers more accurate?
    Wednesday, May 9, 2018 6:51 PM
  • Hi,

    In the KB we built, there will be some similar question-answer pairs. It will make the result confuse to our customers. 

    For example, for question "What is 'fruit'?", the answer could be "It is a noun." or "It is a kind of food."

    If we have the metadata, we can make tags for the QnA pairs and help users get what they want more.

    Regards,

    Yutong

    Wednesday, May 9, 2018 9:46 PM
    Moderator
  • Upto this statement ok I understood, but can you please show it in action, I mean how the different queries will be for the both answers.

    I tried with metadata, I got the same answer for the both query

    Thank you in advance

    Sino

     
    Sunday, September 23, 2018 4:17 PM
  • Upto this statement ok I understood, but can you please show it in action, I mean how the different queries will be for the both answers.

    I tried with metadata, I got the same answer for the both query

    Thank you in advance

    Sino

     

    HI Microsoft Gurus!

    I have the same question. I read all articles - but it is still unclear for me.

    I create similar example - and it answers me with only single fisrt answer. How i should make it work?

    My understanding was something like:

    1. I have 2 similar questions, but with different answers - e.g. "what is you office location?" - and there would be different answers for different countries

    2. Then i add different metadata"country:Switzerland" and "country:Russia" for this 2 questions

    3. My though was - i ask  "what is you office location?" - and have some answer

    4. But if i ask "what is you office location in Russia?" - i have a proper andwer based on metadata

    But it DO NOT works like this :)

    If you can share more details - it would be great!

    Tuesday, December 4, 2018 8:26 AM
  • I not a microsoft employee, but based on some inference from the above answers, you have to customize code for the metadata . Like get the Metadata value and use if and else statements to query the search result.  I am trying to find a better answer too. LOL
    Sunday, July 14, 2019 4:17 AM
  • Hi everyone, 

    There is 2 ways this would actually work and they both have their benefits and drawbacks.  

    1st: MSFT could had a created an api for the call that would allow the filter to be added into a property / parameter.  **this is not currently an option and the reason would probably be the added stress to the system from their end to process that request.  Who knows. 

    2nd: You can handle the filtering on the bot side. But how, and the part you all are missing from nobody explaining the obvious explanation.  You need to have multiple answers in your return of the same QNA question albeit different answers across tags.  

    So for example, if you have a company, Contso, that has lets say 5 departments and each department needs a QNA... In the QNA maker you would add 1 Universal qna models/excell tsv files and multiple qna models that are specific to department.  This would be the same question but different answer in the department.  

    This would allow you to then in the bot get not just the top answer but the top 5 or 6 and then the question that would with a high C score allow you to bring back multiple responses.  This way you can now use the filter. 

    here is the documentation explaining the post request and how to use the api

     qnamaker api


    Christian CXM

    • Proposed as answer by Xtianus 6 hours 49 minutes ago
    6 hours 49 minutes ago