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.- 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.
- It must carry out every Step without skipping any, and must not make up a Step that is not on the list.
- 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. - 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.
- 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.
- 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
descriptionis the standard for what the field means. A field whose value cannot be found in the answers becomesnull. - 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.
- 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
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.Bad and good examples
All documents and names below are made-up examples.Example 1: Matching the account holder with the company name
- Bad example
- Good example
- 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
- Bad example
- Good example
- 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.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.Run an analysis on one real Case
Look at the result of each Step
Fix that Step's description
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.Split the Step or change the engine if needed
Save, and analyze the same Case again