AI智能
改变未来

亚马逊训练alexa的方法_Alexa对话是AI驱动的对话界面新方法

亚马逊训练alexa的方法

介绍 (Introduction)

Looking at the chatbot development tools and environments currently available, there are three ailments which require remedy:

查看当前可用的聊天机器人开发工具和环境,有三种需要补救的疾病:

  • Compound Contextual Entities

    复合上下文实体

  • Entity Decomposition

    实体分解

  • Deprecation of Rigid State Machine, Dialog Management

    弃用刚性状态机,对话框管理

The aim of Alexa Conversations is to take voice interactions from one shot interactions to multi-turn interactions. More complex conversations like booking a flight, ordering food or banking demands multi-turn conversations.

Alexa对话的目的是将语音互动从一次射击互动转变为多回合互动。 更复杂的对话(例如预订航班,订购食物或银行业务)需要多回合对话。

One could say conversational commerce demands an environment to develop multi-turn conversations fast and efficient. Amazon must have recognized this and Alexa Conversations is their foray into addressing this need.

可以说对话商务需要一种环境来快速有效地进行多轮对话。 亚马逊一定已经意识到这一点,而Alexa Conversations是他们满足这一需求的尝试。

复合上下文实体 (Compound Contextual Entities)

Huge strides have been made in this area and many chatbot ecosystems accommodate these.

在这一领域已经取得了长足的进步,许多聊天机器人生态系统都适应了这些。

上下文实体 (Contextual Entities)

The process of annotating user utterances is a way of identifying entities by their context within a sentence.

注释用户话语的过程是一种通过句子中的上下文标识实体的方法。

Contextual Entity Annotation In IBM Watson Assistant IBM Watson Assistant中的上下文实体注释

Often entities have a finite set of values which are defined. Then there are entities which cannot be represented by a finite list; like cities in the world or names, or addresses. These entity types have too many variations to be listed individually.

通常,实体具有一组定义的有限值。 还有一些实体不能用有限列表来表示。 例如世界上的城市或名称或地址。 这些实体类型有太多变化,无法单独列出。

For these entities, you must use annotations; entities defined by their contextual use. The entities are defined and detected via their context within the user utterance.

对于这些实体,必须使用批注; 由其上下文使用定义的实体。 实体是通过用户话语中的上下文来定义和检测的。

复合实体 (Compound Entities)

The basic premise is that users will utter multiple entities in one sentence.

基本前提是用户将在一句话中说出多个实体。

Users will most probably express multiple entities within one utterance; referred to as compound entities.

用户很可能会在一句话中表达多个实体。 称为复合实体。

In the example below, there are four entities defined:

在下面的示例中,定义了四个实体:

  • travel_mode

    travel_mode

  • from_city

    from_city

  • to_cyt

    to_cyt

  • date_time

    约会时间

Extract of NLU.md File In Rasa Project Rasa项目中NLU.md文件的提取

These entities can be detected within the first pass and confirmation solicited from the user.

可以在第一遍内检测到这些实体,并向用户征求确认。

实体分解 (Entity Decomposition)

Microsoft LUIS方法 (The Microsoft LUIS Approach)

Entity decomposition is important for both intent prediction and for data extraction with the entity. The best way to explain this is by way of an example.

实体分解对于意图预测和与实体的数据提取都很重要。 最好的解释方式是通过示例。

We start by defining a single entity, called

我们首先定义一个称为

  • Travel Detail.

    旅行细节 。

Within this entity, we defined three sub-entities. You can think of this as nested entities or sub-types. The three sub-types defined are:

在这个实体中,我们定义了三个子实体。 您可以将其视为嵌套实体或子类型。 定义的三个子类型是:

  • Time Frame

    大体时间

  • Mode

    模式

  • City

From here, we have a sub-sub-type for City:

在这里,我们有一个City的子子类型:

  • From City

    从城市出发

  • To City

    前往城市

Adding Sub-Entities: ML Entity Composed of Smaller Sub-Entities 添加子实体:由较小的子实体组成的ML实体Annotated Intent Examples 带注释的意图示例

The leader in entity decomposition is Microsoft LUIS, you can read more about it here. I would say LUIS have a complete solution in this regards.

实体分解的领导者是Microsoft LUIS,您可以在此处了解更多信息。 我想说LUIS在这方面有一个完整的解决方案。

亚马逊Alexa对话 (Amazon Alexa Conversations)

Conversations have a similar option, though not as complete and comprehensive as LUIS. Within conversations you can define entities, which Amazon refers to Slots.

对话具有类似的选择,尽管不如LUIS完整和全面。 在对话中,您可以定义实体(Amazon指插槽)。

Amazon Alexa Conversations: Slot Type With Properties (Amazon Alexa对话 :带属性的插槽类型( PCS)PCS )

The aim during the conversations is to fill these slots (entities). Within conversations you can create a slot with multiple properties attached to it. These properties can be seen as sub-slots or sub-categories which together constitute the higher order entity.

对话期间的目的是填补这些空缺(实体)。 在对话中,您可以创建一个具有多个属性的插槽。 这些属性可以看作是子时隙或子类别,它们共同构成了更高阶的实体。

Alexa Conversations introduces a new slot type custom with properties (PCS).

Alexa Conversations引入了一个新的具有属性(PCS)的自定义插槽类型。

Constituting a collection of slots which are hierarchical. This can be used to pass structured data between build-time components such as API Definitions and response templates.

构成一组分层的插槽。 这可用于在构建时组件(例如API定义)和响应模板之间传递结构化数据。

淘汰刚性状态机对话框管理 (Deprecation Of Rigid State Machine Dialog Management)

Deprecating the state machine for dialog management demands a more abstract approach; many are not comfortable of relinquishing control to an AI model.

弃用状态机进行对话管理需要一种更抽象的方法; 许多人不愿意放弃对AI模型的控制。

The aim of Alexa Conversations (AC) is to furnish developers with the tools to build a more natural feeling Alexa skill with fewer lines of code. AC is an AI-driven approach to dialog management that enables the creating of skills that users can interact with in a natural unconstrained manner. This AI-driven

Alexa Conversations( AC )的目的是为开发人员提供工具,以更少的代码行构建更自然的Alexa技能。 AC是一种由AI驱动的对话框管理方法,可以创建用户可以自然而不受限制地进行交互的技能。 这种AI驱动

Alexa Conversations In The Alexa Development Console Alexa开发控制台中的Alexa对话

approach is more abstract, but more conversation driven from a development process. Sample dialogs are important, together with annotation of data.

方法更抽象,但是更多的对话是由开发过程驱动的。 样本对话框以及数据注释非常重要。

You provide Alexa with a set of dialogs to demonstrate the functionalities required for the skill.

您为Alexa提供了一组对话框,以演示该技能所需的功能。

The build time systems behind Alexa Conversations will take the dialogs and create thousands of variations of these examples. This build process takes quite a while to complete.

Alexa对话背后的构建时间系统将采用对话框并创建这些示例的数千种变体。 此构建过程需要相当长的时间才能完成。

Fortunately any errors are surfaced at the start of the process, which is convenient.

幸运的是,在过程开始时会出现任何错误,这很方便。

AC builds a statistical model which interpret customer inputs & predict the best response from the model.

AC建立了一个统计模型,该模型可以解释客户输入并预测模型的最佳响应。

From that information, AC will be able to make accurate assumptions .

根据这些信息, AC将能够做出准确的假设。

AC uses AI to bridge the gap between voice application you can build manually and the vast range of possible conversations.

AC使用AI弥合了您可以手动构建的语音应用程序与各种可能的对话之间的鸿沟。

框架组件 (Framework Components)

The five build-time components are:

五个构建时组件是:

  • Dialogs

    对话方块

  • Slots

    插槽

  • Utterance Sets

    话语集

  • Response Templates

    响应模板

  • API Definitions

    API定义

对话方块 (Dialogs)

Dialogs are really example conversations between the user and Alexa you define. You cans see the conversation is multi-turn and complexity is really up to you to define.

对话框实际上是用户与您定义的Alexa之间的示例对话。 您可以看到对话是多回合的,而复杂度确实取决于您。

Dialogs: Example Conversations对话框 :对话示例

For the prototype there are three entities or slots we want to capture, and four dialog examples with four utterances each were sufficient. Again, these conversations or dialogs will be used by AC to create an AI model to produce a natural and adaptive dialog model.

对于原型,我们要捕获三个实体或插槽,并且四个带有四个发音的对话示例就足够了。 同样, AC将使用这些对话或对话框来创建AI模型,以生成自然的自适应对话框模型。

插槽 (Slots)

Slots are really the entities you would like to fill during the conversation. Should the user utter all three required slots in the first utterance, the conversation will only have one dialog turn.

广告位确实是您希望在对话期间填写的实体。 如果用户在第一声中说出了所有三个必需的位置,则对话将只有一个对话转弯。

Two Types of Slots: Value Slots and Properties两种类型的广告位 :价值广告位和属性广告位

The conversation can be longer of course, should it take more conversation turns to solicit the relative information from the user to fill the slots. The interesting part is the two types of slots or entities. The custom defined slots with values, and the one with properties.

当然,如果要花费更多的会话轮流从用户那里获取相关信息以填补空缺,则会话可以更长。 有趣的部分是插槽或实体的两种类型。 自定义的插槽包含值,一个具有属性。

Alexa Conversations introduces custom slot types with properties (PCS) to define the data passed between components. They can be singular or compound. As stated previously, compound entities or slots can be decomposed.

Alexa Conversations引入了具有属性(PCS)的自定义插槽类型,以定义在组件之间传递的数据。 它们可以是单数化合物 。 如前所述,复合实体或插槽可以分解。

Compound entities which can be decomposed will grow in implementation and you will start seeing it used in more frameworks.

可以分解的复合实体将在实现中增长,您将开始看到它在更多框架中的使用。

话语集 (Utterance Sets)

Utterance Sets are groups of utterances that users may say to Alexa, which can include slots. They are used when annotating User Input turns in a Dialog.

话语集是用户可以对Alexa说的话语组,其中可以包括插槽。 当在对话框中注释用户输入时使用它们。

This is the one big drawback I see in AC, is the fact for each permutation of slots/entities, examples need to be defined.

这是我在AC中看到的一个最大缺点那就是对于插槽/实体的每个排列,都需要定义示例。

For example:

例如:

1. abc
2. a
3. b
4. c
5. ab
6. bc
7. ac

For the three slots/entities, seven example sets need to be given. Imagine how this expands, should you have more slots/entities.

对于三个插槽/实体,需要给出七个示例集。 想象一下,如果您有更多的广告位/实体,它会如何扩展。

Utterance Sets 话语集

响应模板 (Response Templates)

Responses are how Alexa responds to users in the form of audio and visual elements. They are used when annotating Alexa Response turns in a Dialog.

响应是Alexa以音频和视频元素的形式对用户做出响应的方式。 在注释Alexa响应时在对话框中使用它们。

Responses Defined 定义的回应

API定义 (API Definitions)

API Definitions define interfaces with your back-end service using arguments as inputs and return as output.

API定义使用参数作为输入定义与后端服务的接口,并作为输出返回。

结论 (Conclusion)

AC is a definite a move in the right direction…

AC无疑是朝着正确方向迈进的一步。

善良 (The Good)

  • The advent of compound slots/entities which can be decomposed. Adding data structures to Entities.

    可以分解的复合缝隙/实体的出现。 向实体添加数据结构。

  • Deprecating the state machine and creating an AI model to manage the conversation.

    弃用状态机并创建AI模型来管理对话。

  • Making voice assistants more conversational.

    使语音助手更具对话性。

  • Contextually annotated entities/slots.

    上下文注释的实体/插槽。

  • Error messages during the building of the model were descriptive and helpful.

    建立模型期间的错误消息是描述性的且有帮助的。

不太好 (The Not So Good)

  • It might sound negligible; but building the model takes a while. I found that the errors in my model was surfaced at the beginning of the model building process, and training stopped. Should your model have no errors, the build is long.

    听起来微不足道; 但是建立模型需要一段时间。 我发现模型建立过程的开始就浮出了模型中的错误,并且训练停止了。 如果您的模型没有错误,则构建时间很长。

  • Defining utterance sets are cumbersome. Creating utterance sets for all possible permutations if you have a large number of slots/entities is not ideal.

    定义话语集很麻烦。 如果您有大量的广告位/实体,则为所有可能的排列创建话语集是不理想的。

  • It is complex, especially compared to an environment like Rasa. The art is to improve the conversational experience by introducing complex AI models; while simultaneously simplifying the development environment.

    它很复杂,特别是与Rasa这样的环境相比。 技巧是通过引入复杂的AI模型来改善对话体验; 同时简化了开发环境。

在这里阅读更多 (Read More Here)

翻译自: https://medium.com/@CobusGreyling/alexa-conversations-is-a-new-ai-driven-approach-to-conversational-interfaces-fe8d2a562602

亚马逊训练alexa的方法

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » 亚马逊训练alexa的方法_Alexa对话是AI驱动的对话界面新方法