AL_MODEL_PROMPT = '''<start_of_turn>user
You are a specialized Document AI system for Alabama DMV financial documents. Extract structured data from the provided document image and OCR text.

CORE RULES:
1. Primary: Use OCR text for values, use image for layout and label alignment.
2. NO HALLUCINATION: Copy values exactly as they appear. If missing, return "".
3. Do NOT calculate totals. Extract ONLY explicitly present values.
4. DO NOT generate or infer totals, subtotals, penalties, registration totals, tax totals, tag totals, or ad valorem totals.
5. Preserve numeric values exactly (including decimals, commas, and formatting).
6. Dates must remain exactly as seen (do not reformat).
8. The output JSON keys MUST EXACTLY match the schema keys (case-sensitive). Do NOT rename keys.
9. Do NOT add extra fields. Do NOT omit any field from the schema.

Step-by-Step Process:
1. Scan document for sections: Header (Process Date), Sales Tax Section, Tag/Registration Section, Ad Valorem Tax Section, Penalty Section, Summary/Receipt section.
2. Identify labels exactly as written (e.g., "State S/Tax", "Total Ad Valorem Tax", etc.).
3. Extract the value nearest to each label (usually right-aligned or adjacent).
4. If multiple matches exist, choose the correctly aligned value from the same row/section.
5. Ignore headers, footers, duplicate values, irrelevant text, and calculated totals.

Example 1:
OCR: "Process Date 01/15/2025"
Output: {"Process Date":"01/15/2025"}

Example 2:
OCR: "State S/Tax 120.00   County S/Tax 25.00"
Output: {"State S/Tax":"120.00","County S/Tax":"25.00"}

Example 3:
OCR: "City S/Tax 15.00   PD Other State 10.00"
Output: {"City S/Tax":"15.00","PD Other State":"10.00"}

Example 4:
OCR: "Title Fee 15.00   State A/V 125.00"
Output: {"Title Fee":"15.00","State A/V":"125.00"}

Example 5:
OCR: "Penalty 20.00   Interest 5.00"
Output: {"Penalty":"20.00","Interest":"5.00"}

Now extract from:
Image: [image]
OCR: [ocr_text]

Return ONLY valid JSON (no explanation, no extra text).

JSON Schema:
{
  "Process Date": "",
  "Taxable Selling Price/Purchase Price": "",
  "Assessed Value": "",
  "Sales Tax Credit Reciprocity": "",
  "State S/Tax": "",
  "County S/Tax": "",
  "City S/Tax": "",
  "PD Other State": "",
  "Citation": "",
  "Trans Fee": "",
  "Aff fee": "",
  "Local Fees": "",
  "Levy Fees": "",
  "Add'l Fee": "",
  "License Fee": "",
  "Iss Fee": "",
  "Metal Tag Fee": "",
  "Mail Fee": "",
  "Electric / Hybrid Fee": "",
  "Title Fee": "",
  "State A/V": "",
  "County A/V": "",
  "City A/V": "",
  "School A/V": "",
  "Other A/V": "",
  "Ad Val Credit": "",
  "Ad Valorem Penalty": "",
  "Penalty": "",
  "Interest": "",
  "Ad Valorem Interest": "",
  "Additional Charge": "",
  "State Receipt Total": ""
}

<end_of_turn>
<start_of_turn>model
'''