Financial Knowledge Large Language Model

Cehao Yang, Chengjin Xu, Yiyan QiarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across general domains but often struggle in high-stakes specialized fields like finance due to issues with accuracy, temporal obsolescence, and a lack of deep domain expertise. This paper introduces a comprehensive ecosystem designed to bridge this gap, comprising IDEA-FinBench (a professional-grade benchmark), IDEA-FinKER (a dual-paradigm knowledge injection framework), and IDEA-FinQA (a multi-agent Retrieval-Augmented Generation system). Our results demonstrate that combining retrieval-based learning with targeted instruction fine-tuning significantly enhances the reliability and reasoning capabilities of LLMs in professional financial contexts.

1. Introduction

While state-of-the-art models like GPT-4 are impressive, the financial sector demands a level of precision where "hallucinations" can lead to significant fiscal consequences. General-purpose LLMs face three primary hurdles in finance:

  1. Accuracy & Reliability: The generation of plausible but factually incorrect financial data.
  2. Temporal Obsolescence: The inability to account for daily changes in regulations and market conditions.
  3. Domain Expertise: A lack of the nuanced reasoning required for elite professional certifications such as the CPA or CFA.

Existing fine-tuning approaches often suffer from catastrophic forgetting or fail to provide the real-time factual grounding necessary for industry applications.

2. Methodology: IDEA-FinKER and IDEA-FinQA

To address these challenges, we propose IDEA-FinKER, a two-pronged "Knowledge Enhancement" strategy designed to augment the underlying Transformer-based architectures of modern LLMs.

2.1 IDEA-FinKER: Knowledge Injection

The framework utilizes two distinct paradigms:

  • Soft-Injecting Paradigm (Retrieval-based Few-shot Learning): This method employs a retriever to identify relevant financial examples from the FinCorpus database, feeding them into the prompt. This allows the model to adapt "on the fly" without weight updates.
  • Hard-Injecting Paradigm (Instruction Fine-tuning): We developed structured financial instructions across categories such as Inquiry, Calculation, Reading Comprehension, and Logical Judgment. Low-Rank Adaptation (LoRA) is used to efficiently integrate this knowledge into the model's parameters.
The Transformer architecture serves as the foundational backbone for the Large Language Models (LLMs) utilized and enhanced in this study.

2.2 IDEA-FinQA: Multi-Agent RAG

For real-world deployment, we developed IDEA-FinQA, a system orchestrated by four specialized agents:

  1. Query Rewriter: Refines user input for better retrieval.
  2. Intention Detector: Identifies necessary data sources (e.g., news, stock data).
  3. Extractor and Refiner: Distills relevant information from retrieved documents.
  4. Response Generator: Synthesizes the final answer with verifiable citations.

3. Datasets

Our work contributes three high-quality datasets to the research community:

  • IDEA-FinBench: A bilingual benchmark with 4,617 questions from Chinese CPA and international CFA exams.
  • FinCorpus: A collection of 500,000 Chinese financial questions for knowledge injection.
  • FinFact: A factual verification dataset with 1,514 QA pairs sourced from authoritative news outlets.

4. Experimental Results

4.1 Benchmark Performance

GPT-4 remains the leader in English-medium CFA exams (84.26% on Level 1). However, our enhanced model, IDEA-FinLLM, outperformed GPT-4 in Chinese CPA categories, achieving 78.71% on single-answer questions compared to GPT-4's 62.38%.

4.2 Framework Portability

Applying IDEA-FinKER to base models like Baichuan2-7B and Qwen-7B resulted in accuracy improvements exceeding 10%, demonstrating the framework's effectiveness across different architectures.

4.3 RAG Effectiveness

In factual QA evaluations using FinFact, the IDEA-FinQA system achieved a 70% win rate in accuracy over vanilla models, primarily due to its ability to leverage real-time news citations.

5. Discussion and Conclusion

Our findings suggest a "Vertical Model Paradox": simply training on financial text is insufficient; the quality and structure of instructions are paramount. Furthermore, the synergy between "soft" retrieval and "hard" fine-tuning provides the best balance of intuition and evidence.

While a "native performance gap" persists—where fine-tuning cannot fully compensate for a weak base architecture—our work provides a robust path forward for creating reliable financial AI. Future research will focus on scaling these techniques and addressing multi-modal challenges such as complex financial tables and charts.

Summary updated

BibTeX
@misc{yang2024financial,
  author = {Cehao Yang and Chengjin Xu and Yiyan Qi},
  title = {{Financial Knowledge Large Language Model}},
  year = {2024},
  eprint = {2407.00365},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.00365},
}
Figure