How PSC Closeout AI Extraction Works
Automatic Attachment Addition: Attachments are automatically added from correspondence when the RFI is received, with the file type set to match the type provided by the customer at the time of upload.
AI Extraction Process: To initiate AI extraction, a closeout AND an AB report must be available. The required documents combinations include:
-
(Initial PSC Report Form A+B) OR (Follow-up PSC Report A+B) OR (Initial PSC Report Form B) AND (Closeout CAP/RCA), OR
-
(Initial PSC Report Form A) AND (Initial PSC Report Form B) AND (Closeout CAP/RCA) OR
-
(Initial PSC Report Form A+B +Closeout), OR
-
(Follow-up PSC Report Form A+B + Closeout).
Textbox Details: The 'Actual Deficiency' textbox is sourced from the AB form, usually under the column labelled 'Nature of Deficiency' or 'Comments'. The PSC action code is also taken from the AB form. The deficiency explanation, immediate cause, root cause, immediate corrective actions, and preventive actions are sourced from the closeout document.
Deficiency Extraction: The deficiencies are read from the AB form. If the same deficiencies are missing from the closeout, they will still be extracted from the AB form.
Deficiency Mapping and Merging: During extraction, if deficiencies already exist in the PSC, we map by code. If multiple deficiencies with the same code are found then mapping is done by actual deficiency textbox. If the code is already present, we merge the closeout details into the existing deficiency. If the code does not exist in the deficiencies tab, a new deficiency is created. If the code is missing or unrecognized in the AB form, a new deficiency is added with the code set to empty.
How Closeout Documents Are Matched with AB Form
To match a closeout document with a deficiency in the AB form (Form B), we compare the name and description fields from both sources. The matching is flexible and can occur in any of the following combinations:
-
Closeout name ↔ Form B name
-
Closeout name ↔ Form B description
-
Closeout description ↔ Form B name
-
Closeout description ↔ Form B description
The matching process follows a multi-step approach:
-
Levenshtein distance (for basic string similarity)
-
Cosine similarity (for contextual phrase comparison)
-
AI-based matching (for semantic relevance)
As an additional fallback, if the closeout document includes a deficiency code, we now also attempt to match based on that code when other methods do not yield a result.
This layered approach improves both flexibility and accuracy in matching closeout documents to their corresponding deficiencies.
Handling of Deficiency Details from S&P: When deficiency details are received from S&P, they are initially displayed in the UI. After running the extraction process, if none of the deficiencies extracted from the AB form match those provided by S&P, the unmatched S&P deficiencies will be removed from the UI and deleted once the PSC is closed.
This is done to ensure the user sees only the actual, verified deficiencies and does not end up with more entries than there should be.
For example:
-
If S&P provides a deficiency with code "NA", and the extraction does not map any data to this code, it will be considered unmatched and removed from the UI.
-
If S&P provides code "11011", but the extracted AB form data reflects a different code, "11011" will be treated as an extra and also removed.
This helps keep the final list of deficiencies accurate and aligned with the extracted inspection data.
Manual Deficiency Deletion: If a deficiency is manually deleted from the deficiencies tab, the same code will not be retrieved again, even if a fresh extraction is performed.
Deficiency Ordering: The order of deficiencies is always determined by the AB form. If there are existing deficiencies in the PSC sourced from IHS, the ordering from the AB form takes priority.
Vessel Name/IMO Search: During extraction, we search for the vessel name, and if not found, we search for the vessel IMO. If neither the name nor IMO matches the vessel in the PSC, we display a banner notifying the user of a mismatch, and the deficiencies will not be imported. If the name/IMO is missing from the closeout document, we still extract the deficiencies, as it indicates that the ship manager didn’t include this information. However, we display a banner indicating the missing name/IMO and remind the user to double-check the deficiencies.
Changing Attachment File Type: If an attachment is added with the wrong file type, it can be changed. Simply select the file, click on the edit icon, make the necessary changes, and then tick the save changes icon to confirm the update.
Cache Version for Re-Run: When a new document is uploaded, the system retrieves extraction data from the cache for previously uploaded documents to avoid delays. A fresh extraction is performed only for the new document. However, when the "Re-Run" option is selected, either from the failed banner or from the documents tab, a fresh extraction is performed for all relevant documents, bypassing the cache.