A normalization script (AI Data Extraction for COAs) is a tool that standardizes extracted data from COAs into a format compatible with a TraceStation, ensuring proper import based on attribute data types.
How Default Normalization Works
By default, a built-in normalization script runs in the background for all numeric attributes, automatically handling common data inconsistencies. This default script accounts for the following:
-
Values starting with NEG and terms like ‘N.D.', 'ND', 'NOT DETECTED', 'ABSENT', 'NONE DETECTED', etc., are converted to 0.
-
Non-numeric characters are removed.
-
Values with "<" are adjusted by subtracting 0.0001 (e.g.,
<10
→9.9999
). -
Values with ">" are adjusted by adding 0.0001 (e.g.,
>10
→10.0001
).
When to Manually Add a Normalization Script
If the default script fails to process extracted values, an error appears on the Processing page, preventing COA creation on the main COAs tab. To resolve this, a custom Normalization Script or use an AI Prompt needs to be added.
When another normalization script is added to the attribute or override template, it takes precedence over the default normalization script.
How to Add a Normalization Script
Step 1: Go to Configuration > Processing. Click the blue edit gear associated with your COA record.
Step 2: Scroll down to the Extraction Attributes section. In the Norm Script column, click the edit gear button associated with your attribute.
Step 3: The Normalization Scripts modal will open with a prefilled Input for testing.
- Click on the Configuration Library sub tab.
- Click Insert next to the desired script.
- Validate the script before saving.
Step 4: Once validated successfully, click Apply to Attribute and save it to the site library for future use.
AI Prompts vs. Normalization Scripts
AI Prompts offer a more flexible way to modify extracted data. Unlike Normalization Scripts, which follow strict coding rules, AI Prompts allow users to describe the required transformation in plain text.
When to Use AI Prompts:
- Recommended as the primary tool for modifying extracted data.
- Useful for non-numeric transformations that require contextual changes.
When to Use Normalization Scripts:
-
When precise numerical adjustments are needed.
-
If an AI Prompt does not provide accurate or consistent results.
By leveraging AI Prompts as the primary method and using Normalization Scripts when needed, you can optimize your COA data extraction process for accuracy and efficiency.