data-science-document-ai 1.58.0__tar.gz → 1.60.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/PKG-INFO +1 -1
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/pyproject.toml +1 -1
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/postprocessing/common.py +0 -35
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/maersk → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/evergreen}/placeholders.json +7 -7
- data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/evergreen/prompt.txt +56 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt +3 -3
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/evergreen → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/maersk}/placeholders.json +5 -5
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/other → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/maersk}/prompt.txt +16 -14
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/bookingConfirmation/msc/placeholders.json +9 -9
- data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/msc/prompt.txt +76 -0
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/other → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/oocl}/placeholders.json +12 -12
- data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/oocl/prompt.txt +49 -0
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/yangming → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/other}/placeholders.json +11 -11
- data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/other/prompt.txt +81 -0
- {data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/oocl → data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/yangming}/placeholders.json +12 -12
- data_science_document_ai-1.60.0/src/prompts/library/bookingConfirmation/yangming/prompt.txt +60 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/customsInvoice/other/placeholders.json +1 -1
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/customsInvoice/other/prompt.txt +6 -2
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/partnerInvoice/other/placeholders.json +1 -1
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/partnerInvoice/other/prompt.txt +6 -2
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/utils.py +2 -6
- data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/evergreen/prompt.txt +0 -40
- data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/maersk/prompt.txt +0 -67
- data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/msc/prompt.txt +0 -79
- data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/oocl/prompt.txt +0 -24
- data_science_document_ai-1.58.0/src/prompts/library/bookingConfirmation/yangming/prompt.txt +0 -72
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/constants.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/constants_sandbox.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/docai.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/docai_processor_config.yaml +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/excel_processing.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/io.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/llm.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/log_setup.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/pdf_processing.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/postprocessing/postprocess_booking_confirmation.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/postprocessing/postprocess_commercial_invoice.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/postprocessing/postprocess_partner_invoice.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/arrivalNotice/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/arrivalNotice/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/bundeskasse/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/bundeskasse/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/commercialInvoice/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/commercialInvoice/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/customsAssessment/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/customsAssessment/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/deliveryOrder/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/deliveryOrder/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/draftMbl/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/draftMbl/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/finalMbL/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/finalMbL/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/packingList/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/packingList/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/postprocessing/port_code/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/postprocessing/port_code/prompt_port_code.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/preprocessing/carrier/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/preprocessing/carrier/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/shippingInstruction/other/placeholders.json +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/library/shippingInstruction/other/prompt.txt +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/prompts/prompt_library.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/setup.py +0 -0
- {data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/tms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "data-science-document-ai"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.60.0"
|
|
4
4
|
description = "\"Document AI repo for data science\""
|
|
5
5
|
authors = ["Naomi Nguyen <naomi.nguyen@forto.com>", "Kumar Rajendrababu <kumar.rajendrababu@forto.com>", "Igor Tonko <igor.tonko@forto.com>", "Osman Demirel <osman.demirel@forto.com>"]
|
|
6
6
|
packages = [
|
{data_science_document_ai-1.58.0 → data_science_document_ai-1.60.0}/src/postprocessing/common.py
RENAMED
|
@@ -723,45 +723,10 @@ async def format_all_entities(result, document_type_code, params, mime_type):
|
|
|
723
723
|
if document_type_code in ["partnerInvoice", "bundeskasse"]:
|
|
724
724
|
await process_partner_invoice(params, aggregated_data, document_type_code)
|
|
725
725
|
|
|
726
|
-
if document_type_code in ["bookingConfirmation"]:
|
|
727
|
-
aggregated_data["legalEntity"] = await get_legal_entity(
|
|
728
|
-
aggregated_data.get("carrierName", {}).get("documentValue", None),
|
|
729
|
-
aggregated_data.get("carrierAddress", {}).get("documentValue", None),
|
|
730
|
-
)
|
|
731
|
-
|
|
732
726
|
logger.info("Data Extraction completed successfully")
|
|
733
727
|
return aggregated_data
|
|
734
728
|
|
|
735
729
|
|
|
736
|
-
async def get_legal_entity(name, address):
|
|
737
|
-
"""Get legal entity mapping from TMS mappings.
|
|
738
|
-
|
|
739
|
-
Args:
|
|
740
|
-
name (str): The name of the legal entity. Mandatory.
|
|
741
|
-
address (str): The address of the legal entity. Optional for better matching.
|
|
742
|
-
|
|
743
|
-
Returns:
|
|
744
|
-
dict or None: The mapping result from TMS embeddings, or None if not found.
|
|
745
|
-
"""
|
|
746
|
-
# Name is mandatory for legal entity mapping
|
|
747
|
-
if not name:
|
|
748
|
-
return {"documentValue": None, "mappedValue": None}
|
|
749
|
-
|
|
750
|
-
# Build input safely
|
|
751
|
-
input_text = name if not address else f"{name} | {address}"
|
|
752
|
-
|
|
753
|
-
api_results = await get_tms_mappings(
|
|
754
|
-
input_list=[input_text],
|
|
755
|
-
embedding_type="legal_entities",
|
|
756
|
-
input_key="partnerNameAddress",
|
|
757
|
-
)
|
|
758
|
-
|
|
759
|
-
return {
|
|
760
|
-
"documentValue": None,
|
|
761
|
-
"formattedValue": api_results.get(input_text),
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
|
|
765
730
|
def add_text_without_space(text):
|
|
766
731
|
"""If the cleaned text is different from the original text, append it.
|
|
767
732
|
Useful for port names like QUINHON - Quinhon"""
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"gateInTerminalCode": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
|
-
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g.,
|
|
22
|
+
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN TO or Export terminal name."
|
|
23
23
|
},
|
|
24
24
|
"performaDate": {
|
|
25
25
|
"type": "STRING",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"cyCutOff": {
|
|
30
30
|
"type": "STRING",
|
|
31
31
|
"nullable": true,
|
|
32
|
-
"description": "The datetime by which the cargo to be delivered to the Container Yard. It can be found with keys
|
|
32
|
+
"description": "The datetime by which the cargo to be delivered to the Container Yard. It can be found with keys CARGO CUT OFF DATE/TIME"
|
|
33
33
|
},
|
|
34
34
|
"gateInReference": {
|
|
35
35
|
"type": "STRING",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"siCutOff": {
|
|
50
50
|
"type": "STRING",
|
|
51
51
|
"nullable": true,
|
|
52
|
-
"description": "The deadline datetime for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys
|
|
52
|
+
"description": "The deadline datetime for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys DOC CUT OFF DATE/TIME"
|
|
53
53
|
},
|
|
54
54
|
"vgmCutOff": {
|
|
55
55
|
"type": "STRING",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"pickUpDepotCode": {
|
|
70
70
|
"type": "STRING",
|
|
71
71
|
"nullable": true,
|
|
72
|
-
"description": "The depot code where the empty container will be picked up. It is identified as Empty Pick Up Depot or Export Empty Pick Up Depot(s)."
|
|
72
|
+
"description": "The depot code where the empty container will be picked up. It is identified as Empty Pick Up AT Depot or Export Empty Pick Up Depot(s)."
|
|
73
73
|
},
|
|
74
74
|
"dropOffDepotCode": {
|
|
75
75
|
"type": "STRING",
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"vesselName": {
|
|
114
114
|
"type": "STRING",
|
|
115
115
|
"nullable": true,
|
|
116
|
-
"description": "The name of the vessel carrying the shipment. It can be found at
|
|
116
|
+
"description": "The name of the vessel carrying the shipment. It can be found at VESSEL/VOYAGE e.g., MOL EMERALD"
|
|
117
117
|
},
|
|
118
118
|
"voyage": {
|
|
119
119
|
"type": "STRING",
|
|
120
120
|
"nullable": true,
|
|
121
|
-
"description": "The journey or route taken by the vessel for a specific leg. It can be found at
|
|
121
|
+
"description": "The journey or route taken by the vessel for a specific leg. It can be found at VESSEL/VOYAGE e.g., 087E"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"carrierName": {
|
|
140
140
|
"type": "STRING",
|
|
141
141
|
"nullable": true,
|
|
142
|
-
"description": "The name of the carrier who issued the document e,g,
|
|
142
|
+
"description": "The name of the carrier who issued the document e,g, Evergreen Line."
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<PERSONA> You are an efficient document entity data extraction specialist working for a Freight Forwarding company. <PERSONA>
|
|
2
|
+
|
|
3
|
+
<TASK> Your task is to extract data from Booking Confirmation documents as per the given response schema structure. <TASK>
|
|
4
|
+
|
|
5
|
+
<CONTEXT>
|
|
6
|
+
The Freight Forwarding company receives Booking Confirmation from EverGreen Carrier (Shipping Lines) partner.
|
|
7
|
+
These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
|
|
8
|
+
They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
|
|
9
|
+
Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
|
|
10
|
+
|
|
11
|
+
To provide context on the journey of a containers for both Export and Import shipments,
|
|
12
|
+
For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
|
|
13
|
+
For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
|
|
14
|
+
<CONTEXT>
|
|
15
|
+
|
|
16
|
+
<INSTRUCTIONS>
|
|
17
|
+
- Populate fields as defined in the response schema.
|
|
18
|
+
- Use the data field description to understand the context of the data.
|
|
19
|
+
|
|
20
|
+
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
21
|
+
- eta: The estimated time of arrival for a specific leg.
|
|
22
|
+
- etd: The estimated time of departure for a specific leg. ETD DATE above the PORT OF DISCHARGING information.
|
|
23
|
+
- imoNumber: The International Maritime Organization number for a specific leg.
|
|
24
|
+
- portOfDischarge: The port where cargo is unloaded for a specific leg.
|
|
25
|
+
- portOfLoading: The port where cargo is loaded for a specific leg.
|
|
26
|
+
- vesselName: The name of the vessel for a specific leg. Can be found at VESSEL/VOYAGE (e.g., EVER LAUREL).
|
|
27
|
+
- voyage: The journey or route taken by the vessel for a specific leg. It can be found at VESSEL/VOYAGE e.g., 087E.
|
|
28
|
+
|
|
29
|
+
IMPORTANT explanation for the transportLegs part as follows:
|
|
30
|
+
- There is at least one leg in each document.
|
|
31
|
+
- 'eta' must be equal or later than 'etd'!
|
|
32
|
+
- Multiple legs are possible. When there are multiple legs,
|
|
33
|
+
- Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
|
|
34
|
+
- "T/S PORT OF LOADING" indicates the presence of a multi-leg journey.
|
|
35
|
+
- Transhipment Handling: Treat any mentioned "T/S PORT OF LOADING" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
|
|
36
|
+
- The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
|
|
37
|
+
- First T/S PORT OF LOADING is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
|
|
38
|
+
- Second T/S PORT OF LOADING is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
|
|
39
|
+
- Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
|
|
40
|
+
|
|
41
|
+
Structure of Multiple Leg Sequence & Mapping
|
|
42
|
+
Leg 1 (Initial):
|
|
43
|
+
- `portOfLoading`: PORT OF LOADING.
|
|
44
|
+
- `portOfDischarge`: T/S PORT OF LOADING.
|
|
45
|
+
- `vesselName`: VESSEL/VOYAGE (ignore parentheses).
|
|
46
|
+
- `etd`: ETD DATE above the PORT OF DISCHARGING information.
|
|
47
|
+
- `eta`: ETA DATE below first T/S PORT OF LOADING
|
|
48
|
+
|
|
49
|
+
Leg 2 (Intermediate): Trigger: Only if T/S PORT OF LOADING exists.
|
|
50
|
+
- `portOfLoading`: First T/S PORT OF LOADING. POD of Leg 1.
|
|
51
|
+
- `portOfDischarge`: Second T/S PORT OF LOADING (if exists), otherwise PORT OF DISCHARGE before the FINAL DESTINATION.
|
|
52
|
+
- `vesselName`: EST. CONNECTING VESSEL / VOY.
|
|
53
|
+
- `etd`: ETD DATE after first T/S PORT OF LOADING
|
|
54
|
+
- `eta`: ETA DATE after second T/S PORT OF LOADING (if exists), otherwise ETA next to the FINAL DESTINATION section.
|
|
55
|
+
|
|
56
|
+
<INSTRUCTIONS>
|
|
@@ -31,8 +31,8 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
31
31
|
- Extract the name and address of the carrier who is the main parent company in the document.
|
|
32
32
|
- It can be found in the top section of the document, often near the logo or header.
|
|
33
33
|
- Example:
|
|
34
|
-
- "Hapag-Lloyd" for
|
|
35
|
-
- Hamburg, Germany, Poland, Italy, Vietnam, China etc... for
|
|
34
|
+
- "Hapag-Lloyd" for carrierName
|
|
35
|
+
- Hamburg, Germany, Poland, Italy, Vietnam, China etc... for carrierAddress
|
|
36
36
|
|
|
37
37
|
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
38
38
|
- eta: The estimated time of arrival for a specific leg.
|
|
@@ -46,7 +46,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
46
46
|
- Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
|
|
47
47
|
- containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
|
|
48
48
|
- pickupDepotCode: The code of the depot where the empty container is picked up.
|
|
49
|
-
- dropOffDepotCode: The code of the depot where the empty container is dropped off.
|
|
49
|
+
- dropOffDepotCode: The code of the depot where the empty container is dropped off. It
|
|
50
50
|
|
|
51
51
|
IMPORTANT explanation for the transportLegs part as follows:
|
|
52
52
|
- There is at least one leg in each document.
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"gateInTerminalCode": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
|
-
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or
|
|
22
|
+
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or Return Equip Delivery Terminal."
|
|
23
23
|
},
|
|
24
24
|
"performaDate": {
|
|
25
25
|
"type": "STRING",
|
|
26
26
|
"nullable": true,
|
|
27
|
-
"description": "The date considered to apply the rates and charges specified in the booking confirmation"
|
|
27
|
+
"description": "The date considered to apply the rates and charges specified in the booking confirmation. It is mentioned as Price Calculation Date or Performa Date."
|
|
28
28
|
},
|
|
29
29
|
"cyCutOff": {
|
|
30
30
|
"type": "STRING",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"containerType": {
|
|
65
65
|
"type": "STRING",
|
|
66
66
|
"nullable": true,
|
|
67
|
-
"description": "The size / type of the container, such as 20ft, 40ft, 40HC, 20DC etc under Type/Size column."
|
|
67
|
+
"description": "The size / type of the container, such as 20ft, 40ft, 40HC, 40 DRY, 20DC etc under Type/Size column."
|
|
68
68
|
},
|
|
69
69
|
"pickUpDepotCode": {
|
|
70
70
|
"type": "STRING",
|
|
71
71
|
"nullable": true,
|
|
72
|
-
"description": "The depot code where the empty container will be picked up. It is identified as Empty Pick Up Depot or Export Empty Pick Up Depot(s)."
|
|
72
|
+
"description": "The depot code where the empty container will be picked up. It is identified as Empty Pick Up Depot, Empty Container Depot, or Export Empty Pick Up Depot(s)."
|
|
73
73
|
},
|
|
74
74
|
"dropOffDepotCode": {
|
|
75
75
|
"type": "STRING",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"carrierName": {
|
|
140
140
|
"type": "STRING",
|
|
141
141
|
"nullable": true,
|
|
142
|
-
"description": "The name of the carrier who issued the document e,g,
|
|
142
|
+
"description": "The name of the carrier who issued the document e,g, MAERSK."
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
|
|
@@ -3,32 +3,39 @@
|
|
|
3
3
|
<TASK> Your task is to extract data from Booking Confirmation documents as per the given response schema structure. <TASK>
|
|
4
4
|
|
|
5
5
|
<CONTEXT>
|
|
6
|
-
The Freight Forwarding company receives Booking Confirmation from Carrier (Shipping Lines) partners.
|
|
6
|
+
The Freight Forwarding company receives Booking Confirmation from MAERSK Carrier (Shipping Lines) partners.
|
|
7
7
|
These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
|
|
8
8
|
They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
|
|
9
9
|
Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
To provide context on the journey of a containers for both Export and Import shipments,
|
|
13
|
-
For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes.
|
|
12
|
+
For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
|
|
14
13
|
For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
|
|
15
14
|
<CONTEXT>
|
|
16
15
|
|
|
17
16
|
<INSTRUCTIONS>
|
|
18
|
-
-
|
|
19
|
-
- Use the data field description to understand the context of the data.
|
|
17
|
+
- bookingNumber: A unique identifier for the booking.
|
|
20
18
|
|
|
21
|
-
-
|
|
19
|
+
- gateInTerminalCode: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
22
20
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
23
21
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
24
22
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
25
23
|
|
|
26
|
-
- cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be referred to as FCL delivery cut-off, CY CUT OFF, CY Closing - Latest Return Container Date
|
|
24
|
+
- cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be referred to as Cargo Cut-off deadline, FCL delivery cut-off, CY CUT OFF, CY Closing - Latest Return Container Date.
|
|
27
25
|
- siCutOff: The deadline for submitting shipping instructions. It can be referred to as Shipping Instruction closing, SI Cut Off, Shipping Instruction deadline, INTENDED SI CUT-OFF
|
|
28
26
|
- vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo. It can be referred to as VGM cut-off, VGM Submission Deadline, Verified Gross Mass deadline
|
|
29
27
|
|
|
30
28
|
- carrierName and carrierAddress:
|
|
31
29
|
- Extract the name and address of the carrier who is the main parent company in the document.
|
|
30
|
+
- It can be found in the top section of the document, often near the logo or header.
|
|
31
|
+
- Example:
|
|
32
|
+
- "MAERSK" for carrierName
|
|
33
|
+
- Hamburg, Germany, NETHERLANDS, Poland, Italy, Vietnam, China SHANGHAI BRANCH etc... for carrierAddress
|
|
34
|
+
|
|
35
|
+
- Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
|
|
36
|
+
- containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
|
|
37
|
+
- pickupDepotCode: The code of the depot where the empty container is picked up. Can be found as Empty Container Depot under Load Itinerary table.
|
|
38
|
+
- dropOffDepotCode: The code of the depot where the empty container is dropped off.
|
|
32
39
|
|
|
33
40
|
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
34
41
|
- eta: The estimated time of arrival for a specific leg.
|
|
@@ -36,13 +43,8 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
36
43
|
- imoNumber: The International Maritime Organization number for a specific leg.
|
|
37
44
|
- portOfDischarge: The port where cargo is unloaded for a specific leg.
|
|
38
45
|
- portOfLoading: The port where cargo is loaded for a specific leg.
|
|
39
|
-
- vesselName: The name of the vessel for a specific leg.
|
|
40
|
-
- voyage: The journey or route taken by the vessel for a specific leg.
|
|
41
|
-
|
|
42
|
-
- Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
|
|
43
|
-
- containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
|
|
44
|
-
- pickupDepotCode: The code of the depot where the empty container is picked up.
|
|
45
|
-
- dropOffDepotCode: The code of the depot where the empty container is dropped off.
|
|
46
|
+
- vesselName: The name of the vessel for a specific leg. Can be found under 'Vessel' column in the Intended Transport Plan table.
|
|
47
|
+
- voyage: The journey or route taken by the vessel for a specific leg. Can be found under 'Voy No.' column in the Intended Transport Plan table.
|
|
46
48
|
|
|
47
49
|
IMPORTANT explanation for the transportLegs part as follows:
|
|
48
50
|
- There is at least one leg in each document.
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"bookingNumber": {
|
|
5
5
|
"type": "STRING",
|
|
6
6
|
"nullable": true,
|
|
7
|
-
"description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking
|
|
7
|
+
"description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Reference', 'Booking No.', or 'Our Reference'."
|
|
8
8
|
},
|
|
9
9
|
"contractNumber": {
|
|
10
10
|
"type": "STRING",
|
|
11
11
|
"nullable": true,
|
|
12
|
-
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG."
|
|
12
|
+
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be found as Service Contract/Rate Reff. No."
|
|
13
13
|
},
|
|
14
14
|
"pickUpTerminalCode": {
|
|
15
15
|
"type": "STRING",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"gateInTerminalCode": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
|
-
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address.
|
|
22
|
+
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as GATE IN AT TERMINAL/DEPOT"
|
|
23
23
|
},
|
|
24
24
|
"performaDate": {
|
|
25
25
|
"type": "STRING",
|
|
26
26
|
"nullable": true,
|
|
27
|
-
"description": "The date considered to apply the rates and charges specified in the booking confirmation"
|
|
27
|
+
"description": "The date considered to apply the rates and charges specified in the booking confirmation. It is mentioned as Price Calculation Date or Performa Date."
|
|
28
28
|
},
|
|
29
29
|
"cyCutOff": {
|
|
30
30
|
"type": "STRING",
|
|
31
31
|
"nullable": true,
|
|
32
|
-
"description": "The datetime by which the cargo to be delivered to the Container Yard. It can be found with keys
|
|
32
|
+
"description": "The datetime by which the cargo to be delivered to the Container Yard. It can be found with keys CUT-OFF(Date/Time), FCL DG delivery cut-off, CY CUT OFF, CY Closing."
|
|
33
33
|
},
|
|
34
34
|
"gateInReference": {
|
|
35
35
|
"type": "STRING",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"containerType": {
|
|
65
65
|
"type": "STRING",
|
|
66
66
|
"nullable": true,
|
|
67
|
-
"description": "The size / type of the container, such as 20ft, 40ft, 40HC, 20DC etc under Type/Size column."
|
|
67
|
+
"description": "The size / type of the container, such as 20ft, 40ft, 40HC, 40 DRY, 20DC etc under Type/Size column."
|
|
68
68
|
},
|
|
69
69
|
"pickUpDepotCode": {
|
|
70
70
|
"type": "STRING",
|
|
71
71
|
"nullable": true,
|
|
72
|
-
"description": "The depot code where the empty container will be picked up. It is identified as Empty
|
|
72
|
+
"description": "The depot code where the empty container will be picked up. It is identified as PICK UP AT DEPOT, Empty Container Depot, or Export Empty Pick Up Depot(s)."
|
|
73
73
|
},
|
|
74
74
|
"dropOffDepotCode": {
|
|
75
75
|
"type": "STRING",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"voyage": {
|
|
119
119
|
"type": "STRING",
|
|
120
120
|
"nullable": true,
|
|
121
|
-
"description": "The journey or route taken by the vessel for a specific leg. It can be found at
|
|
121
|
+
"description": "The journey or route taken by the vessel for a specific leg. It can be found at Voyage Number"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"carrierName": {
|
|
140
140
|
"type": "STRING",
|
|
141
141
|
"nullable": true,
|
|
142
|
-
"description": "The name of the carrier who issued the document e,g,
|
|
142
|
+
"description": "The name of the carrier who issued the document e,g, MSC."
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
"required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<PERSONA> You are an efficient document entity data extraction specialist working for a Freight Forwarding company. <PERSONA>
|
|
2
|
+
|
|
3
|
+
<TASK> Your task is to extract data from Booking Confirmation documents as per the given response schema structure. <TASK>
|
|
4
|
+
|
|
5
|
+
<CONTEXT>
|
|
6
|
+
The Freight Forwarding company receives Booking Confirmation from MSC Carrier (Shipping Lines) partners.
|
|
7
|
+
These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
|
|
8
|
+
They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
|
|
9
|
+
Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
|
|
10
|
+
|
|
11
|
+
To provide context on the journey of a containers for both Export and Import shipments,
|
|
12
|
+
For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
|
|
13
|
+
For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
|
|
14
|
+
<CONTEXT>
|
|
15
|
+
|
|
16
|
+
<INSTRUCTIONS>
|
|
17
|
+
- gateInTerminalCode: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
18
|
+
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
19
|
+
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
20
|
+
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
21
|
+
|
|
22
|
+
- cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be found at CUT-OFF(Date/Time), FCL delivery cut-off, CY CUT OFF, CY Closing.
|
|
23
|
+
|
|
24
|
+
- carrierName and carrierAddress:
|
|
25
|
+
- Extract the name and address of the carrier who is the main parent company in the document.
|
|
26
|
+
- It can be found in the top section of the document, often near the logo or header.
|
|
27
|
+
- Example:
|
|
28
|
+
- "MSC" for carrierName
|
|
29
|
+
- Hamburg, Germany, NETHERLANDS, Poland, Italy, Vietnam, China SHANGHAI BRANCH etc... for carrierAddress.
|
|
30
|
+
|
|
31
|
+
- Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
|
|
32
|
+
|
|
33
|
+
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
34
|
+
- eta: The estimated time of arrival for a specific leg.
|
|
35
|
+
- etd: The estimated time of departure for a specific leg.
|
|
36
|
+
- imoNumber: The International Maritime Organization number for a specific leg.
|
|
37
|
+
- portOfDischarge: The port where cargo is unloaded for a specific leg.
|
|
38
|
+
- portOfLoading: The port where cargo is loaded for a specific leg.
|
|
39
|
+
- vesselName: The name of the vessel for a specific leg.
|
|
40
|
+
- voyage: The journey or route taken by the vessel for a specific leg.
|
|
41
|
+
|
|
42
|
+
IMPORTANT explanation for the transportLegs part as follows:
|
|
43
|
+
- There is at least one leg in each document.
|
|
44
|
+
- 'eta' must be equal or later than 'etd'!
|
|
45
|
+
- first leg's ETD is always second value in EST. TIME OF ARRIVAL/DEPARTURE. E.g. 30/08/2025 14:00 31/10/2025 22:00 you need the select 31/10/2025 22:00.
|
|
46
|
+
- Multiple legs are possible. When there are multiple legs,
|
|
47
|
+
- Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
|
|
48
|
+
- "PORT OF TRANSHIPMENT N1" indicates the presence of a second leg. and "PORT OF TRANSHIPMENT N2" indicates the presence of a third leg.
|
|
49
|
+
- Transhipment Handling: Treat any mentioned "PORT OF TRANSHIPMENT N1" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
|
|
50
|
+
- The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
|
|
51
|
+
- PORT OF TRANSHIPMENT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
|
|
52
|
+
- PORT OF TRANSHIPMENT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
|
|
53
|
+
- Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
|
|
54
|
+
|
|
55
|
+
Structure of Multiple Leg Sequence & Mapping
|
|
56
|
+
Leg 1 (Initial):
|
|
57
|
+
- `portOfLoading`: PLACE OF LOADING.
|
|
58
|
+
- `portOfDischarge`: PORT OF TRANSHIPMENT N1 (if exists), otherwise PORT OF DISCHARGE.
|
|
59
|
+
- `vesselName`: VESSEL NAME (ignore parentheses).
|
|
60
|
+
- `imoNumber`: Number following LLOYDS NO. in Vessel Name.
|
|
61
|
+
- `etd`: 2nd timestamp in "EST. TIME OF ARRIVAL/DEPARTURE".
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Leg 2 (Intermediate): Trigger: Only if PORT OF TRANSHIPMENT N1 exists.
|
|
65
|
+
- `portOfLoading`: PORT OF TRANSHIPMENT N1.
|
|
66
|
+
- `portOfDischarge`: PORT OF TRANSHIPMENT N2 (if exists), otherwise PORT OF DISCHARGE.
|
|
67
|
+
- `vesselName`: CONNECTING VESSEL N1.
|
|
68
|
+
- `etd`: EST. TIME OF DEPARTURE from Port of Transhipment row.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Leg 3 (Final): Trigger: Only if PORT OF TRANSHIPMENT N2 exists.
|
|
72
|
+
- `portOfLoading`: PORT OF TRANSHIPMENT N2.
|
|
73
|
+
- `portOfDischarge`: PORT OF DISCHARGE.
|
|
74
|
+
- `vesselName`: CONNECTING VESSEL N2.
|
|
75
|
+
|
|
76
|
+
<INSTRUCTIONS>
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"bookingNumber": {
|
|
5
5
|
"type": "STRING",
|
|
6
6
|
"nullable": true,
|
|
7
|
-
"description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking
|
|
7
|
+
"description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking Reference', 'carrier's reference' or 'Order Ref'."
|
|
8
8
|
},
|
|
9
9
|
"contractNumber": {
|
|
10
10
|
"type": "STRING",
|
|
11
11
|
"nullable": true,
|
|
12
|
-
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG."
|
|
12
|
+
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be referred as Rate Agreement Number or Contract No."
|
|
13
13
|
},
|
|
14
14
|
"pickUpTerminalCode": {
|
|
15
15
|
"type": "STRING",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"gateInTerminalCode": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
|
-
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address"
|
|
22
|
+
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN LOCATION"
|
|
23
23
|
},
|
|
24
24
|
"serviceCode": {
|
|
25
25
|
"type": "STRING",
|
|
26
26
|
"nullable": true,
|
|
27
|
-
|
|
27
|
+
"description": "The Shipping service code associated with the booking confirmation. It can be found as SERVICE CODE"
|
|
28
28
|
},
|
|
29
29
|
"performaDate": {
|
|
30
30
|
"type": "STRING",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"cyCutOff": {
|
|
40
40
|
"type": "STRING",
|
|
41
41
|
"nullable": true,
|
|
42
|
-
"description": "The date by which the cargo to be delivered to the Container Yard. It can be found
|
|
42
|
+
"description": "The date by which the cargo to be delivered to the Container Yard. It can be found as Intended CY CUT OFF (First Full HUB) or Intended CY CUT OFF"
|
|
43
43
|
},
|
|
44
44
|
"gateInReference": {
|
|
45
45
|
"type": "STRING",
|
|
46
46
|
"nullable": true,
|
|
47
|
-
"description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be '
|
|
47
|
+
"description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be 'Booking Number'."
|
|
48
48
|
},
|
|
49
49
|
"mblNumber": {
|
|
50
50
|
"type": "STRING",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"pickUpReference": {
|
|
55
55
|
"type": "STRING",
|
|
56
56
|
"nullable": true,
|
|
57
|
-
"description": "A reference code for cargo pickup during the import shipment. Sometimes it can be '
|
|
57
|
+
"description": "A reference code for cargo pickup during the import shipment. Sometimes it can be 'Booking Number'."
|
|
58
58
|
},
|
|
59
59
|
"siCutOff": {
|
|
60
60
|
"type": "STRING",
|
|
61
61
|
"nullable": true,
|
|
62
|
-
"description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found
|
|
62
|
+
"description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found as Shipping Instruction/BL Master Due Date"
|
|
63
63
|
},
|
|
64
64
|
"vgmCutOff": {
|
|
65
65
|
"type": "STRING",
|
|
66
66
|
"nullable": true,
|
|
67
|
-
"description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found
|
|
67
|
+
"description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found as Verified Gross Mass (VGM) Due Date"
|
|
68
68
|
},
|
|
69
69
|
"containers": {
|
|
70
70
|
"type": "ARRAY",
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
"pickUpDepotCode": {
|
|
80
80
|
"type": "STRING",
|
|
81
81
|
"nullable": true,
|
|
82
|
-
"description": "The depot code where the empty container will be picked up."
|
|
82
|
+
"description": "The depot code where the empty container will be picked up. It is found as EMPTY PICK UP LOCATION"
|
|
83
83
|
},
|
|
84
84
|
"dropOffDepotCode": {
|
|
85
85
|
"type": "STRING",
|
|
86
86
|
"nullable": true,
|
|
87
|
-
"description": "The depot code where the empty container will be dropped off."
|
|
87
|
+
"description": "The depot code where the empty container will be dropped off. EMPTY DROPOFF LOCATION or EMPTY RETURN LOCATION"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"carrierName": {
|
|
154
154
|
"type": "STRING",
|
|
155
155
|
"nullable": true,
|
|
156
|
-
"description": "The name of the carrier who issued the document."
|
|
156
|
+
"description": "The name of the carrier who issued the document. E.g., OOCL or Orient Overseas Container Line Ltd."
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
"required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<PERSONA> You are an efficient document entity data extraction specialist working for a Freight Forwarding company. <PERSONA>
|
|
2
|
+
|
|
3
|
+
<TASK> Your task is to extract data from Booking Confirmation documents as per the given response schema structure. <TASK>
|
|
4
|
+
|
|
5
|
+
<CONTEXT>
|
|
6
|
+
The Freight Forwarding company receives Booking Confirmation from OOCL Carrier (Shipping Lines) partners.
|
|
7
|
+
These Booking Confirmations contain various details related to booking, container pick up and drop off depot details, vessel details, as well as other transport Legs data.
|
|
8
|
+
They may be written in different languages such as English, German, Vietnamese, Chinese, and other European languages, and can appear in a variety of formats and layouts.
|
|
9
|
+
Your role is to accurately extract specific entities from these Booking Confirmations to support efficient processing and accurate record-keeping.
|
|
10
|
+
|
|
11
|
+
To provide context on the journey of a containers for both Export and Import shipments,
|
|
12
|
+
For Export shipment: An empty container is picked up from a depot (pickupDepotCode) using a pickUpReference and goods loaded into it at a warehouse. Then the loaded container / cargo is transported back to a Container Yard or gateInTerminal before the cyCutOff date for further shipping processes. Then the POL of the First TransportLeg may start from the gateInTerminal or a different POL too.
|
|
13
|
+
For Import Shipment: The loaded container / cargo arrives at a port of discharge then picked up at pickUpTerminal using pickUpReference. After delivery, an empty container is returned to a depot (dropOffDepotCode).
|
|
14
|
+
<CONTEXT>
|
|
15
|
+
|
|
16
|
+
<INSTRUCTIONS>
|
|
17
|
+
- Populate fields as defined in the response schema.
|
|
18
|
+
- Use the data field description to understand the context of the data.
|
|
19
|
+
|
|
20
|
+
- bookingNumber: Extract the booking number. This information can be found at the top section of the document".
|
|
21
|
+
|
|
22
|
+
- gateInTerminalCode: The specific terminal where cargo is gated in. It can be called as FULL RETURN LOCATION. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
23
|
+
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
24
|
+
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
25
|
+
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
26
|
+
|
|
27
|
+
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
28
|
+
- eta: The estimated time of arrival for a specific leg.
|
|
29
|
+
- etd: The estimated time of departure for a specific leg.
|
|
30
|
+
- imoNumber: The International Maritime Organization number for a specific leg.
|
|
31
|
+
- portOfDischarge: The port where cargo is unloaded for a specific leg.
|
|
32
|
+
- portOfLoading: The port where cargo is loaded for a specific leg.
|
|
33
|
+
- vesselName: The name of the vessel for a specific leg. It can be found as INTENDED VESSEL.
|
|
34
|
+
- voyage: The journey or route taken by the vessel for a specific leg. It can be found as VOYAGE.
|
|
35
|
+
|
|
36
|
+
IMPORTANT explanation for the transportLegs part as follows:
|
|
37
|
+
- There is at least one leg in each document.
|
|
38
|
+
- 'ETA' must be equal or later than 'ETD'!
|
|
39
|
+
- first leg's ETA is always after the first leg's ETD in the document.
|
|
40
|
+
- Multiple legs are possible. When there are multiple legs,
|
|
41
|
+
- Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
|
|
42
|
+
- "TRANSHIPMENT PORT" indicates the presence of a second leg.
|
|
43
|
+
- Transhipment Handling: Treat any mentioned "TRANSHIPMENT PORT" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
|
|
44
|
+
- The Connectivity Rule: For any sequence of legs, the Port of Discharge of the previous leg must match the Port of Loading of the following leg.
|
|
45
|
+
- TRANSHIPMENT PORT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
|
|
46
|
+
- TRANSHIPMENT PORT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
|
|
47
|
+
- Timeline Integrity: Ensure a "No Time Travel" policy: The eta of a previous leg must be earlier than or equal to the etd of the following leg.
|
|
48
|
+
- Make sure the ETA and ETD values are extracted from the correct lines as per the above instructions.
|
|
49
|
+
<INSTRUCTIONS>
|