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

Intent ID: 19

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (FACT EXPORTACION 0256325 TDA - OOO TRADE HOUSE AZALIA H 16_19_07.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "",
  "items": [
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "CANDY X-PRESSION",
      "quantity": 0,
      "box_number": "HB1",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "COUNTRY BLUES",
      "quantity": 0,
      "box_number": "HB2",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "ESPERANCE",
      "quantity": 0,
      "box_number": "HB3",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "EXPLORER",
      "quantity": 0,
      "box_number": "HB4",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "FULL MONTY",
      "quantity": 0,
      "box_number": "HB5",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "HOT SPOT",
      "quantity": 0,
      "box_number": "HB6",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "PINK MONDIAL",
      "quantity": 0,
      "box_number": "HB7",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "1",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB8",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB9",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "LIMONADE",
      "quantity": 0,
      "box_number": "HB10",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "MAGIC TIMES",
      "quantity": 0,
      "box_number": "HB11",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "2",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "MAGIC TIMES",
      "quantity": 0,
      "box_number": "HB12",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "CONFIDENTIAL",
      "quantity": 0,
      "box_number": "HB13",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "CONFIDENTIAL",
      "quantity": 0,
      "box_number": "HB14",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "CONFIDENTIAL",
      "quantity": 0,
      "box_number": "HB15",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    },
    {
      "boxes": 1,
      "length": "X",
      "variety": "25",
      "category": "PINK FLOYD",
      "quantity": 0,
      "box_number": "HB16",
      "plantation": "HB",
      "unit_price": null,
      "box_marking": "3",
      "total_price": null
    }
  ],
  "country": "",
  "summary": {
    "total_boxes": 16,
    "total_stems": 0,
    "total_amount": 0.0
  },
  "supplier": "",
  "invoice_date": "",
  "invoice_number": "",
  "processing_report": {
    "notes": "Тип инвойса: плоский. Обнаружено 16 физических коробок. Возникли проблемы при извлечении данных из-за несоответствия фактической структуры таблицы OCR жестко заданным в правилах индексам колонок. Это привело к некорректному маппингу числовых полей (количество, цена) и, как следствие, неверным суммарным значениям. Раскрытие мультибокса не применялось.",
    "status": "error",
    "sum_boxes": 16,
    "sum_stems": 0,
    "sum_amount": 0.0,
    "items_count": 16,
    "discrepancies": [
      "invoice_number could not be extracted (empty in metadata/notes).",
      "invoice_date could not be extracted (empty in metadata/notes).",
      "supplier could not be extracted (empty in metadata/notes).",
      "country could not be extracted (empty in metadata/notes).",
      "awb could not be extracted (empty in metadata/notes).",
      "Item 1 (box HB1): quantity (0) is not an integer or invalid.",
      "Item 1 (box HB1): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 2 (box HB2): quantity (0) is not an integer or invalid.",
      "Item 2 (box HB2): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 3 (box HB3): quantity (0) is not an integer or invalid.",
      "Item 3 (box HB3): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 4 (box HB4): quantity (0) is not an integer or invalid.",
      "Item 4 (box HB4): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 5 (box HB5): quantity (0) is not an integer or invalid.",
      "Item 5 (box HB5): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 6 (box HB6): quantity (0) is not an integer or invalid.",
      "Item 6 (box HB6): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 7 (box HB7): quantity (0) is not an integer or invalid.",
      "Item 7 (box HB7): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 8 (box HB8): quantity (0) is not an integer or invalid.",
      "Item 8 (box HB8): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 9 (box HB9): quantity (0) is not an integer or invalid.",
      "Item 9 (box HB9): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 10 (box HB10): quantity (0) is not an integer or invalid.",
      "Item 10 (box HB10): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 11 (box HB11): quantity (0) is not an integer or invalid.",
      "Item 11 (box HB11): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 12 (box HB12): quantity (0) is not an integer or invalid.",
      "Item 12 (box HB12): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 13 (box HB13): quantity (0) is not an integer or invalid.",
      "Item 13 (box HB13): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 14 (box HB14): quantity (0) is not an integer or invalid.",
      "Item 14 (box HB14): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 15 (box HB15): quantity (0) is not an integer or invalid.",
      "Item 15 (box HB15): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid.",
      "Item 16 (box HB16): quantity (0) is not an integer or invalid.",
      "Item 16 (box HB16): unit_price (null) is out of reasonable range ($0.20–$5.00) or invalid."
    ],
    "expected_boxes": null,
    "expected_stems": null,
    "expected_amount": null
  }
}
Результат (Pass 2)

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