0% found this document useful (0 votes)
16 views8 pages

AI 102T00A ENU PowerPoint - 06

The document outlines the process of creating a question-answering solution using a knowledge base, which includes publishing and utilizing it as a REST endpoint. It details the steps for setting up the knowledge base, including importing FAQs, adding multi-turn conversations, and testing before publishing. Additionally, it discusses the integration of the knowledge base with client applications and the use of active learning to improve performance.

Uploaded by

Ching Yu Lok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

AI 102T00A ENU PowerPoint - 06

The document outlines the process of creating a question-answering solution using a knowledge base, which includes publishing and utilizing it as a REST endpoint. It details the steps for setting up the knowledge base, including importing FAQs, adding multi-turn conversations, and testing before publishing. Additionally, it discusses the integration of the knowledge base with client applications and the use of active learning to improve performance.

Uploaded by

Ching Yu Lok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

11/6/2023 4:42 PM

Building a Question
Answering Solution

© Copyright Microsoft Corporation. All rights reserved.

Creating a Knowledge Base

Agenda Publishing and Using a Knowledge Base

© Copyright Microsoft Corporation. All rights reserved.

1
11/6/2023 4:42 PM

Creating a Knowledge Base

© Copyright Microsoft Corporation. All rights reserved.

Introduction to Question Answering

• Knowledge base of question and


answer pairs with natural language
understanding Q
---
A
---

• Published as a REST endpoint for --- ---


--- ---
applications to consume

© Copyright Microsoft Corporation. All rights reserved.

2
11/6/2023 4:42 PM

Question Answering vs Language Understanding

Question Answering Language Understanding


• User submits a question, expecting an • User submits an utterance, expecting an
answer appropriate response or action
• Service uses natural language • Service uses natural language
understanding to match the question to understanding to interpret the utterance,
an answer in the knowledge base match it to an intent, and identify entities
• Response is a static answer to a known • Response indicates the most likely intent
question and referenced entities
• Client application presents the answer to • Client application is responsible for
the user performing appropriate action based on
the detected intent

© Copyright Microsoft Corporation. All rights reserved.

Creating a Knowledge Base

Use the Language Studio portal


1. Create a Language service Azure resource in your Azure subscription
2. In Language Studio, connect to your resource and create a new knowledge base
3. Name the knowledge base
4. Populate the knowledge base:
• Import from existing FAQ web page
• Upload document files
• Add pre-defined "chit-chat" pairs
5. Create the knowledge base and edit question and answer pairs

© Copyright Microsoft Corporation. All rights reserved.

3
11/6/2023 4:42 PM

Multi-Turn Conversation

How can I cancel a


reservation?

Add follow-up prompts to define multi-


turn exchanges Cancellation policies
depend on the type of
• Can reference existing question and answer reservation
pairs
Hotel cancellations
• Can be restricted to follow-up responses only
Flight cancellations

To cancel a flight, call


555-123 4567

© Copyright Microsoft Corporation. All rights reserved.

Publishing and Using a Knowledge Base

© Copyright Microsoft Corporation. All rights reserved.

4
11/6/2023 4:42 PM

Testing and Publishing a Knowledge Base

Test interactively in Language Studio


• Inspect results to see confidence scores
• Add alternative phrases to improve scores as necessary
Publish the trained knowledge base
• Creates an HTTP REST-based endpoint for client apps to consume

© Copyright Microsoft Corporation. All rights reserved.

Creating Client Apps


{ Best question match
"answers":[
REST Interface {"questions":[
"How do I book a hotel?" Answer text
Submit questions to the generateAnswer endpoint ],
"answer":"Call 555-123-4567 to book",
"score":76.55,
Confidence score
"id":2,
{ "source":"https://...source.docx",
"question": "I want to book a hotel." "isDocumentText":false,
} "metadata":[], Source
document
"context":{ (if any)
"isContextOnly":false,
"prompts":[]
} Follow-up
prompts
} (if any)
]
}

© Copyright Microsoft Corporation. All rights reserved.

5
11/6/2023 4:42 PM

Improving Question Answering Performance


{
"answers":[
Enable Active Learning to suggest alternatives {"questions":["How do I book a hotel?"],
"answer":"Call 555-123-4567 to book.",
when multiple questions have similar scores for "score":76.55,

user input
"id":2,
...
{
}
• Implicit: The service identifies potential alternative ]
"records": [
{
phrases for questions; and presents suggestions in the }
"userId": "user1",
Language Studio. Periodically review and accept / reject "userQuestion": "I want to book a hotel.",
the suggestions. "qnaId": 2
}
• Explicit: The service returns multiple possible question ]
}
matches to the user, and the user identifies the correct
one. The client app then uses the REST API to submit
feedback items, identifying the correct answer.
{
"synonyms": [
{

Create Synonyms for terms with the same


"alterations": [
"reservation",
meaning ]
"booking"

• Add synonyms to the knowledge base through the REST ]


}

interface. }

© Copyright Microsoft Corporation. All rights reserved.

Creating a Question Answering Bot

Bots are a common form of


conversational app
The Azure Bot Service provides a cloud Q A
platform for delivering bot solutions --- ---
--- ---
Question Answering knowledge bases --- ---
can be easily integrated into a new bot

© Copyright Microsoft Corporation. All rights reserved.

6
11/6/2023 4:42 PM

Lab – Create a Question Answering Solution

Create knowledge base Create a Question Answering bot

© Copyright Microsoft Corporation. All rights reserved.

Module Review
You want to create a knowledge base from an existing FAQ document.
What should you do?
❑ Create an empty knowledge base and manually enter the FAQ questions and answers.
❑ Create a new knowledge base, importing the existing FAQ document.
❑ Create a new knowledge base, selecting only the Professional chit-chat source.

How can you add a multi-turn context for a question in an existing knowledge base?
❑ Add synonyms to the knowledge base.

❑ Add alternative phrasing to the question.

❑ Add a follow-up prompt to the question.

How can you enable users to use your knowledge base though email?
❑ Add Friendly Chit-chat to the knowledge base.

❑ Enable Active Learning for the knowledge base and include the user's email address as the userId parameter in responses.

❑ Create a bot based on your knowledge base and configure an email channel.

© Copyright Microsoft Corporation. All rights reserved.

7
11/6/2023 4:42 PM

© Copyright Microsoft Corporation. All rights reserved.

You might also like