In May, the Q&A team released an update to Q&A that enabled a wider variety of natural language questions that can be answered as well as personal customization of certain types of questions. In the new cloud modeling environment, it is now possible to define new terms and resolve any ambiguity for your questions. For example, cloud-modeling enabled these questions to bring back meaningful results:
Which player scored the most unassisted goals per world cup
Who are the diving medalists from China and what is their medal count
Which player has received a yellow card and scored 2 goals in the same game
How does Q&A know what an unassisted goal is? Or that athletes are from a particular country, not just that they compete in a host country? With cloud modeling, it is possible to define what an unassisted goal is and that athletes are from their home country. This update allows you to create new phrasings within your workbook’s language model.
Before walking through an example, what is a language model? A language model is your workbook’s dictionary. It’s what Q&A uses to know how to understand each row and column and how they are related. Within a language model, phrasings are created to define what words are used to relate different columns in your model.
Let’s walk through an example to show how creating phrasings through the cloud-modeling environment works.
1) If you sign into PowerBI, you will be presented with the main dashboard:
2) Make sure to add your workbook with the “Add” button, located next to Documents.
3) After you add your workbook, click on the (…) located on your workbook’s tile (circled in red in the above picture).
a) Click “Add to Q&A”
4) After you add your workbook for Q&A, it is now time to launch into the language modeling experience. Click on the gear icon in the upper right (circled in green in the above picture) and click “Power BI site settings”.
5) Click on “Q&A” and it’ll bring you to a screen like this:
6) Click on the (…) and then click “Optimize for Q&A”
7) Now you are in the Language Modeling tool and are ready to customize your workbook to your liking. It will look like the screenshot below.
On the right hand side of the screen, you will see a pane with you Workbook name on it. The pane lets you create your language model in several ways:
Before making a phrasing, it is important to start from the question you are trying to ask in Q&A. In this example, the question “which player has the most unassisted goals” doesn’t work because Q&A doesn’t know what an unassisted goal is.
To create the phrasing that will enable that question, we click on the “phrasings” tab.
After clicking on “add phrasing”, you can start typing in what you want to define. Typing in the word “unassisted” prompts a suggestion box to help craft your phrasing. In the World Cup model, I have a column named AssistPlayerName. If the row value is “N/A”, it is an unassisted goal. Therefore, the proper phrasing needed would be the second one in the dropdown box. The full phrasing is shown below.
You can immediately test your phrasing to see if it works.
Now that we have walked through how to get started with cloud modeling, we encourage you to read the documentation on the various phrasing types, what types of questions they enable, and how to create them.
Cloud modeling allows you to make Q&A work for the kind of language you use in your company and industry. It is the next step in model optimization, and it follows the optimizations done in Power Pivot (see Demystifying Power BI Q&A Part 1 | 2).
Before even creating any phrasings on your own, Q&A already generates some phrasings for you so that basic queries will work. For example, if you have sales data with a Customers table and State and Customer Name were two columns, we would automatically generate the phrasing “Customer name is the name of Customer” so that you could ask, “Show Pennsylvania customers”.
However, if you have another table Orders with columns named Product, Price, Date Bought, Customer ID (relating back to the Customer table), and you want to ask, “what products did Pennsylvania customers buy?”), Q&A wouldn’t know what to do with that question. By adding the phrasing “customers buy products”, Q&A has the context it needs to relate both the columns together.
Another example would be what if you are the owner of a small bakery and you want to see what items to have on your seasonal display showcase. You have a database of ingredients and their respective prices. If you just want to ask, “show expensive ingredients”, you can create a phrasing to define what expensive meant for you! For small bakeries, it could be that ingredients more than $26/lb are expensive. For bigger bakeries, ingredients more than $40/lb are considered expensive. Depending on the needs of your company, you can tailor Q&A to give you the most pertinent results.
With cloud modeling, it is possible to answer a wide range of questions with Q&A. Q&A is still a ways from being as intelligent as Batman’s batcomputer, but because Power BI is a cloud service, we can rapidly and continually improve the product based on your needs and wants from a self-service business intelligence product. Lastly, we hope this blog post has shown how Q&A can be tailored to fit your needs and we encourage that you try making your own phrasings as explained here.
Excellent. Keep them coming.
I can't open "Q&A Cloud Modeling Documentation" and "To optimize for Cloud modeling" links.
Hi Sergey, try the full links:
Yep, it works. Thank you Miguel! It very helpful information, Q&A it amazing thing!
You're welcome Sergey. I assume you tried the World Cup sample? It's insane :) www.microsoft.com/.../qna-demo-worldcup.aspx