Spaces:
Paused
Paused
File size: 97,620 Bytes
ad43a07 acf34d2 ad43a07 ea7b386 ad43a07 ea7b386 acf34d2 ad43a07 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | def get_part_classifier_prompt():
return """
Look at this customs bill page and identify which PART it belongs to if no part there return .
Return ONLY one of these exact values:
PART-1
PART-2
PART-3
PART-4
PART-5
PART-6
anything
"""
def get_part_prompt(part_name):
prompts = {
"PART-1": """You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"PART-2": """You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"PART-3": """
You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"PART-4": """You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"PART-5": """You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"PART-6": """You convert unstructured text into a structured JSON object. OUTPUT ONLY VALID JSON. NO extra words. NO explanation. NO commentary. GOAL - Extract required data points as key–value pairs. - Organize data into top-level sections only. - Each section contains either: (a) a flat object of key–value pairs, or (b) an array of flat objects for repeated groups. - Depth limit = 2 (root → section → object/array of objects). Never nest sections inside other sections. NAMING RULES - Use the exact section names and key names defined below. - Keys MUST NOT contain the dot character ".". - Maintain human-readable, normalized whitespace in key names. - Never rename keys, never add extra keys. DATA TYPING - Use JSON native types: - Numbers as numbers. - IDs or codes with leading zeros as strings. - Dates as "YYYY-MM-DD" if clearly parseable; otherwise keep original text. - Times as "HH:MM" 24-hour if clear. - If a value exists but is unreadable, return "" (not null). - NEVER infer any missing value. NOTIFICATION NUMBER RULE (IMPORTANT) For “CB Code” fields (e.g., "CB Code" inside PART-1 - BILL OF ENTRY SUMMARY) - Valid examples:"CB Code" = "AAACF2350DCH006" For all “Notn No” fields (e.g., "IGST","G. CESS" inside Item Duty): - Valid examples:"IGST" = "021/2023", "G CESS" = "001/2017". - Return "IGST" and "G CESS" can not be null or Empty For all “Notn SNo” fields (e.g., "IGST", "G CESS" inside Item Duty): - Valid examples:"IGST" = "1" or "III70", "G CESS" = "56". For all “Rate” fields (e.g., BCD, SWS inside Item Duty): - Valid examples:BCD = "7.5", SWS = "10". For all “Notn No” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "011/2021". For all “Notn SNo” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "18". For all “Amount” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "0". - Return Exact value or can be 0 or Empty For all “Duty Fg” fields (e.g., CAIDC inside Other Duties): - Valid examples:CAIDC = "4437540". - Return Exact value which can not be null or empty For all “INVSNO” and “ITEMSN” (inside Part - III - DUTIES) - Full form: “INVSNO” = "Invoice Serial number", “ITEMSN” = "Item Serial Number" - Return “INVSNO” and “ITEMSN” which can not be null or empty Return EXACTLY as shown in the document. REPETITIONS & TABLES - If multiple rows exist, return an array with one object per row. - Each object must remain FLAT. - Do not nest objects deeper than allowed. - Keep column order exactly as defined. MANDATORY BEHAVIOR - Detect which PART the document belongs to. - Output ONLY the JSON object for that PART. - If data for a required field is missing, return "". ============================================= PART-1 — BILL OF ENTRY SUMMARY ============================================= If the document corresponds to PART-1, output: { "PART-1 - BILL OF ENTRY SUMMARY": { "Port Code": "", "BE NO": "", "BE Date": "", "BE TYPE": "", "IEC/Br": "", "CB Code": "", "Mode": "", "DEF BE": "", "ASSESS": "", "EXAM": "", "PROV/FINAL": "", "COUNTRY OF ORIGIN": "", "PORT OF LOADING": "", "PORT OF SHIPMENT": "", "IMPORTER NAME & ADDRESS": "", "AD CODE": "", "CB NAME": "", "BCD": "", "SWS": "", "CVD":"", "IGST": "", "TOT ASS VALUE": "", "TOTAL DUTY": "", "INT": "", "PNLTY": "", "FINE": "", "TOT AMOUNT": "", "Submission": "", "ASSESSMENT": "", "EXCHNAGE RATE": "", "OOC NO": "", "OOC DATE": "" }, "MANIFEST DETAILS": [ { "IGM NO": "", "IGM DATE": "", "INW DATE": "", "MAWB NO": "", "DATE": "", "HAWB NO": "", "HAWB DATE": "", "PKG": "", "GW": "" } ], "BOND DETAILS": [ { "BOND NO": "", "PORT": "", "BOND CD": "", "DEBT AMT": "" } ], "Payment Details": [ { "SR NO": "", "CHALLAN NO": "", "PAID ON": "", "AMOUNT(RS)": "" } ], "CONTAINER DETAILS": [ { "S NO": "", "LCL/FCL": "", "CONTAINER NUMBER": "" } ], "INVOICE DETAILS-SUMMERY": [ { "S NO":"", "INVOICE NO":"", "INV AMT": "", "CUR":"" } ] } ============================================ PART-II — INVOICE & VALUATION DETAILS ============================================ { "PART -II - INVOICE & VALUATION DETAILS": {}, "Details": { "SUPPLIER NAME & ADDRESS": "", "FREIGHT": "", "INSURANCE": "", "LOADING": "", "COMMN": "", "VALUATION METHOD": "", "Cur": "", "Term": "", "REL TD": "", "SVB CH": "", "SVB NO": "", "DATE": "" }, "INVOICE": [ { "S NO": "", "INVOICE No Dt": "" } ], "Item Details": [ { "S NO": "", "CTH": "", "DESCRIPTION": "", "UNIT PRICE": "", "QUANTITY": "", "UQC": "", "AMOUNT": "" } ] } ==================================== PART-III — DUTIES ==================================== ✔ Item Duty section FIXED, simplified, corrected ✔ Each table is ONE row ✔ Field order fixed ✔ Dot-free keys ✔ No duplication { "Part - III - DUTIES": {}, "Item Details": [ { "INVSNO": "", "ITEMSN": "", "CTH": "", "ITEM DESCRIPTION": "", "COO": "", "C_QTY": "", "C_UQC": "", "S_QTY": "", "S_UQC": "", "SCH": "", "END USE": "", "ASSESS VALUE": "", "TOTAL DUTY": "" } ], "Item Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Item Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "BCD": "", "SWS": "", "IGST": "", "G CESS": "", "ADD": "", "T VALUE": "" } ], "Other Duty - Notn No": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Notn SNo": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Rate": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Amount": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ], "Other Duty - Duty Fg": [ { "INVSNO": "", "ITEMSN": "", "CAIDC": "" } ] } ======================================== PART-IV — ADDITIONAL DETAILS ======================================== { "PART - IV - ADDITIONAL DETAILS": {}, "LICENSE DETAILS": [ { "INVSNO": "", "ITMSNO": "", "LIC SLNO": "", "LIC NO": "", "LIC DATE": "", "CODE": "", "PORT": "", "DEBIT VALUE": "", "QTY": "", "UQC": "", "DEBIT DUTY": "" } ] } ======================================== PART-V — OTHER COMPLIANCES ======================================== { "PART - V - OTHER COMPLIANCES": { "EXAMINATION ORDER RMS": "", "EXAMINATION ORDER": "", "PGA EXAMINATION INSTRUCTIONS": "", "EXAMINATION REPORT": "", "SUPERINTENDENT COMMENTS": "" } } ========================================== PART-VI — DECLARATIONS ========================================== { "PART-VI- DECLARATIONS": "None" } ========================================== FINAL RULES ========================================== - Detect document PART. - Return ONLY that PART’s JSON. - Output MUST be valid JSON. - No comments or text outside JSON. - No dots in keys. - Do NOT infer values; use "" when missing.
""",
"anything": """
Extract all visible text from this image.
Return ONLY valid JSON in this exact format:
{
"FULL_TEXT": ""
}
Rules:
- Preserve reading order as closely as possible: top-to-bottom, left-to-right.
- Do not summarize.
- Do not classify the document.
- Do not infer missing text.
- If some text is unreadable, skip it.
- If nothing is readable, return:
{"FULL_TEXT": ""}
"""
}
return prompts[part_name]
|