Skip to main content
When the analysis result of a Workflow is not what you expect, the first place to fix is the Step description. This guide explains how the analysis uses Steps, and how to write Step descriptions that change the result.

The analysis runs on Steps

When you analyze a Case, the Agent carries out the Steps in the Workflow’s Playbook one by one. The flow is as follows.
  1. The Agent receives the Case’s document content, today’s date, and the Step list (Step names, descriptions, and attached engines) in a single set of instructions. These three are the Step information that goes into the instructions.
  2. It must carry out every Step without skipping any, and must not make up a Step that is not on the list.
  3. For each Step, it decides the result as one of Passed (passed), Needs review (needs_review), or Failed (failed), and writes a confidence and its reasoning. In the reasoning, it names the documents it relied on by Item ID and name. When it is not sure, it is set to decide Needs review.
  4. The reasoning is written in the language the Step description is written in. If you write the description in Korean, the reasoning comes out in Korean.
  5. If an engine is attached to the Step, it calls that engine first and uses the returned result as its main basis. If the engine call fails, it does not answer from the documents instead, and the Step ends as Needs review (or Failed if the region is not supported). For details, see Engine selection and options.
  6. When all Steps are done, a separate stage reads the answer written for each Step and fills in the fields of the Output Schema. At this point, the field’s description is the standard for what the field means. A field whose value cannot be found in the answers becomes null.
  7. An Analysis uses the Steps as they were when it started. After you edit a Step, you have to analyze the Case again for the edit to take effect.
The reference notes of a Step are not included in the analysis instructions. Write the rules used for the decision in the Step description. For reference notes, see Editing a Workflow.
Two conclusions follow from this structure.
  • If you do not like the result, edit the Step description. The Agent decides knowing only the criteria written in the Step description.
  • The values of the Output Schema come from the Step answers. A value that is not written in an answer does not appear in the result.

What a good Step description contains

Name a Step with a verb for what it does (for example, verify_company_registration). Name an Output Schema field with a noun for the value (for example, corporate_registration_number). When the Output Schema is filled, the answers of the Steps are passed grouped under the Step names. The standard for pairing a field with an answer is the field’s description, but if the Step name says what it does, it is easier to read which answer is the material for which field. The naming rules (start with a lowercase letter, use only lowercase letters, digits, and _) are in Editing a Workflow.

Writing within 500 characters

A Step description can be up to 500 characters. If it goes over, it is not saved.
  • Write conditions rather than explanatory sentences. “Failed if the issue date is more than 3 months old” is shorter and clearer than “Check carefully whether the document is valid.”
  • Write the pass, fail, and needs-review conditions one sentence each.
  • Do not copy background explanations that are already in the Policy document. Keep only the criteria needed for the decision.
  • Give only one example of a value and its format.

If it does not fit in one Step, split it

If the conditions do not fit in 500 characters, or one Step mixes different documents and different engines, split the Step. A Step has only one result, so if only part of a Step is wrong, the whole Step becomes Failed or Needs review. When each Step makes only one decision, the result screen shows right away which check was the problem. For a Step that uses an engine, split according to what that one engine does.

Bad and good examples

All documents and names below are made-up examples.

Example 1: Matching the account holder with the company name

  • It does not say what is matched. The Agent has to guess whether it is the account holder and company name, or the business registration number.
  • It does not say whether “Example Trading Co., Ltd.” and “Example Trading Co.” should count as the same.
  • It has no result for when a document is missing.
  • It does not say what to write in the answer, so the Output Schema field is likely to stay null.

Example 2: Checking the issue date of a document

  • It does not say how long ago “recently” is, so each Agent may read it differently.
  • It has no handling for when the issue date cannot be seen.
  • It does not tell the Agent to write the issue date in the answer, so a date field in the Output Schema may become null.

The Verdict is decided from Step results

The Case’s Verdict is decided by gathering the results of all Steps of the Analysis. So if even one Step is written vaguely, the whole Case stays at pending_review. The Verdict is a reference result, and the Admin approves. How to read the Verdict and the result of each Step on screen is in Reading Analysis Results.

Fixing automatically created Steps, in order

When you create a Workflow, Steps are created automatically from the Policy text. It is normal that they do not come out as you expected at first, so refine them in this order.
1

Run an analysis on one real Case

Create a Case with one typical set of documents and analyze it. Using one Case that should pass and one that should fail makes the criteria show clearly.
2

Look at the result of each Step

In the Audit Log of the analysis result screen, check the result of each Step (Passed, Needs review, Failed) and its Reasoning. Find which Step differs from what you expected. See the Analysis Results screen.
3

Fix that Step's description

In Playbook Actions of Editing a Workflow, Edit the Step and fill in the elements above. If the problem is that a result value is empty, first check the values to write in the answer and the field to fill, and look at the description of the Output Schema field as well. If the description first created from the Policy text is long, shorten it to within 500 characters.
4

Split the Step or change the engine if needed

If one Step mixes several decisions, split it. Attach an engine to a Step that needs an external lookup, and remove the engine from a Step that can be done with the documents alone.
5

Save, and analyze the same Case again

Click Save in the section to save, then analyze the same Case again and check what changed. Finish after checking with several Cases.
You can look at the Steps of the templates in Workflow Templates as examples. Copying a template’s Step description and adapting it to your documents is faster than writing from scratch.

Next steps

Editing a Workflow

How to edit and save Steps.

Policy Writing Guide

How to write the Policy text that becomes the material for Steps.