data-science-document-ai 1.57.0__py3-none-any.whl → 1.59.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: data-science-document-ai
3
- Version: 1.57.0
3
+ Version: 1.59.0
4
4
  Summary: "Document AI repo for data science"
5
5
  Author: Naomi Nguyen
6
6
  Author-email: naomi.nguyen@forto.com
@@ -13,20 +13,20 @@ src/postprocessing/postprocess_commercial_invoice.py,sha256=3I8ijluTZcOs_sMnFZxf
13
13
  src/postprocessing/postprocess_partner_invoice.py,sha256=WuaTQK5D09dV_QNrh29ZoKX9IvQn2Ub-WnAMyRjCsvI,14240
14
14
  src/prompts/library/arrivalNotice/other/placeholders.json,sha256=1vzly1amgyKt3jr2JJQbb24kNZsnI289iduvoUo5dJU,3061
15
15
  src/prompts/library/arrivalNotice/other/prompt.txt,sha256=QNuU-BvMA8VbdupVNapad4O3WmCotH5cKNxImRMbKDk,2906
16
- src/prompts/library/bookingConfirmation/evergreen/placeholders.json,sha256=5efq6b--KGWeqGbvASZFTqXJgUEAvsC-0ljo-q0Lhew,5855
17
- src/prompts/library/bookingConfirmation/evergreen/prompt.txt,sha256=OxNfXZaWppwsFMprthzJpOOr8ApQL4KYEmlu9fSUvxk,3485
18
- src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json,sha256=5efq6b--KGWeqGbvASZFTqXJgUEAvsC-0ljo-q0Lhew,5855
19
- src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt,sha256=I9x52U9Kt3vwiQK96KnaAhD48rEjL47jS0JDm3QT27k,5025
20
- src/prompts/library/bookingConfirmation/maersk/placeholders.json,sha256=5efq6b--KGWeqGbvASZFTqXJgUEAvsC-0ljo-q0Lhew,5855
21
- src/prompts/library/bookingConfirmation/maersk/prompt.txt,sha256=S-C5cq8AkEoGKilCO0XiXLZXgZPwz9udQOTm557GG64,3984
22
- src/prompts/library/bookingConfirmation/msc/placeholders.json,sha256=5efq6b--KGWeqGbvASZFTqXJgUEAvsC-0ljo-q0Lhew,5855
23
- src/prompts/library/bookingConfirmation/msc/prompt.txt,sha256=bojE6BytnEoQfdXrQebaXYTToDF1Fbyn4YdIGMke2Jo,5463
24
- src/prompts/library/bookingConfirmation/oocl/placeholders.json,sha256=LqjzD-8LkX9hAq3eOBMwit6tLrSLmVMUXTIyhBEaYxk,6037
25
- src/prompts/library/bookingConfirmation/oocl/prompt.txt,sha256=pCsj2BNnP-_kwgUEDt8IehO-tyMv6qeD5nyIzXJL3c0,2925
26
- src/prompts/library/bookingConfirmation/other/placeholders.json,sha256=LqjzD-8LkX9hAq3eOBMwit6tLrSLmVMUXTIyhBEaYxk,6037
27
- src/prompts/library/bookingConfirmation/other/prompt.txt,sha256=-629upv9-ciO6eG3A0_2TTjy7iLlInMsmQfSwAukjLg,4919
28
- src/prompts/library/bookingConfirmation/yangming/placeholders.json,sha256=LqjzD-8LkX9hAq3eOBMwit6tLrSLmVMUXTIyhBEaYxk,6037
29
- src/prompts/library/bookingConfirmation/yangming/prompt.txt,sha256=gySDhfRdQHy3IIomOR3qwY49wlO63Xw73GUSPrEkkr4,3990
16
+ src/prompts/library/bookingConfirmation/evergreen/placeholders.json,sha256=94OSMKxqgZHyxyGekNV8pnzs7ueCoOpQji8I8_5J1nM,5755
17
+ src/prompts/library/bookingConfirmation/evergreen/prompt.txt,sha256=cDxfiiPVChYAEvhpZ9UbH3qBFi5dChvDu6iAf2mrzTw,4435
18
+ src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json,sha256=en83Em25e5PF2OAgFJC8w-MONVnketPZ3J_3zCjIVfE,5915
19
+ src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt,sha256=GobSqeqt_d-OKBMjAddcD0AFzyPXayHSiS1aPNRbtPk,5162
20
+ src/prompts/library/bookingConfirmation/maersk/placeholders.json,sha256=L7MtCAgz7Wc1avh4K0UCuH8JPwXpu_08ApBu16NBhkk,5953
21
+ src/prompts/library/bookingConfirmation/maersk/prompt.txt,sha256=nnzMu4_FGBNNK9jLTsjotKdD9dMtdNgbT2uolAHU4JQ,5479
22
+ src/prompts/library/bookingConfirmation/msc/placeholders.json,sha256=vIkVrK1sjv9pvWM5rVHFSTD64r5--N-QDD-K_hsFXeY,5909
23
+ src/prompts/library/bookingConfirmation/msc/prompt.txt,sha256=iuvN8UMdOlOBjymiyuTBfizsqvto0IphCik-iHzpwyM,5850
24
+ src/prompts/library/bookingConfirmation/oocl/placeholders.json,sha256=21krpZhmr7UHkX-R3l4OAxPUkonHwJK0TvGGJrRoXwg,6222
25
+ src/prompts/library/bookingConfirmation/oocl/prompt.txt,sha256=z0iJXIwgsnrZafav7qqDBffz_L_IieEyfoJ1vpKcnyk,4502
26
+ src/prompts/library/bookingConfirmation/other/placeholders.json,sha256=wxLDMGfN6HG9O4sV882lgxvdAxSDO7Binkni1b5Uz8I,6922
27
+ src/prompts/library/bookingConfirmation/other/prompt.txt,sha256=MDxadz505Ddssa5DNOpssQrNrZxgOKzrQea0S3sLjUA,7578
28
+ src/prompts/library/bookingConfirmation/yangming/placeholders.json,sha256=kXTrHFIdltMB0uEkj74XV_2bqsD5leDfqwKddZvzXjA,6040
29
+ src/prompts/library/bookingConfirmation/yangming/prompt.txt,sha256=c_qHnP7f2JTCumDRN0aQ9QpXmglLPRuaMEiDXq3wMJ0,4605
30
30
  src/prompts/library/bundeskasse/other/placeholders.json,sha256=7xKzi_ypkIICO9nrEl45W9G7-h33uWVRVWnpg2b5lUg,4288
31
31
  src/prompts/library/bundeskasse/other/prompt.txt,sha256=miNYoqRZEd6Z1LNisTahX1-tenzr5kEpRA6gvPH7NCw,3316
32
32
  src/prompts/library/commercialInvoice/other/placeholders.json,sha256=zUK2mg9MnHiEQRYF6VgTiUiq68WGy5f7_4qL63CWyR0,4700
@@ -55,6 +55,6 @@ src/prompts/prompt_library.py,sha256=VJWHeXN-s501C2GiidIIvQQuZdU6T1R27hE2dKBiI40
55
55
  src/setup.py,sha256=8-vZWjC8Iwa3xxdk3iR4412VCjtNtgzVqkXcFon7UBE,7309
56
56
  src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
57
57
  src/utils.py,sha256=Ow5_Jals88o8mbZ1BoHfZpHZoCfig_UQb5aalH-mpWE,17278
58
- data_science_document_ai-1.57.0.dist-info/METADATA,sha256=CnYlyCERc0j4WniG4qrEYOKLhcTtEXWZw6nQ5XJEQeE,2152
59
- data_science_document_ai-1.57.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
60
- data_science_document_ai-1.57.0.dist-info/RECORD,,
58
+ data_science_document_ai-1.59.0.dist-info/METADATA,sha256=nw9fpAMJbpbvSSV5xO_5nHco_eqwgrAWtTt2VrR5GgQ,2152
59
+ data_science_document_ai-1.59.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
60
+ data_science_document_ai-1.59.0.dist-info/RECORD,,
@@ -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., Export terminal delivery address, Export terminal location, or Export terminal name."
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 FCL delivery cut-off, FCL DG delivery cut-off, CY CUT OFF, CY Closing."
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 Shipping Instruction Closing."
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 vessel, INTENDED VESSEL/VOYAGE"
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 Voy. no, INTENDED VESSEL/VOYAGE"
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, Hapag-Lloyd."
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"]
@@ -7,34 +7,50 @@ The Freight Forwarding company receives Booking Confirmation from EverGreen Carr
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
+
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).
10
14
  <CONTEXT>
11
15
 
12
- "mblNumber": "Extract the value after the label 'BOOKING NO.'.",
13
- "gateInReference": "Extract the value after the label 'BOOKING NO.'.",
14
- "pickUpReference": "Extract the value after the label 'BOOKING NO.'.",
15
- "bookingNumber": "Extract the value after the label 'BOOKING NO.'.",
16
- "vesselName": "Extract the text after the label 'VESSEL/VOYAGE' and before the hyphen.",
17
- "voyage": "Voyage is a code of numbers and letters sometimes separated by '-'. Extract the text after the label 'VESSEL/VOYAGE' and after the hyphen.",
18
- "portOfLoading": "Extract the text after the label 'PORT OF LOADING'.",
19
- "cyCutOff": "Extract the date and time information after the label 'CARGO CUT OFF DATE/TIME'.",
20
- "siCutOff": "Extract the date and time information after the label 'DOC CUT OFF DATE/TIME'.",
21
- "vgmCutOff": "Extract the date and time information after the label 'VGM CUT OFF via EDI/WEB/APP'.",
22
- "portOfDischarge": "Extract the text after the label 'PORT OF DISCHARGING:' and before 'FINAL DESTINATION'.",
23
- "pickUpTerminal": "Extract the text after the label 'EMPTY PICK UP AT:' removing any extra spaces or line breaks.",
24
- "gateInTerminal": "Extract the text after the label 'FULL RETURN TO:' removing any extra spaces or line breaks.",
25
-
26
- "transportLegs":
27
- "portOfLoading": "For the first leg, use the extracted 'portOfLoading'.",
28
- "portOfDischarge": "Extract the text after the label 'T/S PORT OF LOADING:'.",
29
- "vesselName": "For the first leg, use the extracted 'vesselName'.",
30
- "voyage": "Voyage is a code of numbers and letters sometimes separated by '-'. For the first leg, use the extracted 'voyage'.",
31
- "eta": "Extract the date after the label 'ETA DATE' that appears within the section starting with 'FINAL DESTINATION:' and ending with 'T/S PORT OF LOADING:'.",
32
- "etd": "Extract the date after the label 'ETD DATE' that appears within the section starting with 'PORT OF LOADING:' and ending with 'FINAL DESTINATION:'.",
33
-
34
-
35
- "portOfLoading": "For the second leg, use the 'portOfDischarge' from the previous leg.",
36
- "portOfDischarge": "For the second leg, use the extracted 'portOfDischarge' from the main extraction.",
37
- "vesselName": "Extract the text after the label 'EST. CONNECT VSL/VOY:' and before the hyphen and numbers.",
38
- "voyage": "Voyage is a code of numbers and letters sometimes separated by '-'. Extract the code after the label 'EST. CONNECT VSL/VOY:' and after the vessel name.",
39
- "eta": "Extract the date after the label 'ETA DATE' that is after the line that contains 'T/S PORT OF LOADING'",
40
- "etd": "Extract the date after the label 'ETD DATE' that is related to the 'EST. CONNECT VSL/VOY:'. "
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>
@@ -134,7 +134,7 @@
134
134
  "carrierAddress": {
135
135
  "type": "STRING",
136
136
  "nullable": true,
137
- "description": "The address of the carrier who provides service and issued the document."
137
+ "description": "The address of the carrier who provides service and issued the document. It can be from Germany, Poland, Italy, Vietnam, China, etc."
138
138
  },
139
139
  "carrierName": {
140
140
  "type": "STRING",
@@ -29,8 +29,10 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
29
29
 
30
30
  - carrierName and carrierAddress:
31
31
  - Extract the name and address of the carrier who is the main parent company in the document.
32
+ - It can be found in the top section of the document, often near the logo or header.
32
33
  - Example:
33
- - "Hapag-Lloyd AG" or "Hapag-Lloyd Aktiengesellschaft" for vendorName.
34
+ - "Hapag-Lloyd" for carrierName
35
+ - Hamburg, Germany, Poland, Italy, Vietnam, China etc... for carrierAddress
34
36
 
35
37
  - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
36
38
  - eta: The estimated time of arrival for a specific leg.
@@ -44,7 +46,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
44
46
  - Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
45
47
  - containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
46
48
  - pickupDepotCode: The code of the depot where the empty container is picked up.
47
- - 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
48
50
 
49
51
  IMPORTANT explanation for the transportLegs part as follows:
50
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 Export terminal name."
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, Hapag-Lloyd."
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"]
@@ -7,61 +7,53 @@ The Freight Forwarding company receives Booking Confirmation from MAERSK Carrier
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
- <CONTEXT>
11
-
12
- bookingNumber: A unique identifier for the booking.
13
- cyCutOff: The deadline for cargo to be delivered to the Container Yard.
14
- gateInReference: A reference code for cargo entering the terminal.
15
- gateInTerminal: The specific terminal where cargo is gated in.
16
- mblNumber: The Master Bill of Lading number.
17
- pickUpReference: A reference code for cargo pickup.
18
- pickUpTerminal: The specific terminal for cargo pickup.
19
- siCutOff: The deadline for submitting shipping instructions.
20
- vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo.
21
- transportLegs:
22
- eta: The estimated time of arrival for a specific leg.
23
- etd: The estimated time of departure for a specific leg.
24
- imoNumber: The International Maritime Organization number for a specific leg.
25
- portOfDischarge: The port where cargo is unloaded for a specific leg.
26
- portOfLoading: The port where cargo is loaded for a specific leg.
27
- vesselName: The name of the vessel for a specific leg.
28
- voyage: The journey or route taken by the vessel for a specific leg.
29
-
30
- your task is to extract the text value of the following entities and page numbers starting from 0 where the value was found in the document:
31
- SCHEMA_PLACEHOLDER
32
10
 
33
- Keywords for datapoints:
34
- - bookingNumber: Booking No.
35
- - cyCutOff: CY CUT OFF, CY Closing - Latest Return Container Date, Cargo Cut-off deadline
36
- - gateInTerminal: Return Equip Delivery Terminal and Location interception
37
- - pickUpTerminal: Empty Container Depot and Location interception
38
- - siCutOff: SI Cut Off, Shipping Instruction deadline
39
- - vgmCutOff: VGM Submission Deadline, Verified Gross Mass deadline
40
- - eta: ETA
41
- - etd: ETD
42
- - portOfDischarge: To
43
- - portOfLoading: From
44
- - vesselName: Vessel
45
- - voyage: Voy No.
46
-
47
- Table Structure to extract TransportLegs:
48
- - transportlegs table has following colum names: From, To, Mode, Vessel, Voy No., ETD, ETA
49
- - The tables can be found under the title of Intended Transport Plan
50
- - use Vessel column for vesselName. Do not mix 'Vessel' column with 'Mode' column. Vessel cannot be 'TRK' or 'RCO'!
51
- - use 'Voy No.' column for voyage. Do not mix 'Voy No.' column with 'Mode' column. voyage cannot be 'TRK' or 'RCO'!
52
- - If vesselName value is ROC, TRK or MVS, RCO it is a Mode not a vesselName.
53
- - Don't use the same vesselName for multiple transport legs!
54
- - The table rows are not uniform, the words can be wrapped.
55
- - To be able to determine the number of row; you can reference the number of ETA and ETD.
56
-
57
- Further explanation for datapoints except transportLegs part as follows:
58
- - If gateInReference is null, assign it the same value as bookingNumber.
59
- - If pickUpReference is null, assign it the same value as bookingNumber.
60
- - If mblNumber is null, assign 'MAEU' + bookingNumber. E.g. if booking number is '244211559', assign 'MAEU244211559'.
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>
61
15
 
62
- You must apply the following rules:
63
- - The JSON schema must be followed during the extraction.
64
- - The values must only include text found in the document
65
- - Do not normalize any entity value.
66
- - If an entity is not found in the document, keep it empty or np.Nan.
67
- - Validate the JSON make sure its a valid JSON ! No extra text, no missing comma!
16
+ <INSTRUCTIONS>
17
+ - bookingNumber: A unique identifier for the booking.
18
+
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.
20
+ - gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
21
+ - pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
22
+ - pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
23
+
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.
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
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
27
+
28
+ - carrierName and carrierAddress:
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.
39
+
40
+ - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
41
+ - eta: The estimated time of arrival for a specific leg.
42
+ - etd: The estimated time of departure for a specific leg.
43
+ - imoNumber: The International Maritime Organization number for a specific leg.
44
+ - portOfDischarge: The port where cargo is unloaded for a specific leg.
45
+ - portOfLoading: The port where cargo is loaded for a specific leg.
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.
48
+
49
+ IMPORTANT explanation for the transportLegs part as follows:
50
+ - There is at least one leg in each document.
51
+ - 'eta' must be equal or later than 'etd'!
52
+ - Multiple legs are possible. When there are multiple legs,
53
+ - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
54
+ - The Connectivity Rule: For any sequence of legs, the Destination (Port of Discharge) of the previous leg must match the Origin (Port of Loading) of the following leg.
55
+ - Transhipment Handling: Treat any mentioned "Transhipment Port" as the bridge between two legs (Discharge for Leg A / Loading for Leg B).
56
+ - 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.
57
+ - Naming Convention: Look for Port Names followed by abbreviations in parentheses, e.g., "Port Name (ABCDE)".
58
+
59
+ <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 No.', 'Booking Reference', 'Our Reference', or 'Order Ref'."
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. E.g., Export terminal delivery address, Export terminal location, or Export terminal name."
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 FCL delivery cut-off, FCL DG delivery cut-off, CY CUT OFF, CY Closing."
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 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 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 Voy. no, INTENDED VESSEL/VOYAGE"
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, Hapag-Lloyd."
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"]
@@ -7,73 +7,70 @@ The Freight Forwarding company receives Booking Confirmation from MSC Carrier (S
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
+
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).
10
14
  <CONTEXT>
11
15
 
12
- bookingNumber: A unique identifier for the booking.
13
- cyCutOff: The deadline for cargo to be delivered to the Container Yard.
14
- gateInReference: A reference code for cargo entering the terminal.
15
- gateInTerminal: The specific terminal where cargo is gated in.
16
- mblNumber: The Master Bill of Lading number.
17
- pickUpReference: A reference code for cargo pickup.
18
- pickUpTerminal: The specific terminal for cargo pickup.
19
- siCutOff: The deadline for submitting shipping instructions.
20
- vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo.
21
- transportLegs:
22
- eta: The estimated time of arrival for a specific leg.
23
- etd: The estimated time of departure for a specific leg.
24
- imoNumber: The International Maritime Organization number for a specific leg.
25
- portOfDischarge: The port where cargo is unloaded for a specific leg.
26
- portOfLoading: The port where cargo is loaded for a specific leg.
27
- vesselName: The name of the vessel for a specific leg.
28
- voyage: The journey or route taken by the vessel for a specific leg.
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".
29
32
 
30
- your task is to extract the text value of the following entities and page numbers starting from 0 where the value was found in the document:
31
- SCHEMA_PLACEHOLDER
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.
32
41
 
33
- Further explanation and Keywords for the transportLegs part as follows. The below 2 conditions is crucial. Take attention here:
34
- - if PORT OF TRANSHIPMENT N*1 value is avaliable, it means we have the second leg, otherwise skip the second and third leg instructions, make it only one leg!
35
- - if PORT OF TRANSHIPMENT N*2 value is avaliable, it means we have the third leg, otherwise skip the third leg instructions, make it only two leg!
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.
36
54
 
37
- - first leg instructions:
38
- - first leg's portOfLoading is always PLACE OF LOADING value.
39
- - first leg's vesselName is always VESSEL NAME value, Ignore the paranthesis part!.
40
- - first leg's portOfDischarge is PORT OF TRANSHIPMENT N*1 value if PORT OF TRANSHIPMENT N*1 value is exists.
41
- - first leg's portOfDischarge is PORT OF DISCHARGE value if PORT OF TRANSHIPMENT N*1 value is not exists.
42
- - first leg's voyage is always VOYAGE NUMBER value with the same row VESSEL NAME.
43
- - first leg's imoNumber is in the VESSEL NAME which the number following of LLOYDS NO.
44
- - first leg's eta is EST. TIME OF ARRIVAL value with the same row VESSEL NAME if PORT OF TRANSHIPMENT N*1 value is not exists.
45
- - first leg's etd is always EST. TIME OF ARRIVAL/DEPARTURE second value E.g. 30/08/2023 14:00 31/08/2023 22:00 you need the select 31/08/2023 22:00.
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".
46
62
 
47
- - second leg instructions:
48
- - second leg's portOfLoading is always PORT OF TRANSHIPMENT N*1 value.
49
- - second leg's vesselName is always CONNECTING VESSEL N*1 value.
50
- - second leg's portOfDischarge is PORT OF TRANSHIPMENT N*2 value if PORT OF TRANSHIPMENT N*2 value is exists.
51
- - second leg's portOfDischarge is PORT OF DISCHARGE value if PORT OF TRANSHIPMENT N*2 value is not exists.
52
- - second leg's voyage is always VOYAGE NUMBER value with the same row CONNECTING VESSEL N*1.
53
- - second leg's imoNumber is in the CONNECTING VESSEL N*1 which the number following of LLOYDS NO.
54
- - second leg's eta is never available so set it to null.
55
- - second leg's etd is always EST. TIME OF DEPARTURE value with the same row PORT OF TRANSHIPMENT N*1.
56
63
 
57
- - third leg instructions:
58
- - third leg's portOfLoading is always PORT OF TRANSHIPMENT N*2 value.
59
- - third leg's vesselName is always CONNECTING VESSEL N*2 value.
60
- - third leg's portOfDischarge is always PORT OF DISCHARGE value.
61
- - third leg's voyage is always VOYAGE NUMBER value with the same row CONNECTING VESSEL N*2.
62
- - third leg's imoNumber is in the CONNECTING VESSEL N*2 which the number following of LLOYDS NO.
63
- - third leg's eta is never available so set it to null.
64
- - third leg's etd is always EST. TIME OF DEPARTURE value with the same row PORT OF TRANSHIPMENT N*2.
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.
65
69
 
66
- - finalizing transporLegs:
67
- - Check number of legs
68
- - If the last item of the transportLegs' portOfLoading is the same value with PORT OF DISCHARGE DELETE THE ITEM!
69
70
 
70
- Further explanation for datapoints except transportLegs part as follows:
71
- - If gateInReference is null, assign it the same value as bookingNumber.
72
- - If pickUpReference is null, assign it the same value as bookingNumber.
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.
73
75
 
74
- You must apply the following rules:
75
- - The JSON schema must be followed during the extraction.
76
- - The values must only include text found in the document
77
- - Do not normalize any entity value.
78
- - If an entity is not found in the document, keep it empty or np.Nan.
79
- - Validate the JSON make sure its a valid JSON ! No extra text, no missing comma!
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 No.', 'Booking Ref.', 'Booking Reference', 'Booking ID', 'carrier's reference' or 'Order Ref'."
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
- "description": "The Shipping service code associated with the booking confirmation."
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 with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
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 'Our Reference'."
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 'Our Reference'"
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 with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
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 with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
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"]
@@ -7,18 +7,43 @@ The Freight Forwarding company receives Booking Confirmation from OOCL Carrier (
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
+
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).
10
14
  <CONTEXT>
11
15
 
12
- bookingNumber: Extract the booking number. This information can be found near the labels "BOOKING ACKNOWLEDGEMENT" or "BOOKING NUMBER".
13
- gateInReference: This field should have the same value as the bookingNumber.
14
- cyCutOff: Look for the "INTENDED FCL CY CUT-OFF" label and extract the date and time value.
15
- vgmCutOff: Look for the "INTENDED VGM CUT-OFF" label and extract the date and time value.
16
- siCutOff: Look for the "INTENDED SI CUT-OFF" label and extract the date and time value.
17
- pickUpTerminal: Extract the pick-up terminal information, which can be found near the "EMPTY PICKUP LOCATION" label.
18
- transportLegs: This field should contain a list of two dictionaries. The first dictionary represents the first transport leg, starting with the initial "PORT OF LOADING" and ending with the "TRANSSHIPMENT PORT". The second dictionary represents the second transport leg, starting with the "TRANSSHIPMENT PORT" and ending with the "FINAL DESTINATION".
19
- eta: Within each transport leg, extract the estimated time of arrival (ETA) value, which is usually located near the "ETA" label. Eta should be a later date than etd! Ignore the first ETA label in the document that is on the line that starts with "INTENDED VESSEL/VOYAGE". For the first transport leg the correct eta is on the line that starts with "T/S". For the second leg the correct eta is on the line that starts with "FINAL DESTINATION".
20
- etd: Within each transport leg, extract the estimated time of departure (ETD) value, which is usually located near the "ETD" label.
21
- portOfDischarge: Within the second transport leg, extract the port of discharge information, which can be found near the "PORT OF DISCHARGE" label.
22
- portOfLoading: Extract the port of loading information, which can be found near the "PORT OF LOADING" label.
23
- vesselName: Within each transport leg, extract the vessel name, which can be found near the labels "INTENDED VESSEL/VOYAGE" or "T/S INTENDED VESSEL/VOYAGE".
24
- voyage: Within each transport leg, extract the voyage number, which is usually located right after the vessel name.
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>
@@ -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. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Cargo Delivery At, Delivery Terminal, Full Return CY, eyc.."
23
23
  },
24
24
  "serviceCode": {
25
25
  "type": "STRING",
26
26
  "nullable": true,
27
- "description": "The Shipping service code associated with the booking confirmation."
27
+ "description": "The Shipping service code associated with the booking confirmation. It is often referred to 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 with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
42
+ "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys CARGO CUT OFF DATE/TIME, FCL delivery cut-off, CARGO CUT-OFF (Terminal Facility), CY CUT OFF, Terminal Cut-Off, Port Cut-off Date/Time."
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 'Our Reference'."
47
+ "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. Sometimes it can be load ref., Turn-in reference, or if nothing mentioned, it is 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 'Our Reference'"
57
+ "description": "A reference code for cargo pickup during the import shipment. Sometimes it can be Pick-up reference, Our Reference or 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 with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
62
+ "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys SI DEADLINE, SI DUE, SI CUT OFF, SI General CUT OFF, B/L INSTRUCTION DEADLINE, Closing B/L 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 with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
67
+ "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys VGM DEADLINE, VGM DUE, VGM CUT OFF, Doc Cut Off Date/Time, Closing VGM Date."
68
68
  },
69
69
  "containers": {
70
70
  "type": "ARRAY",
@@ -79,7 +79,7 @@
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 can be referred as EMPTY PICK UP AT, Pick Up Depot, Empty Container Pickup Location, Empty Pick Up Location, Pick Up Preff Depot."
83
83
  },
84
84
  "dropOffDepotCode": {
85
85
  "type": "STRING",
@@ -127,12 +127,12 @@
127
127
  "vesselName": {
128
128
  "type": "STRING",
129
129
  "nullable": true,
130
- "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE"
130
+ "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE. Need to extract the name only, excluding the voyage number. E.g., 'Maersk Alabama' from 'Maersk Alabama 123E"
131
131
  },
132
132
  "voyage": {
133
133
  "type": "STRING",
134
134
  "nullable": true,
135
- "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE"
135
+ "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE. Need to extract the voyage number only, excluding the vessel name. E.g., '123E' from 'Maersk Alabama 123E'"
136
136
  }
137
137
  }
138
138
  },
@@ -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,, Maersk, MSC, CMA CGM, Hapag-Lloyd, ONE, Evergreen etc."
157
157
  }
158
158
  },
159
159
  "required": ["bookingNumber", "transportLegs", "containers", "cyCutOff", "vgmCutOff", "siCutOff"]
@@ -18,40 +18,64 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
18
18
  - Populate fields as defined in the response schema.
19
19
  - Use the data field description to understand the context of the data.
20
20
 
21
- - gateInTerminal: The specific terminal where cargo is gated in. It can be found as Export terminal delivery address, PORT OF LOADING (after the slash '/').
21
+ - gateInTerminal: The specific terminal where cargo is gated in. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Delivery Terminal, Full Return CY, Cargo Delivery At, etc... Sometimes, it might be same as PORT OF LOADING (after the slash '/').
22
22
  - gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
23
23
  - pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
24
24
  - pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
25
25
 
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, Cargo Cut-off deadline
27
- - 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
26
+ - cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be referred to as CARGO CUT OFF DATE/TIME, CARGO CUT-OFF (Terminal Facility), Terminal Cut-Off, Port Cut-off Date/Time, FCL delivery cut-off, CY CUT OFF, CY Closing - Latest Return Container Date, Cargo Cut-off deadline
27
+ - 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, SI DEADLINE, SI DUE, SI General CUT OFF, B/L INSTRUCTION DEADLINE, Closing B/L Date.
28
28
  - 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
29
 
30
30
  - carrierName and carrierAddress:
31
31
  - Extract the name and address of the carrier who is the main parent company in the document.
32
+ - Example:
33
+ - "Hapag-Lloyd", "MSC", "CMA CGM", "ONE", "COSCO SHIPPING", "Evergreen", "Yang Ming", "ZIM", "PIL", "HMM" etc... for carrierName
34
+ - Hamburg, Germany, Poland, Italy, Vietnam, China etc... for carrierAddress
35
+
36
+ - Containers: Need to extract Depot details per Container Type. Multiple Containers entries may exist, capture all instances under "Containers".
37
+ - containerType: The type of container (e.g., 20FT, 40FT, 20ft, 40ft, 40HC, 20DC, etc...).
38
+ - pickupDepotCode: The code of the depot where the empty container is picked up. It can be referred as EMPTY PICK UP AT, Pick Up Depot, Empty Container Pickup Location, Empty Pick Up Location, Pick Up Preff Depot."
39
+ - dropOffDepotCode: The code of the depot where the empty container is dropped off. It can be referred as EMPTY RETURN TO, Empty Container Drop Off Location, Empty Return Location, Drop Off Preff Depot.
32
40
 
33
41
  - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
34
42
  - eta: The estimated time of arrival for a specific leg.
35
- - etd: The estimated time of departure for a specific leg.
43
+ - etd: The estimated time of departure for a specific leg. E,g. "EST. TIME OF ARRIVAL/DEPARTURE", Sailing Date ETS.
36
44
  - imoNumber: The International Maritime Organization number for a specific leg.
37
45
  - portOfDischarge: The port where cargo is unloaded for a specific leg.
38
46
  - portOfLoading: The port where cargo is loaded for a specific leg.
39
47
  - vesselName: The name of the vessel for a specific leg.
40
48
  - voyage: The journey or route taken by the vessel for a specific leg.
41
49
 
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
-
47
50
  IMPORTANT explanation for the transportLegs part as follows:
48
51
  - There is at least one leg in each document.
49
52
  - 'eta' must be equal or later than 'etd'!
50
53
  - Multiple legs are possible. When there are multiple legs,
51
54
  - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
52
- - The Connectivity Rule: For any sequence of legs, the Destination (Port of Discharge) of the previous leg must match the Origin (Port of Loading) of the following leg.
53
- - Transhipment Handling: Treat any mentioned "Transhipment Port" as the bridge between two legs (Discharge for Leg A / Loading for Leg B).
55
+ - "PORT OF TRANSHIPMENT N1", "T/S PORT OF LOADING", "TRANSHIPMENT PORT", "Transhipment", indicates the presence of a multi-leg journey. Sometimes, Having POD of the first leg and POL of the second leg indicates a multi-leg journey as well.
56
+ - "PORT OF TRANSHIPMENT N1" indicates the presence of a second leg. and "PORT OF TRANSHIPMENT N2" indicates the presence of a third leg.
57
+ - Transhipment Handling: Treat any mentioned "PORT OF TRANSHIPMENT N1", "T/S PORT OF LOADING", "TRANSHIPMENT PORT", "Transhipment" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
58
+ - 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.
59
+ - PORT OF TRANSHIPMENT N1 is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
60
+ - PORT OF TRANSHIPMENT N2 is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
54
61
  - 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.
55
- - Naming Convention: Look for Port Names followed by abbreviations in parentheses, e.g., "Port Name (ABCDE)".
62
+ - During the multi-leg, ETA of the first leg is the ETD of the second leg at the transhipment port.
63
+ - If Transhipment Date is empty therefore you may keep ETA of the first leg and ETD of the second leg as null if there is a transhipment.
64
+
65
+
66
+ Structure of Multiple Leg Sequence & Mapping
67
+ Leg 1 (Initial):
68
+ - `portOfLoading`: PLACE OF LOADING.
69
+ - `portOfDischarge`: PORT OF TRANSHIPMENT (if exists), otherwise PORT OF DISCHARGE or Destination.
70
+ - `vesselName`: VESSEL NAME (ignore parentheses).
71
+ - `etd`: EST. TIME OF DEPARTURE from PLACE OF LOADING.
72
+ - `eta`: Transhipment Date or ETA at TRANSHIPMENT (if exists), otherwise keep it null in case of multi-legs. Else, DISCHARGE Date for single leg.
73
+
74
+ Leg 2 (Intermediate): Trigger: Only if PORT OF TRANSHIPMENT N1 exists.
75
+ - `portOfLoading`: PORT OF TRANSHIPMENT or POD of Leg 1
76
+ - `portOfDischarge`: PORT OF TRANSHIPMENT N2 (if exists), otherwise PORT OF DISCHARGE.
77
+ - `vesselName`: CONNECTING VESSEL.
78
+ - `etd`: Transhipment Date or ETD at TRANSHIPMENT (if exists), otherwise keep it null in case of multi-legs. Sometimes, it can be same as ETA of Leg 1.
79
+ - `eta`: ETA at PORT OF TRANSHIPMENT N2 (if exists), otherwise DISCHARGE Date.
56
80
 
57
81
  <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 No.', 'Booking Ref.', 'Booking Reference', 'Booking ID', 'carrier's reference' or 'Order Ref'."
7
+ "description": "A unique identifier assigned to the shipment booking, used for tracking and reference. They are often referred to as 'Booking Number', 'Booking No.', or 'Booking 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 is mentioned as SVC-NBR"
13
13
  },
14
14
  "pickUpTerminalCode": {
15
15
  "type": "STRING",
@@ -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"
22
+ "description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It is mentioned as Delivery Terminal."
23
23
  },
24
24
  "serviceCode": {
25
25
  "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 with keys FCL delivery cut-off, CY CUT OFF, CY Closing."
42
+ "description": "The date by which the cargo to be delivered to the Container Yard. It can be found with keys Cargo 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 'Our Reference'."
47
+ "description": "A reference code for cargo entering the terminal to drop the loaded cargo for Export. It can be Turn-in reference or booking Number."
48
48
  },
49
49
  "mblNumber": {
50
50
  "type": "STRING",
@@ -59,12 +59,12 @@
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 with keys SI DEADLINE, SI DUE, SI CUT OFF, B/L INSTRUCTION DEADLINE."
62
+ "description": "The deadline date for submitting the Shipping Instructions (SI) to the carrier. It can be found with keys Closing Date B/L."
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 with keys VGM DEADLINE, VGM DUE, VGM CUT OFF."
67
+ "description": "The deadline date for submitting the Verified Gross Mass (VGM) to the carrier. It can be found with keys Closing Date VGM."
68
68
  },
69
69
  "containers": {
70
70
  "type": "ARRAY",
@@ -79,7 +79,7 @@
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. Key to find is 'Pick Up Depot'."
83
83
  },
84
84
  "dropOffDepotCode": {
85
85
  "type": "STRING",
@@ -117,22 +117,22 @@
117
117
  "portOfDischarge": {
118
118
  "type": "STRING",
119
119
  "nullable": true,
120
- "description": "The port where the goods are discharged from the vessel. This is the destination port for the shipment."
120
+ "description": "The port where the goods are discharged from the vessel. This is the destination port for the shipment. It is referred as Discharge"
121
121
  },
122
122
  "portOfLoading": {
123
123
  "type": "STRING",
124
124
  "nullable": true,
125
- "description": "The port where the goods are loaded onto the vessel. This is the origin port for the shipment."
125
+ "description": "The port where the goods are loaded onto the vessel. This is the origin port for the shipment. It is referred as Sailing"
126
126
  },
127
127
  "vesselName": {
128
128
  "type": "STRING",
129
129
  "nullable": true,
130
- "description": "The name of the vessel carrying the shipment. It can be found at vessel, INTENDED VESSEL/VOYAGE"
130
+ "description": "The name of the vessel carrying the shipment. It can be found at VESSEL/VOYAGE e,.g. 'MAERSK LINE"
131
131
  },
132
132
  "voyage": {
133
133
  "type": "STRING",
134
134
  "nullable": true,
135
- "description": "The journey or route taken by the vessel for a specific leg. It can be found at Voy. no, INTENDED VESSEL/VOYAGE"
135
+ "description": "The journey or route taken by the vessel for a specific leg. It can be found at VESSEL/VOYAGE e.g. '123W'"
136
136
  }
137
137
  }
138
138
  },
@@ -7,66 +7,54 @@ The Freight Forwarding company receives Booking Confirmation from Yangming Carri
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
- <CONTEXT>
11
-
12
10
 
13
- bookingNumber: A unique identifier for the booking.
14
- cyCutOff: The deadline for cargo to be delivered to the Container Yard.
15
- gateInReference: A reference code for cargo entering the terminal.
16
- gateInTerminal: The specific terminal where cargo is gated in.
17
- mblNumber: The Master Bill of Lading number.
18
- pickUpReference: A reference code for cargo pickup.
19
- pickUpTerminal: The specific terminal for cargo pickup.
20
- siCutOff: The deadline for submitting shipping instructions.
21
- vgmCutOff: The deadline for submitting the Verified Gross Mass of the cargo.
22
- transportLegs:
23
- eta: The estimated time of arrival for a specific leg.
24
- etd: The estimated time of departure for a specific leg.
25
- imoNumber: The International Maritime Organization number for a specific leg.
26
- portOfDischarge: The port where cargo is unloaded for a specific leg.
27
- portOfLoading: The port where cargo is loaded for a specific leg.
28
- vesselName: The name of the vessel for a specific leg.
29
- voyage: The journey or route taken by the vessel for a specific leg.
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>
30
15
 
31
- your task is to extract the text value of the following entities and page numbers starting from 0 where the value was found in the document:
32
- SCHEMA_PLACEHOLDER
16
+ <INSTRUCTIONS>
17
+ - Populate fields as defined in the response schema.
18
+ - Use the data field description to understand the context of the data.
33
19
 
34
- Keywords for datapoints:
35
- - bookingNumber: Our Reference
36
- - cyCutOff: FCL delivery cut-off
37
- - gateInReference: Our Reference
38
- - gateInTerminal: Export terminal delivery address
39
- - mblNumber: BL/SWB No(s).
40
- - pickUpReference: Export door positioning address(es)
41
- - siCutOff: shipping instruction closing
42
- - vgmCutOff: VGM cut-off
43
- - eta: eta, ETA
44
- - etd: etd, ETD
45
- - imoNumber: IMO No, IMO number
46
- - portOfDischarge: to
47
- - portOfLoading: from
48
- - vesselName: vessel
49
- - voyage: Voy. no
20
+ - gateInTerminalCode: The specific terminal where cargo is gated in. It is mentioned as Delivery Terminal. This sometimes can be the same as portOfLoading of the First transportLeg.
21
+ - cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be found at Cargo Cut Off or FCL delivery cut-off.
50
22
 
51
- Table Structure to extract TransporLegs:
52
- - transportlegs table has following colum names: From, To, By, ETD, ETA
53
- - If the first leg does not have a ETD and ETA, Also By column includes following info: ["Truck", "Combined Waterway"]; skip the row, start from one row below.
23
+ - transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
24
+ - eta: The estimated time of arrival for a specific leg.
25
+ - etd: The estimated time of departure for a specific leg. It can also be referred as ETS (Estimated Time of Sailing).
26
+ - imoNumber: The International Maritime Organization number for a specific leg.
27
+ - portOfDischarge: The port where cargo is unloaded for a specific leg.
28
+ - portOfLoading: The port where cargo is loaded for a specific leg.
29
+ - vesselName: The name of the vessel for a specific leg.
30
+ - voyage: The journey or route taken by the vessel for a specific leg.
54
31
 
55
- Further explanation for the transportLegs part as follows:
56
- - you must differentiate the Voyage from DP Voyage. Never used the value with the key 'DP Voyage'.
57
- - Vessel name is in 'By' column and under the key Vessel
32
+ IMPORTANT explanation for the transportLegs part as follows:
33
+ - There is at least one leg in each document.
58
34
  - 'eta' must be equal or later than 'etd'!
59
- - portOfLoading and portOfDischarge are name of the Ports. You can rely on the port names from all over the world.
60
- - portOfLoading and portOfDischarge distinctly denotes the name of the ports. If you find abbreviation of the port use it, if not you can use the full name of the port
61
- - Abbrevations most likely to be in the paranthesis like follows (DEHAM).
62
-
63
- Further explanation for datapoints except transportLegs part as follows:
64
- - If gateInReference is null, assign it the same value as bookingNumber.
65
- - If pickUpReference is null, assign it the same value as bookingNumber.
66
- - If mblNumber is null, assign it the same value as bookingNumber.
67
-
68
- You must apply the following rules:
69
- - The JSON schema must be followed during the extraction.
70
- - The values must only include text found in the document
71
- - Do not normalize any entity value.
72
- - Validate the JSON make sure its a valid JSON ! No extra text, no missing comma!
35
+ - Multiple legs are possible. When there are multiple legs,
36
+ - Sequential Sorting: You must manually re-order legs based on etd then eta, regardless of their order in the source text.
37
+ - "Transhipment" indicates the presence of a multi-leg journey.
38
+ - Transhipment Date is usually empty therefore you may keep ETA of the first leg and ETD of the second leg as null if there is a transhipment.
39
+ - Transhipment Handling: Treat any mentioned "Transhipment" as the bridge between two legs (Discharge for Leg A and Loading for Leg B).
40
+ - 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.
41
+ - First Transhipment is the Port of Discharge for the first transportLegs and Port of Loading for the second transportLegs.
42
+ - Second Transhipment is the Port of Discharge for the second transportLegs and Port of Loading for the third transportLegs.
43
+ - 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.
44
+
45
+
46
+ Structure of Multiple Leg Sequence & Mapping
47
+ Leg 1 (Initial):
48
+ - `portOfLoading`: Sailing.
49
+ - `portOfDischarge`: Transhipment (if exists), otherwise DISCHARGE.
50
+ - `etd`: Sailing Date ETS.
51
+ - `eta`: Transhipment Date (if exists), otherwise keep it null in case of multi-legs. Else, DISCHARGE Date for single leg.
52
+
53
+
54
+ Leg 2 (Intermediate): Trigger: Only if PORT OF TRANSHIPMENT exists.
55
+ - `portOfLoading`: portOfDischarge of Leg 1 (Transhipment).
56
+ - `portOfDischarge`: DISCHARGE.
57
+ - `etd`: Transhipment Date if exists else keep it null
58
+ - `eta`: DISCHARGE Date. Do not extract Destination Date here.
59
+
60
+ <INSTRUCTIONS>