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 precise numerical data from Hybrid Long Documents (HLDs), such as corporate financial reports (e.g., SEC 10-K filings), presents a significant challenge for modern Large Language Models (LLMs). These documents typically exceed the context window limits of most models and interweave narrative text with dense, complex tables. Information is often distributed across different sections with varying levels of precision, leading to potential contradictions or ambiguity. Standard "naive" approaches—which might involve simple truncation or basic retrieval—often fail to capture the necessary context or reconcile conflicting data points.
The Automated Information Extraction (AIE) Framework
To address these challenges, the researchers developed the Automated Information Extraction (AIE) framework. This system decomposes the extraction process into four specialized modules designed to optimize data handling and reasoning.
- Segmentation: The document is serialized into text and split into manageable chunks. Crucially, table elements are serialized using a "PLAIN" format (simple spaces and newlines), which was found to be more effective than structured formats like HTML or XML by reducing token noise.
- Retrieval: Using Sentence-Transformer embeddings, the system identifies the top-$K$ segments most relevant to the target keyword. Experimental results indicate that a retrieval size of $K=3$ provides the optimal balance between context and noise.
- Summarization: The retrieved segments are condensed into a coherent summary. The study compared two strategies: Map-Reduce (parallel summarization) and Refine (iterative updating). The Refine strategy proved superior for accuracy as it allows the model to reconcile nuances and contradictions across segments.
- Extraction: A final prompt, enhanced with "Shot-Precision" (numerical examples), directs the LLM to extract the specific value from the summary.
Experimental Evaluation
The AIE framework was evaluated using three datasets: WIKIR (general knowledge), MPP (scientific papers), and the newly curated FINE (Financial Reports Numerical Extraction) dataset. FINE contains key performance indicators (KPIs) from 18 companies over four years, manually sourced from the SEC’s EDGAR database.
To measure performance, the study utilized the Relative Error Tolerance Accuracy (RETA) metric. RETA considers an extracted value correct if it falls within a specified percentage (e.g., 1%, 3%, 5%, 10%) of the ground truth, accounting for the functional equivalence of different reporting formats (e.g., "$15.3 billion" vs. "$15,300 million").
Results and Discussion
The AIE framework demonstrated substantial improvements over naive methods across all tested models and datasets. On the FINE dataset, AIE increased average accuracy by 53.94% for GPT-3.5 and 33.77% for GPT-4.
Key insights from the analysis include:
- Table Serialization: Simple text-based serialization (PLAIN) outperforms complex markup, likely because it preserves the model's focus on data rather than structure.
- Keyword Metadata: Providing context-rich keywords (e.g., "Net Income of Nvidia 2022Q4") significantly reduces ambiguity compared to simple terms like "Revenue."
- Prompt Engineering: Including specific examples of the desired output format (Shot-Precision) is critical for ensuring the LLM adheres to required rounding and unit conventions.
Conclusion
The AIE framework provides a robust methodology for extracting high-precision data from complex, hybrid documents. By optimizing the pipeline from segmentation through to final extraction, the framework significantly mitigates the limitations of LLM context windows and the noise inherent in hybrid data. Future work will explore the integration of multimodal capabilities to process visual data like charts and investigate cost-optimization strategies for large-scale deployment.
Summary updated