如何在AWS lex上具有自由文本自定义插槽类型

问题描述

我需要一个可以接受任何类型输入的广告位类型。我要指出的广告位是从客户那里获得评论反馈。

在考虑了所有可能的选项之后,唯一的解决方法是使用有关所有搜索结果提供的自定义广告位类型的训练数据作为解决方案,这对我来说完全是一场噩梦。

我提供了130多个示例数据,但没有用,有95%失败了。

我还有更多的插槽需要自由文本插槽。

请执行任何获得自由文本的操作,需要帮​​助:(

解决方法

您肯定会希望通过检查<label>@How To Display EmailAddressHere</label> <label>@How To Display Body</label> @code { public class EmailItems { public string EmailAddress { get; set; } public string Body { get; set; } } protected override void OnInitialized() { var emailItems = new EmailItems() { Body = "testBody",EmailAddress= "[email protected]",}; } }

来解析输入并在Lambda函数中对其进行验证

有关其他操作的更多详细信息,请参见此处:

What is Amazon Lex inbuilt slot type for description or notes?

AWS Lex + Lambda - Intercepting all of next user response regardless of context - without defining sample utterances?

,

与该功能最接近的地方是可以使用的插槽,它可以捕获自由文本-AMAZON.SearchQuery

尽管应随附有关该插槽类型的说明,但仍应仔细阅读该插槽类型的文档,并在继续进行测试之前进行测试。

除此以外,请参阅5 Techniques to Replace AMAZON.LITERAL and Improve Skill Accuracy博客文章,其中涵盖了可以使用的技术。

,

请参阅本文,我们有一个生成插槽类型值的python代码。

https://aws.amazon.com/blogs/machine-learning/create-a-translator-chatbot-using-amazon-translate-and-amazon-lex/

现在我有1000个值,但是我面临另一个问题。 Slot type works different for slots AWS LEX