我们的网站使用 QnA Azure 聊天机器人。由于某种原因,当用户提出问题时,机器人会回复两条消息 - 一条包含知识库中答案的一小部分,另一条包含完整答案。这种情况总是在相同的响应中发生,大约一半有此错误,另一半则没有。似乎没有一种模式会影响答案,而不会影响答案。下面的例子:
任何帮助将不胜感激。
我浏览了我的知识库,看看这些有问题的问题是否有任何共同点(即包含链接、文本格式、字符数等),但没有发现任何可以提供帮助的模式。文档中也没有任何相关内容。
我尝试复制相同的代码,找到下面的代码并尝试一下,它对我有用,导入它并尝试一下
{
"entityResolver": {
"searchConfiguration": {
"maxEdits": 0
},
"type": "internal",
"isGenerated": true
},
"minIntentConfidence": 0.4,
"highIntentConfidence": 0.8,
"lgTemplates": [
"# FallbackResponse",
"- Add your fallback message here",
"# TestCommand-MyNumber",
"- what number?",
"# TestCommand-27dfe650040311ebb2dccf4459b3ff8b",
"- confirmed.",
"# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b",
"- denied.",
"# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b",
"- sure?"
],
"type": "BaseLanguage",
"recognizer": {
"application": "",
"isStaging": false,
"versionId": "0.1",
"type": "luis"
},
"speechOutput": {
"font": "Microsoft Server Speech Text to Speech Voice (en-US, Aria24kRUS)",
"locale": "en-US"
},
"webEndpoints": [],
"globalParameters": [],
"commands": [
{
"name": "FallbackCommand",
"completionStrategy": "OnRequiredParameters",
"parameters": [],
"rules": [],
"completionRules": [
{
"name": "DefaultResponse",
"conditions": [
{
"type": "True"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# FallbackResponse"
}
}
],
"postExecutionState": "None"
}
],
"triggeringExamples": [
"> - You can start sentences with '>' to add comments.",
"> - You can also use parameters by adding the name of the parameter within curly braces, i.e.",
"> Set an alarm to {YourDateParameterName}",
"> Where YourDateParameterName is the name of a parameter defined in the 'Parameters' section.",
"Help",
"Help me",
"What can you do?",
"How can I start?",
"Hello",
"Hi"
],
"multiTurnExamples": []
},
{
"name": "TestCommand",
"completionStrategy": "OnRequiredParameters",
"parameters": [
{
"name": "MyNumber",
"type": {
"name": "Number"
},
"elicitResponse": {
"type": "Template",
"templateName": "# TestCommand-MyNumber"
}
}
],
"rules": [
{
"name": "Confirm command",
"conditions": [
{
"type": "AllRequiredParameters"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [
{
"type": "Confirmation"
}
],
"postExecutionState": "WaitForInput"
},
{
"name": "Confirmation succeeded",
"conditions": [
{
"type": "SuccessfulConfirmation"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-27dfe650040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [],
"postExecutionState": "ReadyForCompletion"
},
{
"name": "Confirmation denied",
"conditions": [
{
"type": "DeniedConfirmation"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [],
"postExecutionState": "CompleteCommand"
}
],
"completionRules": [
{
"name": "Done",
"conditions": [
{
"type": "True"
}
],
"actions": [],
"nextTurnExpectations": [],
"postExecutionState": "CompleteCommand"
}
],
"triggeringExamples": [
"number {MyNumber}",
"my number is {MyNumber}"
]
}
]
}