Skip to content

QnA Maker Planning

QnA Maker is a cloud-based natural language processing (NLP) service that enables you to create a natural conversation layer over your data. It is used to find the most appropriate answer for any input from your custom knowledge base (KB) of information.

QnA Maker is commonly used to create client conversational applications, which include social media apps, chat bots and voice-enabled desktop applications.

QnA Maker does not store customer data. All data from it (answers to questions and chat logs) is stored in the region where the customer implements the dependent services instances.

Plan Your Knowledge Base

Plan Your QnA Maker Application

To plan your QnA Maker application, you must understand how QnA Maker interacts with other Azure services and have a solid understanding of knowledge base concepts.

Azure Resources

Each Azure resource created with QnA Maker has a specific purpose. Each resource has its own purpose, limits, and pricing level. It’s important to understand the function of these so you can use that knowledge in your planning process.

Resource Planning

The free tier can provide both the creation experience and query prediction. You can use this tier to learn about creation and query prediction. When transitioning to a production or live scenario, reevaluate your resource selection.

Knowledge Base Size and Performance

When creating a real application, plan for sufficient resources for the size of your knowledge base and for your expected query prediction requests.

The size of a knowledge base is governed by:

  • Cognitive Search resource pricing tier limits.

  • QnA Maker limits.

Exchange of resources

If you already have some of these resources in use, you can consider sharing them. See what can be shared with the understanding that the sharing of resources is an advanced scenario.

All knowledge bases created in the same QnA Maker resource share the same test query prediction endpoint.

Understanding the impact of resource selection

Proper resource selection means that your knowledge base correctly answers query predictions.

If your knowledge base does not work correctly, it may be due to inadequate resource management.

Knowledge bases

A knowledge base is directly linked to your QnA Maker resource. It contains the question and answer (QnA) pairs used to answer query prediction requests.

Language considerations

The first knowledge base created in your QnA Maker resource sets the language of the resource. You can only have one language for a QnA Maker resource.

You can structure your QnA Maker resources by language or you can use Translator to convert a query from another language to the language of the knowledge base before sending the query to the query prediction endpoint.

Ingest Data Sources

You can use one of the following ingested data sources to create a knowledgebase:

  • Public URL

  • Private SharePoint URL

  • File

Linked images must be available on a public URL to show up in the QnA Maker portal Test Panel or in a client application. QnA Maker does not provide authentication for content, including images.

Authorship with Contributors

Contributors can be other developers who share the full application development stack of the knowledgebase application or can be limited to creating the knowledgebase.

Creating the knowledgebase supports various access permissions based on roles that are applied in the Azure portal to limit the scope of capabilities of a contributor.

Integration with Client Application

Integration with client applications is achieved by sending a query to the prediction runtime endpoint. A query is sent to your specific knowledgebase with either an SDK or a REST-based request to the QnA Maker web application endpoint.

To authenticate the client request appropriately, the application needs to send the correct credentials and knowledgebase ID. If you are using an Azure Bot Service, set these options as part of the bot configuration in the Azure portal.

Active Learning from a Client Application

QnA Maker utiliza el aprendizaje activo para mejorar su base de conocimientos sugiriendo preguntas alternativas a una respuesta. La aplicación cliente es responsable de una parte de este aprendizaje activo. A través de mensajes de conversación, la aplicación cliente puede determinar que la base de conocimientos devolvió una respuesta que no es útil para el usuario y puede determinar una mejor respuesta. La aplicación cliente debe enviar esa información a la base de conocimientos para mejorar la calidad de la predicción.

Provide a default answer

If your knowledge base doesn't find an answer, it returns the default answer. This answer can be configured on the Settings page in the QnA Maker portal or in the APIs.

This default answer is different from the default answer for your Azure Bot. Configure the default answer for your Azure Bot in the Azure portal as part of the configuration settings. It's returned when the score threshold isn't reached.

Prediction

Prediction is your knowledge base's answer and includes more information than just the answer. To get an answer from query prediction, use the GenerateAnswer API.

Prediction score fluctuation

A score can change based on various factors:

  • Number of answers requested in response to GenerateAnswer
  • Variety of alternative questions available
  • Metadata filtering
  • Query sent to the test or production knowledge base

There is a two-phase answer ranking:

  • Cognitive Search - first range. Set the number of allowed answers high enough so that the best answers are returned by Cognitive Search and then pass to the QnA Maker range.

  • QnA Maker - second range. Apply features and machine learning to determine the best

Service Updates

Apply the latest runtime updates to manage service updates automatically.

Scaling, Performance, and Resilience

Scaling, performance, and resilience are determined by Azure resources, your pricing tiers, and any surrounding architecture such as Traffic Manager.

Analysis with Application Insights

All queries to your knowledge base are stored in Application Insights. Use our top queries to understand your metrics.

Development Lifecycle

The development lifecycle of a knowledge base is continuous: edit, test, and publish your knowledge base.