如何使用 Node.js 将多个知识库添加到 Azure 门户中的单个机器人?

How to add multiple knowledge base to a single bot in Azure portal using Node.js?

我有两个知识库,我想将它们都用于一个机器人来搜索答案。如何使用多个知识库。

以下是我的回答here. A sample nodejs application is available in the official repo

有指南和示例项目 available here

基本上,您创建一个 LUIS 应用程序,然后使用 Dispatch 工具创建一个本地文件,该文件扫描您的所有知识库并提取您的问题以用作 LUIS 在您的案例中调用 utterances, these utterances are then used to determine the user's LUIS intent 的内容要使用的知识库。基本上,LUIS 中的调度应用充当路由器。一种是您在本地创建了调度文件,然后您需要将其推送到您的 LUIS 应用程序(dispatch create 命令)。

我建议下载 sample app and running through the whole process to get a basic understanding of how everything fits together. Once you have published your LUIS app you will be able to test it within the LUIS portal by inputting example utterances and inspecting the reply to see the intent that was selected. The documentation for the Dispatch tool is available here, please note that when you update your knowledge bases (by adding new entries or alternative phrasing) after publishing your dispatch app initially you will have to refresh your dispatch model for these new questions/alternative phrase to have an utterance added in LUIS to that map to the correct LUIS intent - otherwise they will return the None 意图。

注意。您可以通过在获得 "None" 意图返回并遍历所有知识库以请求用户查询的答案时处理这种情况来绕过更新调度程序的需要 return以更高的分数回答(有一个集合来保存每个知识库的答案)但我不推荐它,因为你错过了 LUIS and QnA Maker.

主动学习的好处