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

Intent ID: 37

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (F_TDA_2229687.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "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": 0,
    "total_amount": null
  },
  "supplier": null,
  "invoice_date": "12/03/2026",
  "invoice_number": null,
  "processing_report": {
    "notes": "Тип инвойса: плоский (Б). Обнаружено 1 физических коробок. Были значительные проблемы при извлечении данных из-за несоответствия указанных индексов колонок в правилах реальной структуре OCR-таблицы, а также неполноты или неоднозначности других правил. Раскрытие мультибокса не применялось.",
    "status": "error",
    "sum_boxes": 1,
    "sum_stems": 0,
    "sum_amount": 0,
    "items_count": 1,
    "discrepancies": [
      "invoice_number: 'PACKINGLISTNo' not found in data for extraction rule.",
      "supplier: Rule 'взять значение из первой строки таблицы (индекс 0, колонка 0)' yields 'DATE', which is not a supplier name. No other rule for supplier found.",
      "country: Extraction rule for country not met due to missing 'PHONE:' in supplier header or specific address structure.",
      "awb: Substring 'HAWB' not found in the same line as 'MAWB#' as per rule, so AWB could not be extracted.",
      "Item 1: 'plantation' (Колонка 9) could not be extracted as column index 9 is out of bounds for the raw data row.",
      "Item 1: 'variety' (Колонка 15) could not be extracted as column index 15 is out of bounds for the raw data row.",
      "Item 1: 'quantity' (Колонка 23) could not be extracted as column index 23 is out of bounds for the raw data row.",
      "sum(items[].quantity) is 0, which is not an integer. This is due to 'quantity' being null for all items.",
      "sum(items[].boxes) (1) does not match 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