Introduction
Financial analysts are currently burdened by the manual task of "structuring the unstructured." Extracting Key Performance Indicators (KPIs) from hundreds of pages of SEC filings—such as 10-Ks, 10-Qs, and earnings transcripts—is a labor-intensive process prone to human error. While Large Language Models (LLMs) offer a potential solution, standard "zero-shot" approaches often fail in high-stakes financial contexts due to issues with numeric precision, contextual nuance (e.g., confusing guidance with historical results), and hallucinations in complex table layouts.
This paper presents a modular, multi-agent architecture designed to bridge this reliability gap. By decomposing the task into specialized agents for extraction and retrieval, the system achieves human-level accuracy and significantly improves research throughput.
The Multi-Agent Architecture
The proposed system utilizes a two-agent framework built on the Databricks stack, leveraging Spark for processing, Delta Lake for storage, and MLflow for tracking. This modularity allows for targeted optimization at each stage of the data lifecycle.
1. The Extraction Agent
The Extraction Agent transforms raw, unstructured text into structured JSON through a seven-stage pipeline. Unlike monolithic prompts, this agent incorporates Domain Rule Injection. It uses hard-coded heuristics to normalize data—such as converting ranges like "22–24%" into a midpoint of 23%—and disambiguate fiscal periods. Furthermore, the agent employs a QA-Driven Validation step, where it audits its own outputs to flag inconsistencies before they are committed to the database.
2. The Text-to-SQL Agent
To enable natural language querying (e.g., "What was the Q4 operating margin?"), the Text-to-SQL Agent utilizes Schema Augmentation. By injecting database metadata and sample rows into the prompt, the agent ensures the LLM understands the underlying table structure. If a generated query fails or returns implausible results, the agent enters an execution feedback loop to regenerate and rerank the query until a valid insight is produced.
Experimental Setup
The system was evaluated against a manually annotated dataset comprising 1,200 SEC filings (including 10-Ks and 8-Ks) and 312 natural language queries derived from real-world hedge fund analyst logs. Ground truth was established and cross-validated by trained financial analysts to ensure strict alignment with GAAP definitions.
Results and Performance Analysis
The evaluation demonstrates that the combination of advanced LLMs (Claude 3.7 Sonnet) and rule-based logic significantly outperforms general-purpose models.
As shown in the results, the "Claude-3.7-Sonnet + Rule Injection" configuration achieved an Extraction F1 of 91.2% and a Query Accuracy of 94.8%, representing a nearly 20% improvement over a naive GPT-4o baseline. Crucially, the system provided a 2.4x boost in throughput, matching human performance levels in accuracy while dramatically reducing the time required for data synthesis.
Key Insights and Future Work
A primary takeaway is that Rules + LLMs > LLMs Alone. Integrating traditional logic for period alignment and unit normalization reduced semantic errors that typically plague zero-shot models. Additionally, the use of specific "qualifier" fields to distinguish between historical performance and future guidance was essential for maintaining data integrity.
Future research will focus on improving Temporal Logic for cross-document reasoning (e.g., multi-year trend analysis) and expanding the system to support multilingual global market filings. The roadmap also includes AutoML integration to further fine-tune domain-specific models for granular KPI extraction.
Summary updated