Adaptation of Embedding Models to Financial Filings via LLM Distillation

Eliot Brenner, Dominic Seyler, Manjunath Hegde, Andrei Simion, Koustuv Dasgupta, Bing XiangarXiv 2025

TL;DR

This paper introduces an automated, iterative pipeline that distills financial domain expertise from a large language model (LLM) into a compact, efficient bi-encoder embedding model. By iteratively mining hard positive and negative examples from an unlabeled corpus of SEC filings, the method significantly improves information retrieval for Retrieval-Augmented Generation (RAG) systems without requiring costly human annotation.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) is the industry standard for building conversational AI agents over specialized documents. However, general-purpose text embedding models often fail in highly specialized domains like finance. SEC filings (such as 10-Ks and 10-Qs) are notoriously long, structurally complex, and filled with boilerplate text and domain-specific vocabulary.

While frontier LLMs excel at understanding this financial context, using them directly to search through massive document corpora is computationally prohibitive, slow, and prone to performance degradation over long context windows. To bridge this gap, the authors tackle the challenge of domain adaptation: how to train a smaller, production-friendly embedding model to accurately retrieve nuanced financial information without relying on labor-intensive human labeling.

Methods

The authors propose a scalable, iterative student-teacher distillation framework. Instead of simply pairing synthetic queries with single text passages, their pipeline introduces an active interaction loop between the student embedding model and the teacher LLM:

  1. Synthetic Query Generation: Using an open-weights LLM (Llama-3.1-70B-Instruct), the system generates diverse financial queries based on document chunks, augmented by a few-shot prompting strategy to ensure query diversity.
  2. Iterative Hard Example Mining: The current student embedding model retrieves the top-$K$ closest passages from the corpus for a given query. The teacher LLM then acts as a judge, scoring these query-passage pairs on an ordinal relevance scale (1 to 4).
  3. Contrastive Triplet Extraction: The pipeline extracts contrastive triples consisting of a query, a highly relevant passage (score > 3), and an irrelevant/weakly relevant passage (score < 3) mined from the very same document. This intra-document focus trains the model to distinguish subtle differences within a single filing rather than just performing broad corpus-wide matching.
  4. Student Retraining: The student model (GTE-large) is fine-tuned using a triplet loss function with a tight margin (0.1) to stabilize training and prevent catastrophic forgetting. The refined student is then used in the next iteration to mine even harder examples.
Fig. 1: Training/validation pipeline overview. The iterative components of the pipeline are subscripted with “i”.

To ensure unbiased evaluation, the final performance is measured using an independent evaluation pipeline where a different commercial LLM (GPT-4o) serves as the relevance judge on out-of-sample data.

Datasets

  • SEC Filings Corpus: A custom dataset constructed by crawling 396,165 SEC documents across 14 distinct filing types (e.g., 10-K, 10-Q, 8-K, proxy statements, and prospectuses) published between January and July 2024. This yielded a massive corpus of approximately 51.88 million text chunks.
  • FinanceBench: A rigorous, publicly available financial QA benchmark used for out-of-distribution evaluation to test the model's generalizability against human-written expert queries.

Key Insights and Ideas

  • The Power of Multiple Positives: Unlike prior techniques that rely on a single "seed" positive passage per query, this method mines roughly $10^3$ positive passages per query across iterations. Visualized via t-SNE, this approach exposes the model to a much more diverse distribution of semantic difference vectors, leading to robust generalization.
  • Intra-Document Negatives Matter: Sourcing hard negative examples from within the same document as the positive examples forces the model to overcome the "boilerplate duplication" problem common in standardized financial reporting.
  • Diminishing Returns of Iteration: The authors found that the vast majority of performance gains are achieved in the very first training iteration, with subsequent iterations yielding smaller, incremental improvements.

Key Results

The fine-tuned embedding model demonstrated substantial improvements over the baseline GTE-large model:

  • In-Domain Performance: Across 14 financial filing types (evaluated over 21,800 query-document pairs), the method achieved an average 27.7% improvement in MRR@5 and a 44.6% improvement in mean DCG@5.
  • Out-of-Distribution (FinanceBench): The model showed improved Normalized Discounted Cumulative Gain (NDCG) on 3 out of 4 document classes (10-Q, 8-K, and ECT).
  • Qualitative Wins: Qualitative analysis revealed that the fine-tuned model significantly improved at retrieving business metrics from complex tables, weighting domain-specific keyphrases (like "par value"), and demonstrating deep semantic understanding without relying on exact lexical overlap.
Fig. 3: Metrics with standard errors as measured on Fi- nanceBench Evaluation Set

Limitations and Future Work

Despite its success, the authors note that the pipeline's passage identification still relies heavily on the initial model's retrieval capability and heuristic sampling, which might miss highly nuanced context. Furthermore, the model struggled on FinanceBench's 10-K subset when faced with complex, multi-faceted human queries that require external accounting logic (e.g., calculating a "quick ratio").

To address these gaps, the authors suggest integrating query expansion techniques like GraphRAG or employing "agentic" retrieval models capable of multi-step reasoning and tool use to plan candidate retrieval dynamically.

Summary updated

BibTeX
@misc{brenner2025adaptation,
  author = {Eliot Brenner and Dominic Seyler and Manjunath Hegde and Andrei Simion and Koustuv Dasgupta and Bing Xiang},
  title = {{Adaptation of Embedding Models to Financial Filings via LLM Distillation}},
  year = {2025},
  eprint = {2512.08088},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.08088},
}
Figure