Information Extraction from Electricity Invoices with General-Purpose Large Language Models
Centro de Tecnologías de la Imagen (CTIM)(图像技术中心);Instituto Universitario de Cibernética, Empresas y Sociedad (IUCES)(大学网络研究所、企业与社会);University of Las Palmas de Gran Canaria(大加那利岛大学)
Information extraction from semi-structured business documents remains a critical challenge for enterprise management. This study evaluates the capability of general-purpose Large Language Models to extract structured information from Spanish electricity invoices without task-specific fine-tuning. Using a subset of the IDSEM dataset, we benchmark two architecturally distinct models, Gemini 1.5 Pro and Mistral-small, across 19 parameter configurations and 6 prompting strategies. Our experimental framework treats prompt engineering as the primary experimental variable, comparing zero-shot baselines against increasingly sophisticated few-shot approaches and iterative extraction strategies. Results demonstrate that prompt quality dominates over hyperparameter tuning: the F1-score variation across all parameter configurations is marginal, while the gap between zero-shot and the best few-shot strategy exceeds 19 percentage points. The best configuration (few-shot with cross-validation) achieves an F1-score of 97.61% for Gemini and 96.11% for Mistral-small, with document template structure emerging as the primary determinant of extraction difficulty. These findings establish that prompt design is the critical lever for maximizing extraction fidelity in LLM-based document processing, thereby providing an empirical framework for integrating general-purpose LLMs into business document automation.
RDU: A Region-based Approach to Form-style Document Understanding
National University of Singapore(新加坡国立大学);Estates Pte Ltd(6Estates私人有限公司);Sichuan University(四川大学)
关键信息提取(Key Information Extraction,KIE)是从表单格式的文档(如发票)中提取结构化信息(如键值对)的技术,是实现文档理解智能化的重要一步。以往的KIE算法一般采用序列标记的方法,难以处理非扁平化序列,尤其是表格-文本混合文档。这些方法还存在为每种类型的文档预先定义固定的标签集的麻烦,以及标签不平衡的问题。在这项工作中,我们假设光学字符识别(OCR)已被应用到输入文件,并重新制定的KIE任务作为一个区域预测问题,在二维(2D)空间给定的目标字段。在这种新的设置,我们开发了一个新的KIE模型命名为基于区域的文档理解(RDU),作为输入的文本内容和相应的坐标的文件,并试图预测的结果,通过本地化的边界框样区域。我们的RDU首先应用一个布局感知BERT配备了一个软布局注意掩蔽和偏见机制,将布局信息的表示。然后,候选区域的列表通过区域提议模块从表示中生成,该区域提议模块受到广泛应用于目标检测的计算机视觉模型的启发。最后,区域分类模块和区域选择模块分别用于判断所提出的区域是否有效,并从所有区域中选择概率最大的区域。在四种表单风格的文档上的实验表明,我们提出的方法可以取得令人印象深刻的结果。此外,我们的RDU模型可以无缝地使用不同的文档类型进行训练,这对低资源文档特别有用。