Before we begin, you must first create a knowledge base. You can create a new knowledge base following these steps:
- Sign in to the QnA Maker portal (qnamaker.ai) with your Azure credentials.
- Click on “Create a knowledge base” from the top navigation bar.
- Fill in the details appropriately while proceeding across the steps. You can choose your QnA service, name your Knowledgebase, and choose languages.
- You can either populate your Knowledge Base with URLs and files or prefer to skip that step if you’re planning to add everything manually.
- Click “Create your KB”.
Adding Question-Answer Pairs
Once your knowledge base is created, we can embark on manually adding the Question-Answer pairs.
Enter the appropriate Question and the corresponding Answer in the respective text fields. You can follow the step-by-step instructions below:
- From your knowledge base, head towards the ‘Edit’ tab.
- In the ‘Add QnA pair’ section below your knowledge base content, click ‘+ Add QnA pair’.
- You can add your own custom question in the ‘Question’ field and its appropriate response under the ‘Answer’ field.
- After you’ve filled in both, click “Save and train” to save and submit the changes made.
You can continue this process to add as many Question-Answer pairs as you require.
Here’s an example of how a typical QnA pair would look like,
Question | Answer |
---|---|
What are Azure cognitive services? | Azure Cognitive Services are APIs, SDKs, and services available to help developers build intelligent applications without having direct AI or data science skills or knowledge. |
QnA Pair Variations
Remember, for a question, there can be multiple versions representing the same intent. To add alternate phrasing for a question:
- Click ‘+ Add alternate phrasing’.
- Enter your alternate phrasing for the question.
- Click “Save and train” to save and submit your changes.
Ensure that these variations still correspond to the same answer, as in this example:
Question | Alternate phrasing | Answer |
---|---|---|
What are Azure cognitive services? | Tell me about Azure cognitive services. | Azure Cognitive Services are APIs, SDKs, and services available to help developers build intelligent applications without having direct AI or data science skills or knowledge. |
In conclusion, manually adding Question-Answer pairs is an instrumental process allowing you to train your AI model to respond as perfectly as possible to a query. The ability to add alternate phrasing enhances the adaptiveness of the model. Regularly updating and training your knowledge base with new QnA pairs can dramatically improve the performance and flexibility of your AI solution.
Practice Test
True or False: Microsoft Azure AI solutions allow manual addition of question-and-answer pairs.
- True
Answer: True.
Explanation: Microsoft’s QnA Maker tool allows developers to manually add question-and-answer pairs to a knowledge base as part of implementing an AI solution.
What is the primary tool for manually adding question-and-answer pairs in Azure AI?
- a) QnA Maker
- b) Azure Chatbot
- c) Bot Framework Compose
- d) Azure Cognitive Services
Answer: a) QnA Maker
Explanation: QnA Maker is a cloud-based API from Microsoft that’s designed to create a conversational question-and-answer layer over the data, allowing manual addition of question-answer pairs.
True or False: The manually added pairs can only be in English.
- False
Answer: False.
Explanation: Manually added question-answer pairs can be in any language as long as it is supported by Azure AI.
Which of the following is a requirement for manually adding question-and-answer pairs in Azure AI solutions?
- a) The question and answer must be in the same language.
- b) The question must be a minimum of 50 words.
- c) The answer must exceed 200 words.
- d) The question and answer pairs can be in separate languages.
Answer: a) The question and answer must be in the same language.
Explanation: For functionality and coherence, question-answer pairs should be in the same language.
True or False: Questions added manually can include pictures.
- True
Answer: True.
Explanation: With QnA Maker, you can add rich content like pictures and videos to your knowledge base both automatically and manually.
True or False: Manual addition of question-answer pairs doesn’t allow you to add metadata.
- False
Answer: False.
Explanation: Metadata can be added to each question-answer pair to improve searching and filtering within Azure AI solutions.
What’s the benefit of manually adding question-and-answer pairs in Azure AI?
- a) Reduced training time.
- b) Direct control over responses.
- c) Lower costs.
- d) Increased automation.
Answer: b) Direct control over responses.
Explanation: Manual addition of question-answer pairs allows developers to exercise direct control over which responses the AI gives to specific inputs.
True or False: Only one answer can be manually paired with a question in Azure AI.
- False
Answer: False.
Explanation: Azure AI’s QnA Maker can pair multiple answers with a question, giving the AI solution the ability to pull different responses.
Which of the following cannot be done when manually adding question-answer pairs?
- a) Linking to external documents
- b) Adding metadata
- c) Embedding videos
- d) Adding unsupported languages
Answer: d) Adding unsupported languages.
Explanation: While many features are supported, adding content in languages that are not supported by Azure AI cannot be done.
True or False: Manually adding question-answer pairs allows you to customize the ranking of responses.
- True
Answer: True.
Explanation: While adding question-answer pairs manually, there’s an option to customize the confidence score threshold, which determines how much confidence the AI needs to have in an answer before providing it. This feature assists in the ranking of responses.
What type of AZURE AI service primarily needs manual addition of question-and-answer pairs?
- a) Text Analytics
- b) Translation Services
- c) QnA Maker
- d) Form Recognizer
Answer: c) QnA Maker
Explanation: The QnA Maker service is mainly used for creating knowledge base where you often have to insert question-and-answer pairs manually to custom build the service according to the requirements.
True or False: In QnA Maker, question-answer pairs can be added manually only before the knowledge base is published.
- False
Answer: False.
Explanation: Even after the knowledge base is published, it is possible to add, edit or delete the question-answer pairs using the QnA Maker portal.
How many answers can be linked to a single question in QnA Maker?
- a) 1
- b) 2
- c) 3
- d) There’s no maximum limit
Answer: d) There’s no maximum limit
Explanation: QnA Maker allows linking of multiple answers to a single question providing the AI the flexibility to choose the one with the highest confidence score.
True or False: QnA Maker supports the manual addition of follow-up prompts to questions.
- True
Answer: True.
Explanation: Follow-up prompts can be manually added to questions in QnA Maker, making the conversational flow engineered more interactive.
In the context of designing Azure AI solutions, the manual addition of question-answer pairs mainly assists in:
- a) Deploying the application
- b) Training the AI model
- c) Tuning the AI model
- d) Optimizing the computational cost
Answer: c) Tuning the AI model
Explanation: Manually adding question-answer pairs serves as a pivotal part of model tuning by customizing responses, and linking and context-setting for AI models.
Interview Questions
What are the two main categories of AI workloads in Microsoft Azure AI Solution?
The two main categories are pre-built AI which includes cognitive services, and custom AI which includes Azure Machine Learning.
How does Azure Bot Service enable the creation of intelligent bots?
Azure Bot Service provides an integrated environment that is purpose-built for bot development, enabling us to build, connect, test, deploy, and manage bots, all from one place.
What is the role of LUIS in a Microsoft Azure AI solution?
Language Understanding Intelligent Service (LUIS) is a machine learning-based service to build natural language into apps, bots, and IoT devices. It allows the apps to understand commands from the users.
How does Azure Machine Learning help in creating Artificial Intelligence solutions?
Azure Machine Learning provides a drag-and-drop interface for building, testing, and deploying machine learning models. It also provides a specialized workspace for data scientists to manage and track their experiments and models.
What is Azure Cognitive Services?
Azure Cognitive Services is a comprehensive suite of AI services that enables developers to build intelligent applications without requiring machine-learning expertise. It includes services for vision, speech, language, and decision-making abilities.
In the context of Azure AI Solution, what is the role of QnA Maker?
The QnA Maker is a cloud-based service that creates a conversational layer over your data. It is used for building and testing Question and Answer bots, based on static information or specifically provided data.
What types of storage is recommended for large scale AI workloads in Microsoft Azure?
Azure supports a wide spectrum of storage options including Azure Data Lake Storage, Azure Blob Storage, and Azure Cosmos DB for large scale AI workloads.
Can Azure Databricks be used in AI workload processing in Azure AI solution?
Yes, Azure Databricks is an Apache Spark-based analytics platform optimized for the Microsoft Azure cloud services platform. It is designed for large scale data processing and AI workloads.
What is Azure Search, and how does it assist in building AI solutions?
Azure Search is a search-as-a-service cloud solution that provides AI capabilities for sophisticated content understanding. It can ingest, enrich, and index any data, and provides simple queries or complex AI-powered cognitive searches.
How is data security ensured in Azure AI solutions?
Azure AI solutions ensure security through identity and access management using resources like Azure Active Directory, Role-Based Access Control (RBAC), and Azure Private Link which provides private access to services, etc.