微软 luis 费用_从Microsoft Luis迁移到rasa开源nlu

微软 luis 费用

介绍 (Introduction)

Many Chatbot Designs Are Dependent On A Standalone NLU API

许多Chatbot设计依赖于独立的NLU API

Migrating your chatbot/NLU solution from one environment to another is not something which will happen frequently. Should you consider it, the prime reason will most probably be cost, hosting options, customization.

将您的chatbot / NLU解决方案从一种环境迁移到另一种环境并不是一件容易的事。 您应该考虑一下,主要原因可能是成本,托管选项,自定义。

好消息: (The good news:)

  • Most NLU environments export into a text/JSON format which can be easily manipulated to suit the new required format.

    大多数NLU环境都导出为text / JSON格式,可以轻松对其进行操作以适应新的所需格式。
Image for post
Microsoft Bot Architecture overlaid on the Rasa architecture.
Microsoft Bot体系结构覆盖在Rasa体系结构上。
  • Some architectures have a clear separation between NLU and the other components (State Management, dialog, integration, forms etc.)

    某些体系结构在NLU和其他组件(状态管理,对话框,集成,表单等)之间有明确的区分。
  • The Microsoft environment is a good example of this clear separation. Hence LUIS, can be migrated to Rasa NLU while the bot framework or composer environment remains largely intact. With larger implementations in can make sense to split the functionality across different platforms.

    Microsoft环境是这种清晰分离的一个很好的例子。 因此,可以在机器人框架或作曲者环境保持完好无损的同时将LUIS迁移到Rasa NLU。 通过更大的实现,可以在不同平台之间拆分功能。
  • Intents are usually very easily transformable.

    意向通常很容易转换。

不太好消息: (The not-so-good news:)

  • Various different entity types exist between vendors and environments. Migrating entities successfully sans human intervention is in most cases not possible. IBM Watson has very generic annotate-able entities. But LUIS has the most advanced and complex array of entity types.

    供应商和环境之间存在各种不同的实体类型。 在大多数情况下,如果没有人为干预,则无法成功迁移实体。 IBM Watson具有非常通用的可注释实体。 但是LUIS具有最先进和最复杂的实体类型数组。
  • Thorough testing will be required to ensure no vulnerabilities are introduced in the process.

    将需要进行彻底的测试以确保在此过程中不引入任何漏洞。
  • If you do not have segmentation of chatbot elements (NLU, State Machine, abstraction/integration etc.) this process will be much harder. Think here IBM Watson Assistant.

    如果您没有对聊天机器人元素(NLU,状态机,抽象/集成等)进行分段,则此过程将更加困难。 在这里考虑IBM Watson Assistant。
  • It is not a bad thing, but structures and types are being introduced to entities, which complicates migration. These structures differ considerably between the various platforms. Which means entities cannot merely be transferred. The best fit in the new environment needs to be identified and the structure transposed.

    这不是一件坏事,但是结构和类型被引入到实体中,这使迁移变得复杂。 这些结构在各个平台之间存在很大差异。 这意味着实体不能仅仅被转移。 需要确定新环境中最合适的位置,并转换结构。

Rasa… Here are a few reasons why we see developers switching:Faster: Runs locally — no http requests and server round trips required

Rasa… 以下 是我们看到开发人员切换的一些原因:更快 :在本地运行-无需HTTP请求和服务器往返

Customizable: Tune models and get higher accuracy with your data set

可自定义 :调整模型并通过数据集获得更高的准确性

Open source: No risk of vendor lock-in — Rasa is under the Apache 2.0 license and you can use it in commercial projects.

开源 :不存在供应商锁定的风险-Rasa受Apache 2.0许可,您可以在商业项目中使用它。

仅Rasa NLU (Rasa NLU Only)

Although valuable functionality will fall along the wayside, Rasa can be used very conveniently as a NLU Engine and API alone.

尽管有价值的功能会逐渐消失,但是Rasa可以非常方便地单独用作NLU引擎和API。

Intents are defined, with annotated entities. Hence entities are defined by their context.

使用带注释的实体定义了意图。 因此,实体由其上下文定义。

LUIS环境 (The LUIS Environment)

The LUIS Environment created for the migration is a simple travel information NLU configuration. Three of the four available entity types in LUIS were used:

为迁移创建的LUIS环境是一个简单的旅行信息NLU配置。 在LUIS中使用了四种可用的实体类型中的三种:

  • Machined Learned

    机器学习
  • List

    清单
  • Regex

    正则表达式

Pattern.any is a very specialized entity type and I thought not to include it.

Pattern.any是一种非常专业的实体类型,我认为不包括它。

Image for post
Entity types within LUIS
LUIS中的实体类型

The three entities created are:

创建的三个实体是:

  • ConfirmationCode: Entity of Type Regex expecting a 5 digit code constituted only by numbers.

    ConfirmationCode:正则表达式类型的实体,期望由数字组成的5位数字代码。

  • Continents: Entity of Type List.

    大陆:类型列表实体。

  • TravelDetail: Made up of a Machine Learned entity type.

    TravelDetail:由机器学习的实体类型组成。

Image for post
Three Entities created covering each of the three types.
创建了三个实体,分别覆盖三种类型。

Below is a view of our single intent called Travel with the example utterances. You will see that these utterances are relatively complex with multiple entities per utterance.

下面是带有示例话语的单一意图“ 旅行”的视图。 您将看到这些话语相对复杂,每个话语包含多个实体。

Image for post
Annotating Utterance Example with Entity Elements
使用实体元素注释话语示例

We could break these up into multiple intents to make the intents simpler. However, LUIS allows us to create complex entities, thus simplifying the intents process.

我们可以将它们分解为多个意图,以简化意图。 但是,LUIS允许我们创建复杂的实体,从而简化了意图流程。

We start by defining a single entity named:

我们首先定义一个名为:

  • 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

    前往城市

Image for post
Adding Sub-Entities: ML Entity Composed of Smaller Sub-Entities
添加子实体:由较小的子实体组成的ML实体

Here are the intent examples, used to train the model with the entity, sub-types, and sub-sub-types; fully contextualized.

这是意图示例,用于通过实体,子类型和子子类型训练模型; 充分情境化。

Image for post
Annotated Intent Examples
带注释的意图示例

Testing the interface in the test console is demonstrated here…

在此演示了在测试控制台中测试界面的方法…

Image for post
Testing the NLU Application
测试NLU应用程序

Lastly the LUIS NLU Application is exported in a JSON format.

最后,LUIS NLU应用程序以JSON格式导出。

Image for post
Export the NLU application in JSON format
以JSON格式导出NLU应用程序

Rasa NLU过程 (Rasa NLU Process)

The Rasa procedure is detailed on this page of the Rasa website:

Rasa网站的此页面上详细介绍了Rasa程序:

During the import process, this error message is displayed multiple times…more about this later.

在导入过程中,此错误消息会多次显示。

UserWarning: Your luis data schema version 7.0.0 is higher than 5.x.x. Training may not be performed correctly.

测试Rasa NLU (Testing The Rasa NLU)

The same three utterances were used after migration to Rasa NLU…

迁移到Rasa NLU后,使用了相同的三种发音…

  • All intents were detected correctly.

    正确检测到所有意图。
  • Regex and List entities were not detected.

    未检测到正则表达式列表实体。

  • Machine Learned entities where detected very accurately. However, the nested entity types were not detected. But this did not surprise me.

    机器学习的实体,可以非常准确地进行检测。 但是,未检测到嵌套实体类型。 但这并不令我惊讶。

Image for post
Rasa NLU detected all the entities and intent for the machined learned entities.
Rasa NLU检测到所有实体以及机器学习的实体的意图。

结论 (Conclusion)

The LUIS environment has changed dramatically over the last few months, Machine Learned Entities were introduced to LUIS in November of 2019. Hence I am not surprised that Rasa is two LUIS schema versions behind.

在过去几个月中, LUIS环境发生了巨大变化,机器学习实体于2019年11月引入LUIS。因此,对于Rasa落后于两个LUIS模式版本,我并不感到惊讶。

Will I use the auto migration tool? It might be a useful starting point.

我会使用自动迁移工具吗? 这可能是一个有用的起点。

However, the approach I will follow is:

但是,我将遵循的方法是:

  • Export the LUIS NLU Application in JSON format.

    以JSON格式导出LUIS NLU应用程序。
  • Plan & Decide which Rasa entity types best match and represent the LUIS entity types.

    计划并确定哪种Rasa实体类型最匹配并代表LUIS实体类型。
  • Create a Rasa nlu.md file based on the LUIS JSON file. This could be manual or programmatic.

    基于LUIS JSON文件创建Rasa nlu.md文件。 这可以是手动的或程序的。

I am sure Rasa’s entity structure will also evolve over time; as they are also introducing entity types; currently in Beta. Hence your NLU entity situation will not be static and evolve over time as your NLU environment evolve. Hence continuous and ongoing consideration is necessary to improve the NLU performance and leverage new functionality.

我相信Rasa的实体结构也会随着时间而发展; 因为他们也在引入实体类型; 目前处于Beta版 。 因此,随着您的NLU环境的发展,您的NLU实体状况将不会是静态的,并且会随着时间的推移而发展。 因此,需要持续不断地考虑以提高NLU性能并利用新功能。

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

翻译自: https://medium.com/@CobusGreyling/migrating-to-rasa-open-source-nlu-from-microsoft-luis-2b9e39092e

微软 luis 费用

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值