简体   繁体   English

Azure QnA Maker Managed(预览版) - 仅在收到机器人的响应时显示 Long Answer

[英]Azure QnA Maker Managed (preview) - only display Long Answer when receiving a response from bot

From the Azure QnA Maker documentation:来自 Azure QnA Maker 文档:

The precise answering feature introduced in QnA Maker managed (Preview), allows you to get the precise short answer from the best candidate answer passage present in the knowledge-base for any user query. QnA Maker 管理(预览版)中引入的精确回答功能允许您从知识库中存在的最佳候选答案段落中为任何用户查询获得精确的简短回答。 This feature uses a deep learning model which on runtime, which understands the intent of the user query and detects the precise short answer from the answer passage, if there is a short answer present as a fact in the answer passage. 此功能使用深度学习 model,它在运行时了解用户查询的意图并从答案段落中检测精确的简短答案,如果答案段落中存在作为事实的简短答案。 This feature is on by-default in the test pane, so that you can test the functionality specific to your scenario. 此功能在测试窗格中默认启用,因此您可以测试特定于您的场景的功能。

In the QnA Maker portal ( qnamaker.ai ), when you open the test-pane, you will see an option to Display short answer on the top.在 QnA Maker 门户 ( qnamaker.ai ) 中,当您打开测试窗格时,您将看到顶部显示简短答案的选项。 This option will be selected by-default.默认情况下将选择此选项。 When you enter a query in the test pane, you will see a short-answer along with the answer passage, if there is a short answer present in the answer passage (see this image for context).当您在测试窗格中输入查询时,如果答案段落中存在简短答案,您将看到一个简短答案以及答案段落(请参阅此图像了解上下文)。

Now, what I want to do is disable the displaying of the short answer from the actual chatbot itself (so that only the long answer is displayed), not just in the test pane in qnamaker.ai .现在,我想要做的是禁止显示来自实际聊天机器人本身的简短答案(以便只显示长答案),而不仅仅是在qnamaker.ai的测试窗格中。

In knowledge base creation in qnamaker.ai , I created a QnA pair, with "Hello" as a question and "Hello 123" as an answer .qnamaker.ai中创建知识库时,我创建了一个 QnA 对,其中“Hello”作为问题,“Hello 123”作为答案 Saving and training the knowledge base, and publishing it, pushes the knowledgebase changes and the endpoint becomes available for use in my Bot.保存和训练知识库并发布它,推动知识库更改,并且端点可以在我的 Bot 中使用。

Testing this new QnA pair from the Azure Portal via the Test in Web Chat feature in my QnA Web App bot is displaying some weird behaviour: supplying the bot with the phrase "Hello" returns a short answer "123" and a long answer "Hello 123" and this long answer seems to formatted in some weird way. Testing this new QnA pair from the Azure Portal via the Test in Web Chat feature in my QnA Web App bot is displaying some weird behaviour: supplying the bot with the phrase "Hello" returns a short answer "123" and a long answer "Hello 123”,这个长长的答案似乎以某种奇怪的方式格式化。 . . Supplying the bot with the phrase "123" returns only the full answer "Hello 123" (see here ).为机器人提供短语“123”只会返回完整的答案“Hello 123”(参见此处)。

Displaying both short and long answers may be disruptive and confusing for the user.同时显示简短答案和长答案可能会给用户带来干扰和困惑。 This seems to happen for almost all QnA pairs that I've tested.这似乎发生在我测试过的几乎所有 QnA 对上。 Is there some sort of configuration setting to disable this behaviour?是否有某种配置设置可以禁用此行为?

Managed to find a solution to this issue on a question on a microsoft techcommunity question .设法在microsoft techcommunity question上的问题上找到此问题的解决方案。 This the reply that solves it:这是解决它的回复:

If you navigate to the bot's app service in Azure portal, go to the configuration settings and add the key value pair EnablePreciseAnswer:false then this will remove the precise answer or short answer from the response.如果您导航到 Azure 门户中的机器人应用程序服务,go 到配置设置并添加键值对EnablePreciseAnswer:false那么这将从响应中删除精确答案或简短答案。 You will need to save the change and restart the app service for the change to take effect.您需要保存更改并重新启动应用服务以使更改生效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM