azure - QnA bot only responds when using exact phrasing in Azure and Teams Chat
问题描述
I created a bot in the Microsoft QnA Maker, and have been testing the QnA pairs in the Maker for a while now. The bot is able to recognize the QnA pairs that I made even if other words are used in the question. However, after introducing the bot to and testing it in both Azure Test Chat and in Teams Chat, I've found that the bot only responds appropriately when using the exact question phrasing.
The bot has a QnA pair where the question is "hello". In QnA Maker Test if I send it variations of this question, such as "hello wicky" or "hello there" then the bot recognizes the pair and responds with the appropriate answer. When testing in Azure and Teams, the bot ONLY responds appropriately if I say "hello". If I say any variations then it just responds with "No good match in FAQ."
My bot has never had problems answering questions that contain other words, but aren't the EXACT question, when testing in QnA Maker. It only seems to be picky when testing in Azure and in Teams. I've republished the bot multiple times, and ensured that the Knowledge Base ID and Subscription Key are correct. What are my options here?
解决方案
这是要检查的东西。如果您使用 Bot Service 的起始代码,您可能会从 QnAMakerDialog 继承一个 Dialog。构造函数采用几个参数,包括在没有好的匹配时返回的消息,以及何时返回没有好的匹配文本的最小置信度分数。例如,这是继承自 QnAMakerDialog 的类的构造函数:
public BasicQnAMakerDialog() : base(new QnAMakerService(new QnAMakerAttribute(Utils.GetAppSetting("QnASubscriptionKey"), Utils.GetAppSetting("QnAKnowledgebaseId"), "No good match in FAQ.", 0.5)))
{}
请注意,“No good match”文本实际上设置为“No good match in FAQ”,最小置信度得分为 0.5。
如果您签入 QnAMaker 测试聊天,您应该会看到与消息一起返回的置信度分数。您可以尝试降低最低置信度分数以防止收到不匹配的消息。
改进你的机器人
您可以在 QnAMaker 中为您的机器人添加替代短语,然后重新训练并发布模型。洗涤,冲洗,重复。您也可以尝试记录 QnAMaker 返回的置信度分数低于阈值的问题。这将为您的用户提出的问题提供一个起点,因为您的机器人没有很好的答案。
根据您的知识领域,您还可以尝试搜索 Web 并总结最重要的结果,然后将其返回给用户,而不仅仅是“未找到好的匹配项”。这就是 Siri 干涸时所做的事情,这似乎就像我问它的所有问题一样。
推荐阅读
- r - 如何使用 ggplot2 为时间序列数据创建功能区区域?
- javascript - YouTube 数据 API 查询量激增
- python - 如何用条件填充缺失值?
- node.js - 猫鼬排序嵌套的对象数组不起作用
- java - XSD schemaLocation、targetNamespace、默认 XML 命名空间匹配
- blazor - Blazor WebAssembly Server 项目如何引用客户端索引?
- javascript - 在Javascript中设置显示属性无
- typescript - 打字稿 - 选项对象或生成器
- c# - 匹配 C# 8.0 开关表达式中的任何整数类型
- sql - 是否有任何简单的方法可以在 oracle sql developer 中将“值”放在单引号中以选择语句