Песочница: TESSACORPORATION

Intent ID: 17

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (90727966.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "145-9981 7653",
  "items": [
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY FIBONACCI AUREUS",
      "category": "Flowers",
      "quantity": 50,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "HB",
      "total_price": 40.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 50,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "HB",
      "total_price": 40.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY BELLALINDA CERISE",
      "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": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "QB 4",
      "total_price": 6.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY ELBA",
      "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": "60",
      "variety": "SPRAY FLOREANA",
      "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": "60",
      "variety": "SPRAY SUSPIRO",
      "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": "60",
      "variety": "SPRAY BELLALINDA CERISE",
      "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": 10,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "QB 4",
      "total_price": 6.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY ELBA",
      "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": "60",
      "variety": "SPRAY FLOREANA",
      "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": "60",
      "variety": "SPRAY SUSPIRO",
      "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": "50",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.6,
      "box_marking": "HB",
      "total_price": 18.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.7,
      "box_marking": "HB",
      "total_price": 21.0
    },
    {
      "boxes": 1,
      "length": "70",
      "variety": "SPRAY FIBONACCI YANTRA",
      "category": "Flowers",
      "quantity": 40,
      "box_number": "1",
      "plantation": "TESSA- P",
      "unit_price": 0.8,
      "box_marking": "HB",
      "total_price": 32.0
    },
    {
      "boxes": 1,
      "length": "SPRAY ELBA",
      "variety": "R3",
      "category": "Flowers",
      "quantity": 3,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 30.0,
      "box_marking": "",
      "total_price": 0.6
    },
    {
      "boxes": 1,
      "length": "SPRAY FIBONACCI AUREUS",
      "variety": "",
      "category": "Flowers",
      "quantity": 1,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 10.0,
      "box_marking": "",
      "total_price": 0.7
    },
    {
      "boxes": 1,
      "length": "SPRAY FIBONACCI GIOCONDA",
      "variety": "",
      "category": "Flowers",
      "quantity": 2,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 20.0,
      "box_marking": "",
      "total_price": 0.7
    },
    {
      "boxes": 1,
      "length": "SPRAY WEDDING ROSEVER",
      "variety": "",
      "category": "Flowers",
      "quantity": 1,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 10.0,
      "box_marking": "",
      "total_price": 0.7
    },
    {
      "boxes": 1,
      "length": "SPRAY WINK ALLURE",
      "variety": "",
      "category": "Flowers",
      "quantity": 3,
      "box_number": "1",
      "plantation": "QB 4",
      "unit_price": 30.0,
      "box_marking": "",
      "total_price": 0.7
    }
  ],
  "country": "Kyrgyz Republic (Kyrgyzstan)",
  "summary": {
    "total_boxes": 5,
    "total_stems": 500,
    "total_amount": 340.0
  },
  "supplier": "TOO QAZAQ IMEX /SOCIEDAD DE RESPONSABILIDAD LIMITADA",
  "invoice_date": "",
  "invoice_number": "",
  "processing_report": {
    "notes": "Тип инвойса: составной (А). Обнаружено 5 физических коробок. Присутствуют проблемы с выравниванием колонок в строках-деталях для коробки с заказом 911048638, что привело к нелогичным значениям 'length', 'variety', 'quantity', 'unit_price' и 'total_price'. Раскрытие мультибокса не применялось. Значения из раздела 'TOTALS' в OCR ('Boxes': 5, 'Stems': 500, 'Total': $340.00) использованы для 'summary' и 'expected_boxes', но они не соответствуют ожидаемым по правилу значениям (700 stems, $320.00 total).",
    "status": "warning",
    "sum_boxes": 5,
    "sum_stems": 500,
    "sum_amount": 340.0,
    "items_count": 22,
    "discrepancies": [
      "Сумма quantity (500) не соответствует ожидаемой по правилу (700).",
      "Сумма total_price (340.0) не соответствует ожидаемой по правилу (320.0).",
      "Обнаружено нелогичное соотношение 'quantity', 'unit_price' и 'total_price' для item с box_number '1' и plantation 'QB 4' (из-за смещения колонок в OCR): quantity=3, unit_price=30.0, total_price=0.6. Это может указывать на ошибку в исходных данных или правилах извлечения.",
      "Для нескольких item с box_number '1' и plantation 'QB 4' поле 'variety' пустое, а 'length' содержит название сорта, что указывает на смещение колонок в OCR-данных.",
      "Поле 'invoice_number' в OCR-данных содержит значение '90727966', но согласно правилу трансформации оставлено пустым.",
      "Поле 'invoice_date' в OCR-данных содержит значение '03/18/2026', но согласно правилу трансформации оставлено пустым."
    ],
    "expected_boxes": 5,
    "expected_stems": 700,
    "expected_amount": 320.0
  }
}
Результат (Pass 2)

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