如何通过评审终结点言语来改进 LUIS 应用How to improve the LUIS app by reviewing endpoint utterances

评审终结点言语以进行正确预测的过程称为主动学习The process of reviewing endpoint utterances for correct predictions is called Active learning. 主动学习捕获终结点查询并选择用户不确定的终结点话语。Active learning captures endpoint queries and selects user's endpoint utterances that it is unsure of. 评审这些言语以选择意向并标记这些真实言语的实体。You review these utterances to select the intent and mark entities for these real-world utterances. 将这些更改接受到示例言语中,然后对其进行训练并将其发布。Accept these changes into your example utterances then train and publish. 然后 LUIS 更准确地识别话语。LUIS then identifies utterances more accurately.

记录用户查询以启用主动学习Log user queries to enable active learning

若要启用主动学习,必须记录用户查询。To enable active learning, you must log user queries. 这是通过 log=true querystring 参数和值调用终结点查询实现的。This is accomplished by calling the endpoint query with the log=true querystring parameter and value.

使用 LUIS 门户构造正确的终结点查询。Use the LUIS portal to construct the correct endpoint query.

  1. 登录到 LUIS 门户,选择“订阅”和“创作资源”以查看分配给该创作资源的应用。Sign in to the LUIS portal, and select your Subscription and Authoring resource to see the apps assigned to that authoring resource.

  2. 在“我的应用”页上选择应用名称以打开应用。Open your app by selecting its name on My Apps page.

  3. 转到“管理”部分,然后选择“Azure 资源”。Go to the Manage section, then select Azure resources.

  4. 对于分配的预测资源,选择“更改查询参数”。For the assigned prediction resource, select Change query parameters.

    屏幕截图显示“更改查询参数”链接。Screenshot shows the Change query parameters link.

  5. 切换“保存日志”,然后选择“完成”进行保存。Toggle Save logs then save by selecting Done.

    使用 LUIS 门户保存日志,这是主动学习所必需的。Use LUIS portal to save logs, which is required for active learning.

    此操作通过添加 log=true 查询字符串参数来更改示例 URL。This action changes the example URL by adding the log=true querystring parameter. 对运行时终结点进行预测查询时,请复制并使用更改后的示例查询 URL。Copy and use the changed example query URL when making prediction queries to the runtime endpoint.

纠正意向预测以匹配言语Correct intent predictions to align utterances

每个陈述的“统一意向”列中都显示一个建议意向。Each utterance has a suggested intent displayed in the Aligned intent column.

查看 LUIS 无法确定的终结点言语Review endpoint utterances that LUIS is unsure of

如果同意该意向,请选择复选标记。If you agree with that intent, select the check mark. 如果不同意建议,请从统一意向下拉列表中选择合适的意向,然后选择统一意向右侧的复选标记。If you disagree with the suggestion, select the correct intent from the aligned intent drop-down list, then select on the check mark to the right of the aligned intent. 在复选标记上进行选择后,言语将移至该意向并从“评审终结点言语”列表中删除。After you select on the check mark, the utterance is moved to the intent and removed from the Review Endpoint Utterances list.

提示

若要查看并纠正来自“评审终结点言语”列表中的所有示例言语的实体预测,请务必转到意向详细信息页。It is important to go to the Intent details page to review and correct the entity predictions from all example utterances from the Review Endpoint Utterances list.

删除陈述Delete utterance

可删除评审列表中的每个陈述。Each utterance can be deleted from the review list. 删除后,该陈述将不再出现在列表中。Once deleted, it will not appear in the list again. 即使用户从终结点中输入同一陈述,结果也是如此。This is true even if the user enters the same utterance from the endpoint.

如果不确定是否应删除言语,请将其移至 None 意向,或创建新的意向(例如 miscellaneous),并将言语移至该意向。If you are unsure if you should delete the utterance, either move it to the None intent, or create a new intent such as miscellaneous and move the utterance to that intent.

禁用主动学习Disable active learning

若要禁用主动学习,请不要记录用户查询。To disable active learning, don't log user queries. 这可以通过使用 log=false 查询字符串参数和值设置终结点查询,或不使用查询字符串值(因为默认值是 false)来实现。This is accomplished by setting the endpoint query with the log=false querystring parameter and value or not using the querystring value because the default value is false.

后续步骤Next steps

若要测试标记建议陈述后的性能提升情况,可通过选择顶部面板中的“测试”访问测试控制台。To test how performance improves after you label suggested utterances, you can access the test console by selecting Test in the top panel. 有关如何使用测试控制台测试应用的说明,请参阅训练和测试应用For instructions on how to test your app using the test console, see Train and test your app.