Песочница: LESIA KORZ / LAILA FLOWERS

Intent ID: 36

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (Factura Exportacion Laila 00013152 TDA. - OOO TRADEHOUSE AZALIA H 13_20_51.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": "25X",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 350,
      "box_number": "1",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 122.5
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK X-PRESSION",
      "category": null,
      "quantity": 50,
      "box_number": "1",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 17.5
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK X-PRESSION",
      "category": null,
      "quantity": 50,
      "box_number": "1",
      "plantation": null,
      "unit_price": 0.45,
      "box_marking": "HB",
      "total_price": 22.5
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 50,
      "box_number": "2",
      "plantation": null,
      "unit_price": 0.45,
      "box_marking": "HB",
      "total_price": 22.5
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "FULLMONTY",
      "category": null,
      "quantity": 25,
      "box_number": "2",
      "plantation": null,
      "unit_price": 0.4,
      "box_marking": "HB",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "NINA",
      "category": null,
      "quantity": 100,
      "box_number": "2",
      "plantation": null,
      "unit_price": 0.28,
      "box_marking": "HB",
      "total_price": 28.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "NINA",
      "category": null,
      "quantity": 125,
      "box_number": "2",
      "plantation": null,
      "unit_price": 0.32,
      "box_marking": "HB",
      "total_price": 40.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK FLOYD",
      "category": null,
      "quantity": 25,
      "box_number": "3",
      "plantation": null,
      "unit_price": 0.4,
      "box_marking": "HB",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK FLOYD",
      "category": null,
      "quantity": 300,
      "box_number": "3",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 105.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK MONDIAL",
      "category": null,
      "quantity": 25,
      "box_number": "3",
      "plantation": null,
      "unit_price": 0.4,
      "box_marking": "HB",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "25X",
      "variety": "PINK MONDIAL",
      "category": null,
      "quantity": 1150,
      "box_number": "3",
      "plantation": null,
      "unit_price": 0.4,
      "box_marking": "HB",
      "total_price": 460.0
    }
  ],
  "country": "Ecuador",
  "summary": {
    "total_boxes": 11,
    "total_stems": 2250,
    "total_amount": 848.0
  },
  "supplier": "LOMCER S.C",
  "invoice_date": "04/04/2026",
  "invoice_number": "00013152",
  "processing_report": {
    "notes": "Тип инвойса: плоский (каждая строка - отдельная позиция/коробка). Обнаружено 11 физических коробок. Колонки извлечены семантически, так как правила трансформации колонок по индексу не совпадают с фактическими данными OCR. Значения 'total_price' в некоторых строках OCR были скорректированы, основываясь на расчете 'quantity' * 'unit_price', так как предоставленные 'total_price' в OCR не соответствовали.",
    "status": "warning",
    "sum_boxes": 11,
    "sum_stems": 2250,
    "sum_amount": 848.0,
    "items_count": 11,
    "discrepancies": [
      "Calculated total_stems (2250) differs significantly from expected_stems (1150).",
      "Calculated total_amount (848.00) differs significantly from expected_amount (417.25).",
      "Some 'total_price' values were recalculated due to discrepancies with 'quantity' * 'unit_price' in OCR."
    ],
    "expected_boxes": null,
    "expected_stems": 1150,
    "expected_amount": 417.25
  }
}
Результат (Pass 2)

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