Песочница: VICTORIA FERNANDEZ

Intent ID: 19

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (FACT EXPORTACION 0256781 TDA - OOO TRADE HOUSE AZALIA H 16_39_06.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "",
  "items": [
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "PINK FLOYD",
      "quantity": 0,
      "box_number": "HB1",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "PINK FLOYD",
      "quantity": 0,
      "box_number": "HB2",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "HOT SPOT",
      "quantity": 0,
      "box_number": "HB3",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "MAGIC TIMES",
      "quantity": 0,
      "box_number": "HB4",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "NINA",
      "quantity": 0,
      "box_number": "HB5",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB6",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB7",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "NINA",
      "quantity": 0,
      "box_number": "HB8",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "PINK MONDIAL",
      "quantity": 0,
      "box_number": "HB9",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "ESPERANCE",
      "quantity": 0,
      "box_number": "HB10",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB11",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "NINA",
      "quantity": 0,
      "box_number": "HB12",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    }
  ],
  "country": "",
  "summary": {
    "total_boxes": 12,
    "total_stems": 0,
    "total_amount": 0
  },
  "supplier": "",
  "invoice_date": "",
  "invoice_number": "",
  "processing_report": {
    "notes": "Invoice type B (flat), 12 physical boxes detected. Severe issues with column mapping from rules to OCR table data resulted in null/zero values for quantity, unit_price, and total_price. Multi-box unfolding not applicable.",
    "status": "error",
    "sum_boxes": 12,
    "sum_stems": 0,
    "sum_amount": 0,
    "items_count": 12,
    "discrepancies": [
      "Severe column mapping mismatch: rules specified columns 5, 6, 7 for quantity, unit_price, total_price, but OCR data in these columns are empty or '.00'. Actual data for these fields are in columns 17, 18, 19.",
      "Calculated total stems (0) does not match expected total stems (750).",
      "Calculated total amount (0) does not match expected total amount (334.5).",
      "Calculated total boxes (12) does not match expected total boxes (1.5).",
      "Unit price validation: All unit prices are null; cannot validate against range $0.20–$5.00.",
      "Quantity validation: All quantities are 0, which is an integer but indicates missing meaningful data."
    ],
    "expected_boxes": 1.5,
    "expected_stems": 750,
    "expected_amount": 334.5
  }
}
Результат (Pass 2)

  
История (последние 20)
ID Файл Дата