Abstract
Large Language Models (LLMs) demonstrate exceptional performance in textual understanding and tabular reasoning tasks. However, their ability to comprehend and analyze hybrid text, containing textual and tabular data, remains underexplored. In this research, we specialize in harnessing the potential of LLMs to comprehend critical information from financial reports, which are hybrid long-documents. We propose an Automated Financial Information Extraction (AFIE) framework that enhances LLMs' ability to comprehend and extract information from financial reports. To evaluate AFIE, we develop a Financial Reports Numerical Extraction (FINE) dataset and conduct an extensive experimental analysis. Our framework is effectively validated on GPT-3.5 and GPT-4, yielding average accuracy increases of 53.94% and 33.77%, respectively, compared to a naive method. These results suggest that the AFIE framework offers accuracy for automated numerical extraction from complex, hybrid documents.
Introduction
Extracting Key Performance Indicators (KPIs) from professional documents like SEC filings or scientific papers presents a significant challenge for Large Language Models (LLMs). These files are typically Hybrid Long Documents (HLDs): they are "long" because they exceed the token limits of most models, and "hybrid" because they interweave narrative text with complex, multi-page tables.
Standard "naive" approaches often rely on truncation, leading to massive information loss. Furthermore, LLMs frequently struggle with numerical precision and the ambiguity of financial terminology. This research introduces the Automated Information Extraction (AIE) framework to systematically navigate these complexities.
The AIE Framework
The AIE framework decomposes the extraction process into four specialized modules designed to optimize LLM performance on HLDs.
- Segmentation: The document is partitioned into manageable segments. A critical finding was that converting tables into PLAIN serialization (simple spaces and newlines) outperformed complex HTML or XML tagging, as it reduced token noise.
- Retrieval: An embedding-based strategy using Sentence-Transformers identifies the "Top-K" segments most relevant to the target keyword.
- Summarization: To consolidate information scattered across segments, the framework employs LLMs. Two strategies were evaluated: Map-Reduce (parallel and faster) and Refine (iterative and more accurate).
- Extraction: A final prompt extracts the specific numerical value from the summary, ensuring adherence to formatting rules (e.g., rounding and units).
Datasets and Evaluation
The framework was evaluated across three diverse domains:
- FINE (Financial Reports Numerical Extraction): A new dataset of manually extracted KPIs from SEC EDGAR reports (2019–2022), covering 18 companies across four sectors.
- WIKIR (Wikireading-Recycled): A cleaned Wikipedia dataset for general knowledge extraction.
- MPP (Massive Paper Processing): A dataset of scientific papers focused on chemical material properties.
Performance was measured using Relative Error Tolerance Accuracy (RETA), which assesses accuracy within specific error margins (e.g., 1%, 5%).
Key Insights
- Table Formatting: Hierarchical HTML formatting actually decreased performance compared to simple text-based tables, likely due to increased token density and noise.
- Optimal Retrieval: Accuracy peaked when retrieving exactly 3 segments (R@3). Fewer segments missed context, while more introduced "distractor" information.
- Precision Prompting: High numerical accuracy was best achieved through "Direct & Shot-Precision" prompts, combining explicit formatting instructions with concrete examples.
- Ambiguity Resolution: AIE proved robust against synonymous terms (e.g., "Revenue" vs. "Total Net Sales") by utilizing document metadata for keyword completion.
Results
The AIE framework demonstrated substantial improvements over naive methods across all benchmarks. On the FINE dataset using GPT-3.5, AIE achieved an average accuracy of approximately 69.9%, a dramatic increase from the 16.0% achieved by the naive method.
When scaled to GPT-4, the framework's average accuracy rose to over 85%. While the "Refine" summarization strategy offered higher accuracy (~70%), the "Map-Reduce" approach was approximately 20% faster, highlighting a trade-off between quality and efficiency.
Future Directions
Despite its success, the framework faces limitations that define future research paths. Currently, AIE is optimized for extraction rather than calculation; it struggles with values requiring multi-step mathematical inference. Additionally, the framework does not yet process non-textual elements like charts or images. Finally, the computational cost of iterative "Refine" loops on high-end models remains a barrier for large-scale industrial deployment.
Summary updated