Structuring the Unstructured: A Multi-Agent System for Extracting and Querying Financial KPIs and Guidance

Chanyeol Choi, Alejandro Lopez-Lira, Jihoon Kwon, Minjae Kim, Juneha Hwang, Minsoo Ha, Chaewoon Kim, Jaeseon Ha, Suyeol Yun, Jin KimarXiv 2025 · DOI

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.

The multi-agent system architecture illustrates the flow from raw unstructured data through the Extraction Agent to the Text-to-SQL Agent for user querying.

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.

Performance comparison across different configurations, highlighting the gains in F1 score and query accuracy achieved by the proposed method.

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

BibTeX
@misc{choi2025structuring,
  author = {Chanyeol Choi and Alejandro Lopez-Lira and Jihoon Kwon and Minjae Kim and Juneha Hwang and Minsoo Ha and Chaewoon Kim and Jaeseon Ha and Suyeol Yun and Jin Kim},
  title = {{Structuring the Unstructured: A Multi-Agent System for Extracting and Querying Financial KPIs and Guidance}},
  year = {2025},
  eprint = {2505.19197},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.19197},
}
Figure