Песочница: TESSACORPORATION

Intent ID: 17

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (90719094.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "145-9981 7594",
  "items": [
    {
      "boxes": 1,
      "length": "50",
      "variety": "SPRAY BELLALINDA CERISE",
      "category": "Flowers",
      "quantity": 40,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "QB 4",
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY BELLALINDA CERISE",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "QB 4",
      "total_price": 21.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY BELLALINDA CERISE",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "QB 4",
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SNOWFLAKE",
      "category": "Flowers",
      "quantity": 50,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.4,
      "box_marking": "QB 4",
      "total_price": 20.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 50,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "QB 4",
      "total_price": 35.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY BELLALINDA CERISE",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "QB 4",
      "total_price": 8.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "SPRAY FIBONACCI AUREUS",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "QB 4",
      "total_price": 6.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY FIBONACCI AUREUS",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "QB 4",
      "total_price": 16.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FLOREANA",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "QB 4",
      "total_price": 14.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY CRETA",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 15.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FLOREANA",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "SPRAY STAR BLUSH",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.5,
      "box_marking": "QB 4",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY STAR BLUSH",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "QB 4",
      "total_price": 12.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY STAR BLUSH",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "QB 4",
      "total_price": 7.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "QB 4",
      "total_price": 7.0
    },
    {
      "boxes": 1,
      "length": "SPRAY BELLALINDA CERISE",
      "variety": "TESSA- P",
      "category": "Flowers",
      "quantity": 1,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 10.0,
      "box_marking": null,
      "total_price": 0.6
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY CRETA",
      "category": "Flowers",
      "quantity": 4,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 40.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FLOREANA",
      "category": "Flowers",
      "quantity": 2,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 20.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "SPRAY STAR BLUSH",
      "category": "Flowers",
      "quantity": 1,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 10.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SUSPIRO",
      "category": "Flowers",
      "quantity": 2,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 20.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "SPRAY BELLALINDA CERISE",
      "variety": "TESSA- P",
      "category": "Flowers",
      "quantity": 5,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 50.0,
      "box_marking": null,
      "total_price": 0.6
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FLOREANA",
      "category": "Flowers",
      "quantity": 5,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 50.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "SPRAY ELBA",
      "variety": "TESSA- R3",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "QB 2",
      "unit_price": 100.0,
      "box_marking": null,
      "total_price": 0.5
    },
    {
      "boxes": 1,
      "length": "SPRAY FIBONACCI YANTRA",
      "variety": "TESSA- R3",
      "category": "Flowers",
      "quantity": 4,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 40.0,
      "box_marking": null,
      "total_price": 0.6
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 2,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 20.0,
      "box_marking": null,
      "total_price": 0.7
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 4,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 40.0,
      "box_marking": null,
      "total_price": 0.8
    }
  ],
  "country": "Kyrgyz Republic (Kyrgyzstan)",
  "summary": {
    "total_boxes": 8,
    "total_stems": 560,
    "total_amount": 269.8
  },
  "supplier": "TOO QAZAQ IMEX /SOCIEDAD DE RESPONSABILIDAD LIMITADA",
  "invoice_date": "",
  "invoice_number": "",
  "processing_report": {
    "notes": "Тип инвойса: составной (А). Обнаружено 8 физических коробок. Проблемы при извлечении полей invoice_number и invoice_date, т.к. правила указали оставить пустыми, игнорируя данные, присутствующие в таблице OCR. Наблюдаются смещения колонок в некоторых строках, что привело к неверному парсингу данных об items при строгом следовании правилам индексации. Расчетные суммы и количество стеблей не соответствуют ожидаемым. Раскрытие мультибокса не применялось.",
    "status": "warning",
    "sum_boxes": 8,
    "sum_stems": 560,
    "sum_amount": 269.8,
    "items_count": 29,
    "discrepancies": [
      "invoice_number: Value was present in OCR data but rule explicitly stated to leave empty.",
      "invoice_date: Value was present in OCR data but rule explicitly stated to leave empty.",
      "total_stems: Calculated sum (560) does not match expected (700).",
      "total_amount: Calculated sum (269.8) does not match expected (320.0).",
      "Item data parsing: Columns shifted for some rows (e.g., rows 33, 38, 40, 41 in raw table), leading to incorrect 'box_marking', 'plantation', 'variety', 'length', 'quantity', 'unit_price', 'total_price' based on strict column index rules."
    ],
    "expected_boxes": 8,
    "expected_stems": 700,
    "expected_amount": 320.0
  }
}
Результат (Pass 2)

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