UiPath Documentation
document-understanding
2022.10
false
Document Understanding 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

训练高效能模型

机器学习模型的强大功能在于,它们是由训练数据定义的,而不是由计算机代码中表示的显式逻辑定义的。这意味着在准备训练数据集时需要格外小心,因为模型最高仅能达到与训练数据集一样好的效果。从这个意义上说,UiPath Studio 对于 RPA 工作流来说,就相当于 Document Manager 对于机器学习功能。两者都需要一定的经验才能有效使用。

数据提取 ML 模型有什么作用?​

ML 模型可以从单一类型的文档中提取数据,尽管它可能涉及多种不同的语言。至关重要的是,每个字段(“总计”,“日期”等)必须有一个一致的含义。如果人们对字段的正确值感到困惑,那么 ML 模型也会发生同样的情况。

可能会出现歧义情况。例如,水电费账单是否就是另一种类型的发票?还是这两种不同的文档类型需要两种不同的 ML 模型?如果您需要提取的字段相同(即含义相同),则可以将其视为单个文档类型。但是,如果出于不同原因(不同的业务流程)需要提取不同的字段,则表明您需要将这些文档视为两种不同的文档类型,因此需训练两种不同的模型。

如有疑问,首先请训练一个模型,但要将文档保存在不同的 Document Manager 批次中(请参阅 Document Manager 视图顶部中心的“筛选”下拉列表),以便稍后在需要时轻松将其分开。如果需要,您可以在以后轻松分离文档,避免丢失标记工作。用于训练 ML 模型的数据越多越好。首先使用包含大量数据的单个模型。

训练组件和评估组件​

Document Manager 可用于构建两种类型的数据集:

  • 训练数据集
  • 评估数据集

这两种类型的数据集对于构建高性能 ML 模型都是必不可少的,并且其创建和维护都需要花费时间和精力。获取高性能 ML 模型需要代表生产文档流量的评估数据集。

每个数据集类型都以不同的方式标记:

  • 训练数据集依赖于页面上代表您需要提取的不同信息的词的边框。
  • 为训练集添加标签时,请关注页面本身和文字框。
  • 评估数据集依赖字段值,这些值显示在侧边栏(适用于常规字段)或顶部栏中(适用于列字段)。
  • 为评估集添加标签时,请注意侧边栏或顶部栏中字段名称下的值。这并不意味着您需要手动输入这些值。我们建议通过单击页面上的框并检查值的正确性来添加标签。

有关如何执行适当评估的更多详细信息,请参阅下文。

数据提取组件​

数据提取依赖于以下组件:

  • 光学字符识别
  • 文字和线条构建
  • 将字符按词语分组中并将词语按从左到右的文本行分组
  • 页面上每个词/框的机器学习模型预测
  • 文本跨度的清理、解析和格式化
  • 例如,将多行中的词语分到一个地址中,将日期格式化为标准 yyyy-mm-dd 格式
  • 应用选择要返回的值的算法
  • 对于文档有 2 页或更多页且某些字段在多页显示的情况

构建高效的 ML 模型​

为了获得最佳的自动化率结果(处理文档流所需的人工工作量每年每人每月减少的百分比),请遵循以下步骤:

  1. 选择最适合您文档的 OCR 引擎
    • 这会影响 OCR、Word 和 Line 构建(部分取决于 OCR)以及随后的所有内容。
  2. 选择一个均衡且具有代表性的数据集进行训练
  3. 选择有代表性的数据集进行评估
  4. 定义要提取的字段
  5. 配置字段
  6. 标记训练数据集
  7. 标记评估数据集
  8. 在 AI Center 中训练和评估模型
  9. 定义并实施用于处理模型输出的业务规则
  10. (可选)选择提取的置信度阈值
  11. 使用来自验证站点的数据进行训练
  12. 自动微调循环(预览版)
  13. 部署自动化

1. 选择一个 OCR 引擎​

要选择 OCR 引擎,您应该创建不同的 Document Manager 会话,配置不同的 OCR 引擎,并尝试将相同的文件导入每个文件中以检查差异。专注于要提取的区域。例如,如果您需要提取发票中作为徽标的一部分显示的公司名称,则可能需要查看哪个 OCR 引擎在徽标中的文本上效果更好。

Your default option should be UiPath Document OCR since it is included with Document Understanding licenses at no charge. However, in cases where some unsupported languages are required, or some very hard-to-read documents are involved, you might want to try Google Cloud (Cloud only) or Microsoft Read (Cloud or On Premises), which have better language coverage. These engines come at a cost, indeed it is low, but if the accuracy is higher on some critical data fields for your business process, it is strongly recommended to use the best OCR available – saving your time later on since everything downstream depends on it.

请注意, “数字化文档”活动的“将 OCR 应用于 PDF”设置默认设为“自动” ,这将根据输入文档确定文档是否需要应用 OCR 算法。将“将 OCR 应用于 PDF”设置为“是” ,确保检测到所有文本,尽管这可能会减慢您的流程,但可以避免(从徽标、页眉、页脚等)漏提取重要信息。

2. 创建训练数据集​

Machine Learning technology has the main benefit of being able to handle complex problems with high diversity. When estimating the size of a training dataset, one looks first at the number of fields and their types, and the number of languages. A single model can handle multiple languages as long as they are not Chinese/Japanese/Korean. Chinese/Japanese/Korean scenarios generally require separate Training datasets and separate models.

字段分为 3 种类型:

  • Regular fields (date, total amount)
  • 对于常规字段,每个字段至少需要 20-50 个文档样本。因此,如果您需要提取 10 个常规字段,则至少需要 200-500 个文档样本。如果您需要提取 20 个常规字段,则至少需要 400-1000 个文档样本。您需要的文档样本数量会随着字段数量的增加而增加。更多的字段意味着您需要更多的文档样本,大约增加 20 到 50 倍。
  • Column fields (item unit price, item quantity)
  • 对于列字段,每个列字段至少需要 50-200 个文档样本,因此,对于 5 个列字段,使用干净简单的布局,您可能会通过 300 个文档样本获得良好的结果。但对于高度复杂和多样化的布局,可能需要超过 1000 个文档样本。要涵盖多种语言,则假设每种语言涵盖所有不同的字段,您至少需要 200-300 个文档样本。因此,对于包含 2 种语言的 10 个标头字段和 4 个列字段,600 个文档样本可能就足够了(列和标头为 400 个文档样本,额外添加一种语言为 200 个),但在某些情况下可能需要 1200 个或更多文档样本。
  • Classification fields (currency)
  • 分类字段通常要求每个类至少提供 10 至 20 个文档样本。

上述准则假设您正在解决高度多样性的场景,例如具有数十到数百或数千种布局的发票或采购订单。但是,如果您要解决布局(少于 5 到 10 个)较少的税表或发票等低多样性场景,则数据集的大小更多地取决于布局的数量。在这种情况下,每个布局应从 20 到 30 页开始,并在需要时添加更多页面 - 尤其是当页面非常密集且要提取大量字段时。例如,创建一个用于从 2 个布局中提取 10 个字段的模型可能需要 60 页,但如果您需要从 2 个布局中提取 50 或 100 个字段,则可以从 100 或 200 页开始,并根据需要添加更多页面,以提高准确性。在这种情况下,常规字段/列字段的区别就不那么重要了。

重要提示:

ML technology is designed to handle high diversity scenarios. Using it to train models on low diversity scenarios (1-10 layouts) requires special care to avoid brittle models that are sensitive to slight changes in the OCR text. Avoid this by having some deliberate variability in the training documents, by printing and then scanning or photographing them using mobile phone scanner apps. The slight distortions or changing resolutions make the model more robust.

这些估计值假定大多数页面都包含所有或大部分字段。对于包含多个页面的文档,但大多数字段位于单个页面上,则相关页数是大多数字段出现的页面的示例数量。

The numbers above are general guidelines, not strict requirements. In general, you can start with a smaller dataset, and then keep adding data until you get good accuracy. This is especially useful to parallelize the RPA work with the model building. Also, a first version of the model can be used to prelabel additional data (see Settings view and Predict button in Document Manager) which can accelerate labeling additional Training data.

深度学习模型可以变得通用​

您不需要在训练集中表示每个布局。实际上,生产文档流程中的大多数布局可能在训练集中有 0 个样本,或者 1 个或 2 个样本。这是可取的,因为您希望利用 AI 的强大功能来理解文档,并能够对训练期间未见过的文档作出正确的预测。每个布局的大量样本并不是强制性的,因为大多数布局可能根本不存在,或者仅出现 1 次或 2 次,而模型仍然能够根据从其他布局的学习情况进行正确预测。

训练开箱即用模型​

为 Document Understanding 训练 ML 模型时,有三种主要类型的场景:

  • 使用 AI Center 中的 DocumentUnderstanding ML 包从头开始训练新型文档
  • 对预训练的开箱即用模型进行重新训练,可用于优化准确性
  • 对预训练的开箱即用模型进行重新训练,以优化准确性以及添加一些新字段

本节标题为“创建训练集”的第一部分介绍了第一种场景的数据集大小估计值。

对于第二种场景,数据集的大小取决于预训练模型在您的文档上的运行效果。如果它们已经运行良好,则您可能只需要很少的数据,可能需要 50-100 页。如果它们在许多重要字段失败,则您可能需要更多数据,但相比于从头开始训练字段,一个良好的起点的数据集大小仍然会小 4 倍。

最后,对于第三种场景,从上述第二种场景的数据集大小开始,然后使用与从头开始训练相同的指导原则,根据新字段的数量增加数据集:每个新的常规字段至少 20-50 页,或每个列字段至少 50-200 页。

在所有这些情况下,所有文档都需要完全标记,包括开箱即用模型无法识别的新字段,以及开箱即用模型能够识别的原始字段。

分布不均匀的字段出现次数​

有些字段可能出现在每个文档上(例如,日期、发票编号),而有些字段可能只出现在 10% 的页面上(例如,处理费用、折扣)。在这种情况下,您需要制定业务决策。如果这些稀有字段对自动化并不重要,则可以使用该特殊字段的少量文档样本(10-15 个),即包含该字段值的页面。但是,如果这些字段至关重要,则需要确保在训练集中至少包含 30-50 个该字段的文档样本,以确保涵盖全部多样性。

平衡数据集​

对于发票而言,如果数据集包含来自 100 个供应商的发票,但数据集的一半包含来自 1 个供应商的发票,则这是一个非常不平衡的数据集。完全平衡的数据集是指每个供应商出现相同次数的情况。数据集不需要达到完美平衡,但您应避免有超过 20% 的整个数据集来自任何一个供应商。如果达到某个点,增加数据就无济于事,它甚至可能影响其他供应商的准确性,因为该模型将极大地优化(过拟合)一个供应商。

代表性数据集​

Data should be chosen to cover the diversity of the documents likely to be seen in the production workflow. For example, if you get invoices in English but some of them come from the US, India and Australia, they probably look different, so you need to make sure you have document samples from all three. This is relevant not only for the model training itself, but also for labeling purposes. When you label the documents you might discover that you need to extract new, different fields from some of these regions, like GSTIN code from India, or ABN code from Australia. See more in the Define fields section.

3. 创建评估数据集​

对于训练集,页面和页数十分重要。对于评估集,我们仅指文档和文档数量。v2021.10 及之后版本的分数是按文档计算的。

评估数据集可以更小。它们可以是 50 到 100 个文档(在低度多样性场景下甚至可以是 30 到 50 个),并且可以随着时间的推移增加到几百个文档。重要的是,它们必须代表生产数据流。因此,一个好的方法是从 RPA 工作流中处理的文档中随机选择。即使某些供应商的人数过多,也没关系。例如,如果单个供应商代表您的发票流量的 20%,也可以让该供应商也成为您的评估集的 20%,因此评估指标近似于您的业务指标,即减少每人每月人工文档处理花费的工作量。

When importing Evaluation data into Document Manager, you need to check the “Make this an evaluation set” box on the Import dialog window. This guarantees that the data is held out when training, and also you can easily export it for running Evaluations using the evaluation-set option in the Filter dropdown in Document Manager.

重要提示:

Starting with the 21.9 Preview release in Automation Cloud and the 21.10 GA On Premises release, Document Manager has switched to handling multi-page documents rather than each page as a separate entity. This is a major change, especially for Evaluations, which were its main motivation. Evaluations need to be representative of the runtime process, and at runtime, multipage documents are processed as a whole, rather than as separate pages. To benefit from this enhancement in ML Packages with version 21.10 or later, you just need to leave the "Backward compatible export" box unchecked in the Export dialog. If you check this box, the dataset is exported in the old page-by-page way, and evaluation scores are not as representative of the runtime performance.

4. 定义字段​

定义字段是一场需要与拥有业务流程本身的主题专家或领域专家进行的对话。对于发票,它将是应付账款流程的所有者。此对话非常重要,需要在标注任何文档之前进行以避免浪费时间,并且还需要一起查看至少 20 个随机选择的文档样本。为此,我们需要预留一个小时的时间段,通常需要在几天后重复该时间段,因为准备数据的人员会遇到模棱两可的情况或极端情况。

对话开始时通常会假设您需要提取 10 个字段,然后提取 15 个字段。下面的小节将介绍一些示例。

您需要了解的一些关键配置:

  • 内容类型
  • This is the most important setting as it determines the postprocessing of the values, especially for dates (detects if the format is US-style or non-US style, and then formats them as yyyy-mm-dd) and for numbers (detects the decimal separator – comma or period). ID numbers clean up anything coming before a colon or hash symbol. String content type performs no cleanup and can be used when you want to do your own parsing in the RPA workflow.
  • 多行复选框
  • 这用于解析可能出现在多行文本中的字符串,如地址。
  • 隐藏字段
  • 可以为标记为“隐藏”的字段加标签,但在导出数据时会保留这些字段,因此不会对其应用训练模型。当正在为字段加标签、字段太稀少或其优先级较低时,这很方便。
  • 计分
  • This is relevant only for Evaluation pipelines, and it affects how the accuracy score is calculated. A field that uses Levenshtein scoring is more permissive: if a single character out of 10 is wrong, the score is 0.9. However, if scoring is Exact Match it is more strict: a single wrong character leads to a score of zero. All fields are by default Exact Match. Only String type fields have the option to select Levenshtein scoring.
水电费账单金额​

总金额看似足够简单,但水电费账单中包含很多金额。有时,您需要支付总金额。有时,您只需要当前的账单金额,而不需要从以前的账单周期结转的金额。在后一种情况下,即使当前账单和总金额可以相同,您也需要以不同的方式标注标签。概念不同,金额通常也有所不同。

备注:

Each field represents a different concept, and they need to be defined as cleanly and crisply as possible, so there is no confusion. If a human confuses it, the ML model also does that.

此外,当前账单金额有时可以由一些不同的金额、费用和税款组成,并且可能不会在账单上的任何位置进行个性化定制。一个可能的解决方案是创建两个字段:“先前费用”字段和“总费用”字段。两者在水电费账单上始终显示为不同的显式值。然后,可以获取当前账单金额作为两者之间的差额。为了在当前账单金额显式出现在文档中的情况下进行一些一致性检查,您甚至可能希望包括所有 3 个字段(“先前费用”“总费用”和“当前费用”)。因此,在某些情况下,您可以使用一到三个字段。

发票上的采购订单编号​

PO 编号可以显示为发票的单个值,也可以显示为发票上的行项目表格的一部分,其中每个行项目都有不同的 PO 编号。在本例中,设置两个不同的字段可能较合适:po-no 和 item-po-no。通过在视觉上和概念上保持每个字段的一致性,该模型可能会做得更好。但是,您需要确保“训练”和“评估”数据集都充分体现了这一点。

发票上的供应商名称和付款地址名称​

The company name usually appears at the top of an invoice or a utility bill, but sometimes it might not be readable because there is just a logo, and the company name is not explicitly written out. There could also be some stamp, or handwriting, or wrinkle over the text. In these cases, people might label the name that appears at the bottom right, in the 'Remit payment to' section of the payslip on utility bills. That name is often the same, but not always, since it is a different concept. Payments can be made to some other parent or holding company, or other affiliate entity, and it is visually different on the document. This might lead to poor model performance. In this case, you should create two fields, vendor-name and payment-addr-name. Then you can look both up in a vendor database and use the one that matches, or use payment-addr-name when the vendor-name is missing.

表格行​

我们需要牢记两个不同的概念:表格行和文本行。表格行包含该行中所有列字段的所有值。有时,它们可能全部属于页面上同一行文本的一部分。在其他情况下,它们可能位于不同的行中。

如果表格行包含多行文本,则需要使用“/”热键对表格行中的所有值进行分组。当您执行此操作时,会出现一个绿色框,覆盖整个表格行。这是一个表格示例,其中前 2 行包含多行文本,需要使用“/”热键进行分组,而第三行是单行文本,不需要进行分组。

这是一个表格示例,其中每个表格行都由一行文本组成。您无需使用“/”热键对这些活动进行分组,因为这是由 Document Manager 隐式完成的。

拆分项目

Split Items is a setting that appears only for Column fields, and it helps the model know when a line item ends and another begins. As a human looking at a document, to tell how many rows are there, you probably look at how many amounts are on the right side. Each amount refers to a line item in general. This indicates that line-amount is a column where you should enable Split Items. Other columns can also be marked, in case the OCR misses the line-amount, or the model does not recognize it: quantity and unit-price are usually also marked as 'Split Items'.

5. 配置字段​

最重要的配置是内容类型,但字符串除外:

  • 数字
  • 日期
  • 电话
  • ID 编号

These impact post-processing, especially the cleanup, the parsing, and the formatting. The most complex is the Date formatting, but also Number formatting requires determining the decimal point separator and thousands decorator. In some cases, if parsing fails, your option is to report the issue to UiPath support and to fall back on the String content type, which does no parsing. In that case, you need to parse the value in your RPA workflow logic.

Another relevant configuration is the Multi-line checkbox, which is relevant mainly for String type fields. Whenever some other field produces unexpected results or no results, the first thing to try is to change it to String Multi-line field, to see the unaltered output of the model prediction.

6. 标记训练数据集​

When labeling Training data, you need to focus on the bounding boxes of the words in the document pane of Document Manager. The parsed values in the right or top sidebars are not important as they are not used for training.

All fields should be labelled, even if a field appears multiple times on a page, as long as they represent the same concept (see the Define fields section above).

当 OCR 漏掉一个词语或弄错几个字符时,只要标记边框(如果有),如果没有漏掉或弄错的情况,则跳过这步,继续操作。无法在 Document Manager 中添加词,因为即使您这样做,该词在运行时仍会丢失,因此添加它根本无法帮助模型。

As you label, remain vigilant about fields that may have multiple or overlapping meanings/concepts, in case you might need to split a field into two separate fields, or fields that you do not explicitly need, but which, if labelled, might help you to do certain validation or self-consistency check logic in the RPA workflow. Typical examples are quantity, unit-price, and line-amount on invoice line items. Line-amount is the product of quantity and unit-price, but this is very useful to check for consistency without the need for confidence levels.

7. 标记评估数据集​

When labeling Evaluation datasets (also called Test datasets) you need to focus on something slightly different from labeling Training datasets. Whereas for Training datasets only the bounding boxes of the fields on the document matter, for Evaluation datasets only the values of the fields matter. You may edit them by clicking on the value in the right or top sidebar and editing it. To return to the automatically parsed value, click on the lock icon.

备注:

For convenience, speed, and to avoid typos, we recommend clicking on the boxes on the document when labeling and only making corrections manually. Typing full values manually is slower and more error-prone.

8. 训练和评估模型​

允许导出整个数据集,包括训练和测试批次,因为 AI Center 中的训练管道会忽略测试数据。但是,无论评估管道是由训练数据还是测试数据构成,评估管道都会对整个评估数据集运行评估。给定文档的类型显示在 Document Manager 窗口顶部中央的文件名下方。

When evaluating an ML model, the most powerful tool is the evaluation.xlsx file generated in the artifacts/eval_metrics folder. In this Excel file you can see what predictions are failing and on which files, and you can see immediately if it is an OCR error, an ML Extraction, or parsing error, and if it may be fixed by simple logic in the RPA workflow, or it requires a different OCR engine, more training data, or improving the labelling of the field configurations in Document Manager.

此 Excel 文件对于识别需要在 RPA 工作流中应用的最相关业务规则也非常有用,以便在路由到 Action Center 中的验证站点以进行手动审核时捕获常见错误。到目前为止,业务规则是检测错误的最可靠方法。

对于业务规则无法捕获的错误,您还可以使用置信度级别。此 Excel 文件还包含每个预测的置信度级别,因此您可以使用 Excel 功能(例如排序和筛选)来确定适合您的业务场景的置信度阈值。

总体而言,evaluation.xlsx Excel 文件是您需要重点关注的关键资源,以从 AI 自动化中获取最佳结果。

9. 定义并实施业务规则​

在此步骤中,您应该关注模型错误及其检测方法。有 2 种主要方法用于检测错误:

  • 通过执行业务规则
  • 通过强制执行最低置信度级别阈值

检测错误的最有效、最可靠的方法是定义业务规则。置信度级别永远不可能达到 100% 完美,始终会有一小部分(但非零)的正确预测(低置信度)或错误预测(高置信度)。此外,也许最重要的是,缺少的字段没有置信度,因此置信度阈值永远无法捕获根本不会提取任何字段的错误。因此,置信度级别阈值只能用作回退和安全保障,而不能用作检测关键业务错误的主要方法。

业务规则示例:

  • 净额加税额必须等于总金额
  • 总金额必须大于或等于净额
  • Invoice number, Date, Total amount (and other fields) must be present
  • PO 编号(如果有)在 PO 数据库中必须存在
  • 发票日期必须是过去的日期,且不能超过 X 个月
  • 到期日期必须是未来日期,且不能超过 Y 天/月
  • For each line item, the quantity multiplied by unit price must equal the line amount
  • 行金额之和必须等于净额或总金额
  • 等等。

具体来说,列字段的置信度级别很少应用作错误检测机制,因为列字段(例如,发票或 PO 上的行项目)可能包含数十个值,因此针对如此多的值设置最小阈值是特别不可靠的,因为一个值很有可能具有较低的置信度,这将导致多次不必要地路由大部分或全部文档以进行人工验证。

业务规则必须作为 RPA 工作流的一部分强制执行,并且将业务规则失败传递给人工验证者,以便引起他们的注意并加快流程。

10. (可选)选择置信度阈值​

定义业务规则后,有时可能会保留少量没有业务规则的字段,或者业务规则不太可能捕获所有错误。为此,您可能需要使用置信度阈值作为最后的手段。

用于设置此阈值的主要工具是 AI Center 中的评估管道功能,具体来说是 Excel 电子表格,该电子表格由评估管道在“Outputs”>“artifacts”>“eval_metrics”文件夹中输出。

This spreadsheet contains a column for each field and a column for the confidence level of each prediction. You can add a column called min_confidence that takes the minimum of all the confidences over all fields that are important for your business process and are not already covered by business rules. For instance, you may not want to put a threshold on the line items confidences, but rather on vendor name, total amount, date, due date, invoice number, and other essential fields. By sorting the table based on the min_confidence column you may see where the errors start appearing and set a threshold above that level to ensure that correctly extracted documents are sent straight through.

11. 使用来自验证站点的数据进行训练​

Validation Station data can help improve the model predictions, yet, often, it turns out that most errors are not due to the model itself but to the OCR, labelling errors, inconsistencies, or to postprocessing issues (e.g., date or number formatting). So, the first key aspect is that Validation Station data should be used only after the other Data Extraction Components have been verified and optimized to ensure good accuracy, and the only remaining area of improvement is the model prediction itself.

第二个关键方面是,验证站点数据的信息密度低于 Document Manager 中标记的数据。从根本上讲,验证站点用户只关心一次获取正确的值。如果发票有 5 页,并且发票编号出现在每页上,则验证站点用户只需在第一页上对其进行验证。因此,80% 的值保持未标记状态。在 Document Manager 中,所有值都已标记。

最后,请记住,需要将验证站点数据添加到手动标记的原始数据集,以便您始终拥有单个训练数据集,该数据集的大小会随时间而增加。您将始终需要在次要版本为 0(零)的 ML 包上进行训练,该版本是 UiPath 发布的开箱即用版本。

重要提示:

用户经常错误地认为,使用验证站点数据的方法是迭代地重新训练先前的模型版本,因此使用当前批次来训练包 X.1 以获取 X.2。然后,下一个批次在 X.2 上训练以获取 X.3,依此类推。以这种方式使用本产品是错误的。每个验证站点批次都需要导入到与最初手动标记的数据相同的 Document Manager 会话中,以创建更大的数据集,然后始终必须使用该数据集在 X.0 ML 包版本上进行训练。

验证站点数据的数量可能会比这大得多,因为它在生产工作流中使用。因此,鉴于模型训练需要时间和基础架构,因此您需要了解关于可能有用的数据量的指南。此外,您不希望数据集被验证站点数据淹没,因为上述信息密度问题可能会降低模型的质量。

The recommendation is to add a maximum of 2-3X the number of pages of Document Manager data and, beyond that, only cherry pick those vendors or document samples where you see major failures. If there are known major changes to the production data, such as a new language, or a new geographic region being onboarded to the business process (expanding from US to Europe or South Asia), then representative data for those languages and regions should be added to Document Manager for manual labelling. Validation Station data is not appropriate for such major scope expansion.

以下是一个示例场景。您已选择合适的 OCR 引擎,在 Document Manager 中标记了 500 页,从而获得良好的性能,并且已在生产 RPA 工作流中部署了模型。验证站点将开始生成数据。您应该从验证站点中随机选取最多 1000 到 1500 页,并将其与前 500 页一起导入到 Document Manager 中,然后重新训练 ML 模型。随后,您应运行评估管道以确保模型得到了实际改进,然后将新模型部署到生产环境中。

12. 自动微调循环(预览版)​

The Auto-Fine-tuning Loop is a Preview capability that becomes useful for maintaining a high-preforming model which you have already created using the steps described above. To ensure that auto-fine-tuning produces better versions of the model it is critical that you have a good Evaluation dataset and that you use an automatically rescheduled Full Pipeline which runs both Training and Evaluation at the same time. In this way, you can see if the most recent Training produced a more accurate model than the previous one, and if so, you are ready to deploy the new model to the ML Skill invoked by the Robots in your business process.

备注:

The Training dataset keeps changing as more data comes in and Document Manager exports periodically as scheduled in the Scheduled Export dialog. The Evaluation runs on the same Evaluation dataset you specify in the pipeline. Evaluation datasets never change automatically, they always need to be curated, labeled and exported manually. You should change your Evaluation set rarely so that accuracy scores can be compared between different Training runs.

重新训练 ML 包的新版本时,AI Center 可以自动更新 ML 技能。但是,此自动更新未考虑完整管道的分数,因此,建议您不要将此功能与 Document Understanding 自动重新训练管道一起使用。

As mentioned above in the Create an Evaluation Dataset section, Evaluation Pipeline implementations for ML Packages release 21.10 or later calculate scores on a per-document basis - which reflects accurately the results you see in an RPA workflow. This assumes your dataset was labelled on a per-document basis in Document Manager. You can tell if a multi-page document is labeled on a per-document basis if you can scroll naturally through the pages like in a regular PDF reader. If you need to click next to pass from one page to the next, then each page is considered a separate document.

13. 部署自动化​

Make sure to use the Document Understanding Process from the Templates section in the Studio start screen in order to apply best practices in Enterprise RPA architecture.

此页面有帮助吗?

连接

需要帮助? 支持(opens in new window)

想要了解详细内容? UiPath Academy(opens in new window)

有问题? UiPath 论坛(opens in new window)

保持更新