Песочница: Rosas Del Corazon

Intent ID: 37

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (F_TDA_2230522.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": null,
      "length": null,
      "variety": null,
      "category": null,
      "quantity": null,
      "box_number": "1",
      "plantation": null,
      "unit_price": null,
      "box_marking": null,
      "total_price": null
    }
  ],
  "country": null,
  "summary": {
    "total_boxes": 0.13,
    "total_stems": null,
    "total_amount": null
  },
  "supplier": "DATE",
  "invoice_date": "19/03/2026",
  "invoice_number": null,
  "processing_report": {
    "notes": "Invoice type: flat. 1 physical box equivalent found (from summary). Encountered significant issues during extraction due to mismatch between provided column indices in rules and actual OCR table structure. No multibox unpacking was applied.",
    "status": "warning",
    "sum_boxes": null,
    "sum_stems": null,
    "sum_amount": null,
    "items_count": 1,
    "discrepancies": [
      "invoice_number not found based on rule 'PACKINGLISTNo'.",
      "supplier country not found based on rule 'following PHONE: in supplier header'.",
      "AWB number not found based on rule 'HAWB substring in MAWB# line'.",
      "Item '1': boxes (колонка 20) not found, value set to null.",
      "Item '1': plantation (колонка 9) not found, value set to null.",
      "Item '1': variety (колонка 15) not found, value set to null.",
      "Item '1': quantity (колонка 23) not found, value set to null.",
      "Calculated total_stems is null because no item quantities were extracted.",
      "Calculated sum of items[].boxes is null, cannot match with summary.total_boxes (0.13)."
    ],
    "expected_boxes": 0.13,
    "expected_stems": null,
    "expected_amount": null
  }
}
Результат (Pass 2)
Report: warning
items=2, boxes=2/0.75, stems=384/384, amount=None/None
discrepancies: Country extraction rule ambiguity: 'Взять строку, следующую за строкой с 'PHONE:' в шапке поставщика, и извлечь последнее слово' resulted in a non-country value. Field set to null.; Sum of items boxes (100) does not match summary.total_boxes (0.75).
notes: Плоский инвойс. Обнаружено 100 физических коробок (сумма items[].boxes). Значение summary.total_boxes (0.75) не совпадает с суммой items[].boxes (100). Проблема с извлечением страны по указанному правилу. Раскрытие мультибокса не применялось.
{
  "awb": "PC602018136",
  "items": [
    {
      "boxes": 50,
      "length": null,
      "variety": "PINKPIANO",
      "category": null,
      "quantity": 96,
      "box_number": "1",
      "plantation": "TDA",
      "unit_price": null,
      "box_marking": null,
      "total_price": null
    },
    {
      "boxes": 50,
      "length": null,
      "variety": "NOTTINGHILL",
      "category": null,
      "quantity": 288,
      "box_number": "2",
      "plantation": "TDA",
      "unit_price": null,
      "box_marking": null,
      "total_price": null
    }
  ],
  "country": null,
  "summary": {
    "total_boxes": 0.75,
    "total_stems": 384,
    "total_amount": null
  },
  "supplier": "ROSASDELCORAZONROSASLESANDICIALTDA",
  "invoice_date": "16/02/2026",
  "invoice_number": "2226936",
  "processing_report": {
    "notes": "Плоский инвойс. Обнаружено 100 физических коробок (сумма items[].boxes). Значение summary.total_boxes (0.75) не совпадает с суммой items[].boxes (100). Проблема с извлечением страны по указанному правилу. Раскрытие мультибокса не применялось.",
    "status": "warning",
    "sum_boxes": 2,
    "sum_stems": 384,
    "sum_amount": null,
    "items_count": 2,
    "discrepancies": [
      "Country extraction rule ambiguity: 'Взять строку, следующую за строкой с 'PHONE:' в шапке поставщика, и извлечь последнее слово' resulted in a non-country value. Field set to null.",
      "Sum of items boxes (100) does not match summary.total_boxes (0.75)."
    ],
    "expected_boxes": 0.75,
    "expected_stems": 384,
    "expected_amount": null
  }
}
История (последние 20)
ID Файл Дата
22 P_TDA_2226936.pdf 2026-02-23 17:02:17.969283+00:00 Excel