Retrieval enhanced intelligent financial big language model system
By introducing dynamic merging algorithm, suffix index and Transformer meta-information extraction technology into the financial large language model, the problems of illusory errors and slow knowledge update are solved, efficient and interpretable financial data processing and retrieval are achieved, and the model's performance is improved. Accuracy and reliability.
Patent Information
- Application Number
- CN202410953756.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-01
AI Technical Summary
Existing financial large language models have problems such as illusory errors, slow knowledge update, and poor interpretability when processing financial data. Moreover, the existing retrieval end cannot effectively match all relevant data, resulting in low search efficiency.
The retrieval-enhanced financial large language model system (RAG-FinLLM) is adopted, including the data storage and management end, the retrieval end and the generation end. It optimizes storage efficiency through dynamic merging algorithms, introduces suffix index and parallel suffix array construction algorithms to accelerate index construction, and uses Transformer-based meta-information extraction algorithm and multi-head attention mechanism enhance the model's semantic understanding of the financial field, and improve the accuracy and interpretability of answers through memory networks and fine-tuning strategies.
It significantly improves the data utilization efficiency and output quality of the financial big language model, ensures the timeliness and reliability of the model, solves the problems of illusory errors and lag in knowledge update, and realizes efficient financial data management and intelligent knowledge question and answer.
Smart Images

Figure CN118733699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and computer data processing, and in particular to a retrieval augmented generation for financial large language model system (RAG-FinLLM). Background Art
[0002] The current Retrieval Augmented Generation Large Language Model (RAG-LLM) is in a stage of rapid development and exploration. This emerging technology focuses on optimizing the performance of large language models through efficient information retrieval mechanisms. The core architecture of this type of model includes data file storage and management, information retrieval, and generation modules. Although some progress has been made, the retriever part of the current solution mainly relies on document matching and embedding processes, that is, directly inserting the searched documents into the large model without deeply understanding and integrating the retrieval results. In addition, the existing retrieval end uses an inverted index or word embedding vector structure, which cannot guarantee 100% search of relevant data. When locating documents using an inverted index structure, the retrieval end is required to segment the data before building the index, and store the segmented words and their corresponding documents.
[0003] On the search side, although the inverted index can process text well, it is difficult to guarantee that all results are matched in heterogeneous data. In order to overcome the shortcomings of the inverted index, the suffix index can handle this type of search task. With the rapid development of computer hardware, especially relying on the computing resources of national supercomputers, the difficulties that once plagued the rapid construction of suffix indexes are gradually becoming smaller. Therefore, it is necessary to promptly develop the key technology of full-text search for suffix indexes for the search side, overcome the inherent defects of the inverted index, and provide solutions for the FinLLM-RAG search side that adapts to the development of computer hardware.
[0004] On the generation side, the main challenge facing the existing generation side is how to effectively integrate the search results that have not been fully processed and screened with the large language model. The original retrieved literary content contains redundant information, noise interference, and even misleading content. If it is directly input into the large model to generate answers, the generated answers may deviate from the target or contain wrong information, reducing the user's satisfaction with the generated results.
[0005] With the rapid development of large language models, the Financial Large Language Model (FinLLM) is being designed and built. FinLLM is a large language model (LLM) that provides professional and intelligent management services to users in the financial field. Although FinLLM even surpasses the human level in some areas, it still faces problems such as hallucination errors, slow knowledge update and poor interpretability.
[0006] To solve the above problems, the Retrieval Augmented Generation (RAG) framework adds a retriever to the large language model, acquires knowledge in an end-to-end fine-tuning mode and an "interpretable + modular" way, and largely breaks through the limitation that the results generated by the large model lack a basis. By searching for relevant knowledge from the data source and using it as the basis for generating results, the RAG framework greatly improves the accuracy and timeliness of the answers, and effectively solves the problem of hallucination errors in the large language model and the problem that the latest data has not been trained into the model.
[0007] However, the objects of current financial data management business are mainly fragmented small files, but their metadata needs to be resident in memory, which brings a huge memory load to the LLM search end, thus limiting the management scale of financial data. Similarly, most of the existing RAG-LLM research remains in the experimental stage, without considering the problem of large-scale data storage, and cannot effectively solve this problem.
[0008] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0009] The main purpose of the present invention is to overcome the defects of the above-mentioned background technology and provide a retrieval-enhanced intelligent financial large language model system.
[0010] To achieve the above object, the present invention adopts the following technical solutions:
[0011] A retrieval-enhanced intelligent financial large language model system, comprising a data storage and management end, a retrieval end, and a generation end;
[0012] The data storage and management end is used to store and manage small financial business files, and includes: a small financial file management module, which is used to manage small financial files at the data storage end; a dynamic merging algorithm module, which is used to dynamically merge multiple small financial files into a larger single file, that is, a hyperfile; a hyperfile management module, which is used to manage the hyperfile generated by the dynamic merging algorithm module in the form of a logical disk, and optimize the use of storage space;
[0013] The retrieval end is responsible for the indexing and searching of financial data, which includes: a suffix index construction module, which is used to indiscriminately index financial source data; a suffix array construction algorithm module, which is used to use supercomputing resources to improve the construction speed of suffix indexes; an index and search module, which is used to process data indexing and search requests. The index and search module further includes: a data preprocessing unit, which is used to process raw financial data according to demand; a document indexing unit, which is used to persist indexes to disk; a domain index management unit, which is used to maintain domain data to improve indexing efficiency;
[0014] The generation end is the core output link, generating financial problem analysis and answers, which includes: meta-information extraction module and explainable answer generation module. The meta-information extraction module is used to refine financial information resources, which includes: Transformer-based meta-information extraction algorithm module, which is used to calculate semantic relevance and retain highly relevant content; multi-head attention mechanism, which is used to enhance the model's perception of related sentences. The explainable answer generation module is used to integrate user questions and meta-information, which includes: fine-tuning strategy, which is used to optimize large models for the financial field; attention mechanism, which is used to integrate questions and summary information; memory network, which is used to use historical data to enhance the accuracy of answers.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] The present invention provides a retrieval-enhanced financial large language model system (RAG-FinLLM), which effectively solves multiple challenges in existing financial and other business data management and retrieval through a series of technical innovations. The data storage and management end of the system adopts a distributed architecture, and optimizes the storage efficiency of massive small files through dynamic merging algorithm modules, reducing the memory load of the main node. The retrieval end introduces a suffix index construction module and a parallel suffix array construction algorithm module, which not only improves the recall rate of the index, but also greatly speeds up the index construction speed, effectively supporting the full-text search requirements of heterogeneous data. In addition, the data preprocessing unit, document index unit and domain index management unit in the index and search modules ensure the accuracy and high efficiency of data indexing.
[0017] The meta-information extraction module and the explainable answer generation module on the generation side use the Transformer-based algorithm and multi-head attention mechanism to strengthen the model's understanding and processing capabilities of the financial field semantics. At the same time, the accuracy and explainability of the answers are improved by fine-tuning the strategy and memory network. The RAG-FinLLM system focuses on the problems of hallucination errors and knowledge update lags that may occur when large financial business models generate answers. By updating the knowledge base in real time and integrating the latest financial knowledge data, the timeliness and reliability of the model are ensured.
[0018] Overall, through technological integration and innovation, the present invention can significantly improve the data utilization efficiency and output quality of large financial language models, build a financial information processing and retrieval system with strong interpretability, high accuracy and fast response, and effectively meet the financial industry's needs for intelligent and high-precision knowledge question and answer.
[0019] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a diagram showing the overall architecture of the retrieval-enhanced financial big language model system according to an embodiment of the present invention.
[0021] Figure 2 The query flow chart for locating a small financial file according to an embodiment of the present invention.
[0022] Figure 3 This is a storage solution diagram for merging a large number of small files into a super file according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.
[0024] See also Figures 1 to 3 ,A retrieval-enhanced intelligent financial large language model system (RAG-FinLLM), including a data storage and management end, a retrieval end and a generation end.
[0025] The data storage and management end is used to store and manage small financial business files, and includes: a financial small file management module, which is used to manage small financial files at the data storage end; a dynamic merging algorithm module, which is used to dynamically merge multiple small financial files into a larger single file, namely a hyperfile; a hyperfile management module, which is used to manage the hyperfile generated by the dynamic merging algorithm module in the form of a logical disk to optimize the use of storage space.
[0026] The retrieval end is responsible for the indexing and searching of financial data, which includes: a suffix index construction module for indiscriminately indexing financial source data; a suffix array construction algorithm module for using supercomputing resources to increase the construction speed of suffix indexes; an index and search module for processing data indexing and search requests. The index and search module further includes: a data preprocessing unit for processing raw financial data according to demand; a document indexing unit for persisting indexes to disk; and a domain index management unit for maintaining domain data to improve indexing efficiency.
[0027] The generation end is the core output link, generating financial problem analysis and answers, which includes: meta-information extraction module and explainable answer generation module. The meta-information extraction module is used to refine financial information resources, which includes: Transformer-based meta-information extraction algorithm module, which is used to calculate semantic relevance and retain highly relevant content; multi-head attention mechanism, which is used to enhance the model's perception of related sentences. The explainable answer generation module is used to integrate user questions and meta-information, which includes: fine-tuning strategy, which is used to optimize large models for the financial field; attention mechanism, which is used to integrate questions and summary information; memory network, which is used to use historical data to enhance the accuracy of answers.
[0028] The retrieval-enhanced intelligent financial large language model system of the present invention realizes efficient management and intelligent analysis of small files of financial business through the collaborative work of its innovative data storage and management end, retrieval end and generation end. The data storage and management end adopts the financial small file management module to effectively manage small files, and merges these small files into hyperfiles through the dynamic merging algorithm module. The hyperfile management module optimizes storage in the form of logical disks, which significantly improves storage efficiency and access speed. The retrieval end uses the suffix index construction module and the suffix array construction algorithm module to accelerate the index construction process, and ensures the accuracy and high efficiency of the index through various units of the index and search modules, such as data preprocessing, document indexing and domain index management. The generation end integrates the meta-information extraction and interpretable answer generation modules, uses the Transformer-based algorithm and multi-head attention mechanism to strengthen the semantic understanding and processing capabilities, and enhances the accuracy and interpretability of the answers through fine-tuning and memory network technology. The RAG-FinLLM system not only solves the problems of illusory errors and delayed knowledge updates when generating answers in large financial models, but also ensures the timeliness and reliability of financial information services by updating the knowledge base in real time, meeting the financial industry's high standards for intelligent and high-precision knowledge question and answering.
[0029] Figure 2The paper shows a query process for locating financial small files in a preferred embodiment, revealing how the system efficiently responds to user requests and retrieves relevant financial data. In this process, the user sends a request through the retrieval end, the system receives and parses these requests through the program interface, and uses the metadata index to quickly locate the metadata of the financial small files, including key information such as file name, size, offset, etc. These metadata not only provide a unique identifier for the file, but also greatly optimize the search process. The working mechanism of the system includes data preprocessing, document index creation, index management and suffix index construction, which ensure the accuracy and high efficiency of data indexing. In particular, the suffix array construction algorithm module uses the parallel processing capability of supercomputers to accelerate the construction process of the suffix array and realize the rapid retrieval of suffixes, thereby improving the efficiency of substring matching pattern search tasks. The technical advantages are reflected in several aspects: First, through the dynamic merging algorithm module, the system can merge multiple small files into a super file, reduce the memory usage of the main node, and improve the management efficiency of massive financial small files. Secondly, the real-time update mechanism of the index management module ensures that the metadata and content index are synchronized with the file status, maintaining the consistency and accuracy of the data. Finally, the fast full-text search mechanism allows the system to quickly locate and retrieve required data based on user requests, improving the speed and accuracy of retrieval. Figure 2 The query process of the illustrated embodiment can achieve fast access and accurate retrieval of financial data through highly integrated and optimized system components, meeting the strict requirements of the financial industry on data processing speed and accuracy.
[0030] Figure 3The present invention shows an efficient storage scheme in a preferred embodiment, which is used to merge a large number of small financial files into a single hyperfile, optimize the use of storage resources and improve data retrieval efficiency. In this scheme, the dynamic merging algorithm module plays a core role, which is responsible for dynamically merging the contents of multiple small financial files into a larger single file, namely, a hyperfile. This process not only reduces the memory usage of the master node, but also improves the management efficiency of the system for large-scale small financial files by reducing the memory load. The working mechanism of the system involves several key steps: First, the small financial files are uploaded to the system and then processed by the file management module. At this stage, the system extracts financial metadata information, such as file name and size, which are crucial for subsequent indexing and retrieval. Then, the dynamic tracking mechanism is used to monitor the usage status of the hyperfile, and when necessary, the hyperfile maintenance strategy is used to perform regular inspections and reorganizations to release the space occupied by deleted files, reduce file fragmentation, and improve the utilization of storage space. In this storage scheme, by merging small files into hyperfiles, the system reduces the fragmentation of storage space and improves the overall utilization of storage resources. The merged hyperfile is indexed by the index extraction module, which is convenient for fast retrieval and access, and speeds up data retrieval. Memory optimization reduces the amount of data that a single master node needs to process, thereby reducing memory load and enabling the system to process large-scale data more stably. The index update mechanism ensures that index information can be updated in real time after files are updated or added, maintaining the timeliness and accuracy of data. The dynamic merge algorithm allows the system to flexibly adjust the composition of hyperfiles according to current storage needs and usage to adapt to the ever-changing data environment. Figure 3 The storage solution of the illustrated embodiment can achieve efficient management and rapid retrieval of financial data, meeting the high performance requirements of the financial industry for data processing.
[0031] In some embodiments, the parallel suffix array construction algorithm module includes: a parallel computing method is executed on a string X[0,…,n-1] consisting of n characters; the parallel processing capability of a supercomputer is utilized to accelerate the construction process of the suffix array; all suffixes of the string are sorted and stored in an integer array to form a suffix array to achieve fast retrieval of the suffixes; the suffix array allows the execution of a binary search algorithm to complete the search task of a substring matching pattern.
[0032] In some embodiments, the index and search module includes: a data preprocessing module, which is used to receive financial data streams, perform data parsing according to user needs, and store the parsed data as a document with a unique identification code; a document indexing module, which is used to receive the document Di output by the data preprocessing module and create corresponding document index information in the index library; an index management module, which is used to receive the output of the document indexing module, parse the document Di, and distribute it to the corresponding domain index module according to the domain name; a suffix index module, which constructs a suffix index for financial data, and can perform binary search on the data; a query result module, which returns the search results to the user in a certain manner.
[0033] In some embodiments, the document D output by the data preprocessing module i , is assigned a document index information for unique identification and is passed to the document index module; the document index module receives the document D i , and create corresponding index information in the index library, and store the index information persistently in the external memory to ensure the persistence and consistency of the data; the suffix index module receives the segment set DF from the domain index module j , and build a suffix index to support fast search operations; the index search module receives the user's query request, parses the query conditions, performs a search through the suffix index module, and retrieves index data that matches the query conditions; the query result module receives the search results returned by the index search module, further processes the results, and then provides the optimized results to the user.
[0034] In some embodiments, the data storage and management end also includes: an index management module for maintaining the metadata and content suffix index of small financial files; a small financial file search module for processing file access requests from the retrieval end and generating search tasks to find the metadata information of the file; merging multiple small files into a large file through a dynamic merging mechanism; integrating with the Hadoop distributed file system HDFS, searching the file content stored in the HDFS through the retrieval end to achieve full-text search of the file content; a real-time update mechanism for metadata and content indexes, when a file is added or deleted, the index management module generates an index update task, and updates the index information in the retrieval end to track the file status.
[0035] In some embodiments, the data storage and management end further includes: a file adding process, for the file uploading process from the client to the server, multiple financial small files are merged into a combination for overall uploading; a metadata extraction mechanism, which is used to extract the metadata of each business small file from the combined uploaded file group for subsequent processing and retrieval; a metadata index structure is used, which defines the metadata field of each financial small file, which is used to build an index and achieve precise or fuzzy search and positioning of the file; a fast full-text search mechanism, which uses the metadata of each financial small file indexed by the retrieval end to quickly locate and retrieve required data according to user requests; a hyperfile management strategy, which involves generating a record containing a unique identifier and an offset for each small file, where the primary key indicates the hyperfile storing the small file, and the offset and file size determine the starting position and length of the small file in the hyperfile.
[0036] In some embodiments, the dynamic merging algorithm module further includes: a hyperfile creation mechanism, which is used to dynamically merge the contents of multiple financial small files into a single hyperfile to reduce the memory usage of the master node and improve the system's management efficiency of massive financial small files; a metadata information extraction method, which is used to extract metadata information from each financial small file, such as file name, size, etc., and establish a mapping relationship with the hyperfile for the retrieval end to manage and index; a memory optimization technology, which reduces the memory load of a single master node by merging small files into hyperfiles, and is suitable for managing more than 10 million financial small files; a hyperfile maintenance strategy, including regular inspection and reorganization of blocks in the hyperfile to release space occupied by deleted files, reduce file fragmentation, and improve storage space utilization; a dynamic tracking mechanism, which is used to monitor the usage status of the hyperfile, merge obsolete hyperfiles that exceed a preset threshold, generate a new high-utilization hyperfile, and update related index information; an index update mechanism, which is used to store the files in the package into the hyperfile after receiving the file package, and establish a metadata index to ensure that the retrieval end can retrieve the metadata and content information of each small file.
[0037] In some embodiments, the dynamic merging algorithm specifically includes the following steps: constructing a target optimization function, which is based on the available space of the hyperfile and aims to minimize the unused hyperfile space after merging, marking the status of the hyperfile through a group identification matrix, and realizing the transformation of the dynamic addition problem of financial small files into a 0-1 target optimization problem; designing a group identification matrix for determining the order in which each small file is assigned to the hyperfile, wherein each element of the matrix represents the allocation status of the small file, and ensuring that each small file is assigned to at least one hyperfile; applying a discrete particle swarm optimization algorithm, optimizing the group identification matrix through iterative calculation, so as to minimize the available space of the hyperfile while satisfying that all small files are added to the storage end; determining the optimal small file task addition The scheme adaptively adjusts the particle size in the particle swarm. Sub-position and velocity, find the function that minimizes the objective function The optimal solution for the number of small files is obtained; in the iterative process, each particle represents a possible small file allocation scheme, and by updating the position and speed of the particle, the global optimal solution is gradually approached; using the heuristic algorithm, the allocation of each small file is dynamically adjusted according to the information in the particle group to ensure the effectiveness and feasibility of the allocation scheme; completing the dynamic merging of small files to form a super file, optimizing the use of storage space, reducing memory load, and improving storage efficiency.
[0038] In some embodiments, the meta-information extraction algorithm module based on the Transformer architecture includes the following processing: input sentence representation: representing the input sentence as a set of embedded vectors of characters, each character is represented by a d-dimensional vector to capture its semantic features; decomposition matrix construction: decomposing the sentence matrix into three matrices of query (Q), key (K) and value (V) for subsequent attention mechanism calculation; attention mechanism calculation: using the attention mechanism to calculate the correlation between any character vector and all other character vectors in the sentence, and normalizing the correlation coefficient through the softmax function to determine the strength of association between characters; multi-head attention processing: implementing a multi-head attention mechanism, by processing multiple attention heads in parallel, each head focuses on different types of semantic information, enhancing the model's understanding of complex semantics; relevance measure fusion: integrating the pre-calculated relevance score as an additional attention weight into the Trans The former architecture adjusts the activation values of the hidden layer nodes to dynamically perceive and enhance the sentence components that are highly relevant to the user query; multi-head attention matrix generation: the outputs of multiple attention heads are merged and, through linear transformation, a character embedding representation with the same dimension as the original character is obtained; feedforward network FFN: a feedforward network using the ReLU activation function is used to expand and compress the sentence representation dimension and increase the nonlinear expression ability of the model; information integration and update: the output of FFN is added to the original sentence representation, and residual connections and layer normalization are performed to maintain contextual integrity and enhance information integration; semantic relevance ranking: combining the relevance of sentences and user query content, all retrieved texts are semantically ranked to determine the information most closely related to the query; high-relevance content retention: based on the calculated semantic relevance score, highly relevant sentences or content fragments are retained as the result of meta-information extraction.
[0039] In some embodiments, the explainable answer generation module includes the following processing:
[0040] Collect and construct a dataset containing question-answer data pairs in the financial field; based on the large language model, implement targeted fine-tuning strategies to optimize the model's ability to understand and generate financial data; use a meta-information-guided mechanism to combine the extracted meta-information related to the user's question with the original question and input it into the model; use real-world meta-information to ensure that the answers output by the model have strong support and credibility, and avoid imaginary content or wrong information; define a conditional probability distribution function to describe the probability of the model getting an answer given a user's question and its highly relevant meta-information; use attention mechanisms, memory networks, and cross-modal fusion technology to enable the model to fully understand and integrate the information sources of questions and summaries; generate accurate and authoritative answers to business domains.
[0041] In some embodiments, the financial big language model system provided by the present invention is a retrieval-enhanced financial big language model system RAG-FinLLM. In the retrieval-enhanced financial big language model system RAG-FinLLM, the financial data small file storage end and the meta-information extraction end are added by reconstructing the retrieval end to achieve optimization and upgrading of the financial information processing process. RAG-FinLLM covers a complete system chain from data index construction and access, intelligent extraction of summary content to interpretable answer generation, and uses suffix indexes to build a full-text search end and search end for financial data for supercomputing platforms, thereby solving the problem that the existing retrieval end cannot match all data, and can use supercomputing computing resources to construct suffix indexes in parallel, greatly improving the speed and efficiency of index construction.
[0042] In the specific embodiment, see Figure 1The retrieval-enhanced financial large language model system includes a data storage and management end, a retrieval end, and a generation end. The data storage and management end is used to store and manage small financial files, including: a financial small file management module, which is used to manage small financial files at the data storage end; a dynamic merging algorithm module, which is used to dynamically merge multiple small financial files into a larger single file, namely a hyperfile; a hyperfile management module, which is used to manage the hyperfile generated by the dynamic merging algorithm module in the form of a logical disk to optimize the use of storage space. The retrieval end is responsible for the indexing and search operations of financial data, including: a suffix index construction module, which is used to indiscriminately index financial source data to ensure the recall rate; a parallel suffix array construction algorithm module, which is used to use supercomputing resources to improve the construction speed of the suffix index; an index and search module, which is used to process data indexing and search requests. The generation end, as the core output link, generates financial problem analysis and answers, including: a meta-information extraction module and an explainable answer generation module. The meta-information extraction module is used to extract financial information resources, including: a Transformer-based meta-information extraction algorithm module for calculating semantic relevance and retaining highly relevant content; a multi-head attention mechanism for enhancing the model's perception of related sentences. The explainable answer generation module is used to integrate user questions and meta-information, including: a fine-tuning strategy for optimizing large models for the financial field; an attention mechanism for integrating questions and summary information; and a memory network for using historical data to enhance the accuracy of answers.
[0043] The retrieval-enhanced financial large language model system of the embodiment of the present invention optimizes the management of massive financial small files by introducing a data storage terminal and a storage mechanism. The system reduces the memory load of the master node through a small file dynamic merging algorithm, significantly improving storage and access efficiency. In addition, the system adds a summary extraction terminal, which uses deep learning and the Transformer architecture to automatically extract meta-information from the retrieval document and generate a comprehensive and concise summary information set.
[0044] The generation end of RAG-FinLLM combines the extracted meta-information with the context of the user's question, and intelligently generates accurate, detailed and timely analysis and answers to financial problems. The system specifically solves the problems of illusion errors and delayed knowledge updates that may occur when traditional large financial models generate answers. By updating the knowledge base in real time, it ensures that the model always has the latest financial knowledge, enhances the interpretability of the model, and meets regulatory requirements and user needs.
[0045] The present invention also includes a mechanism for efficient management and storage of massive financial data. By optimizing data organization and storage methods, it realizes unified, convenient and efficient data services across platforms, providing strong support for subsequent research and financial heterogeneous small file data processing. At the same time, the system uses full-text search technology to accurately extract meta-information from financial small files, build a comprehensive and systematic knowledge database, and improve the answer quality and interpretability of large financial models.
[0046] This invention innovatively designs a dynamic merging mechanism for small financial files, effectively solving the problems of incomplete indexing and low retrieval efficiency caused by data dispersion, and ensuring that the financial big model can update the knowledge base in real time and maintain the latest knowledge status in the ever-changing market environment. Through these technological innovations, RAG-FinLLM not only improves the performance of the financial big model, but also provides strong support for the intelligentization and precision of financial information services.
[0047] The retrieval-enhanced intelligent financial big language model system provided by the present invention can realize full-text search of large-scale heterogeneous data, filling the technical gap of full-text search and management of heterogeneous data. In specific applications, the present invention can use supercomputing resources and combine with the banking business data management system to realize a retrieval-enhanced financial big language model system for financial small file storage. High-performance computing can be closely combined with banking business scenarios to carry out intelligent management and efficient use of financial data. At the same time, the meta-information extraction mechanism is explored in the construction of the RAG-FinLLM system, and the key technical breakthroughs and applications of the explainable full-text retrieval-enhanced financial big language model are achieved.
[0048] The overall architecture diagram of the retrieval-enhanced financial big language model system of a specific embodiment of the present invention is as follows Figure 1 shown.
[0049] RAG-FinLLM is divided into sorting out the sources and interfaces of financial data, suffix indexing all financial data, uniformly storing financial data in the financial small file management database, generating text summaries for the retrieved data and using them as the main basis for RAG-FinLLM to generate results. It organizes various types of financial data step by step, improves the efficiency of indexing and searching data, designs a dynamic merging algorithm for financial small files, generates meta information for all data related to the search content and puts it into the large language model together with user questions to generate the final answer, and forms an organic whole step by step, systematically solving the problem of illusion in the generation results of the financial large model.
[0050] RAG-FinLLM adopts a meta-information guided answer generation mechanism. The meta-information extraction end extracts data related to the question, and then inputs the extracted meta-information and the original question into the big model. FinLLM ensures that the output answers have strong support and credibility based on real-world meta-information, avoids imaginary content or erroneous information brought by the answers generated by the model, and improves the professionalism and accuracy of financial information services.
[0051] RAG-FinLLM(x)=RAG-FinLLM(yx,z)(1)
[0052] In formula (1), the vector sequence x = x1, x2, ..., x m Represents a question string of m characters raised by the user. Each x i The key character unit that constitutes the context of the question. Vector sequence z = z1, z2, ..., z n n characters generated by the summary information extraction end. After intelligent extraction and refinement, the summary information can reflect the core facts and data in the financial field. The conditional probability distribution function RAG-FinLLM(y|x) is further defined to represent the probability of getting the answer y given the user's question x and the highly relevant summary information z. With the help of attention mechanism, memory network and cross-modal fusion technology, RAG-FinLLM fully understands and integrates the information sources from questions and summaries, thereby generating accurate and authoritative answers.
[0053] In summary, the present invention provides a retrieval-enhanced intelligent financial large language model system, which can realize full-text search of large-scale heterogeneous financial data, filling the technical gap in full-text search and management of heterogeneous data. The present invention adds a data storage terminal to the RAG-FinLLM large model, which can store small files of heterogeneous financial data. By designing a dynamic merging algorithm for small files, it is avoided that the direct storage of each small file causes excessive memory load on the main node, thereby effectively improving the storage and access efficiency of small files; at the same time, the embodiment adds a summary extraction terminal, uses deep learning and Transformer architecture to automatically extract metadata from the retrieved documents, and forms a concise and comprehensive summary information set. The generation end is the core output link of the entire system. By integrating the metadata of the extraction end with the user's question context, RAG-FinLLM can be intelligently generated based on external actual data, and output more accurate, detailed and timely analysis and answers to financial problems.
[0054] In general, the present invention breaks through the bottleneck of the existing technology, improves the data utilization efficiency and output quality of RAG-FinLLM through meta-information algorithm design and technology integration, and meets the growing demand for high-precision, cross-domain knowledge question and answer. The present invention has achieved a key breakthrough in the retrieval link, and through the full-text search solution, it can systematically and comprehensively traverse all relevant external data information.
[0055] The retrieval-enhanced financial large language model system RAG-FinLLM of the present invention optimizes and upgrades the financial information processing process by reconstructing the retrieval end to add a financial data small file storage end and a meta-information extraction end. RAG-FinLLM covers a complete system chain from data index construction and access, meta-information intelligent extraction to interpretable answer generation, and uses suffix indexes to build a full-text search end for financial data for supercomputing platforms, thereby solving the problem that the existing retrieval end cannot match all data, and can use supercomputing resources to construct suffix indexes in parallel, improving the speed and efficiency of index construction.
[0056] In specific applications, the present invention can utilize supercomputing resources and combine with the banking business data management system to realize a retrieval-enhanced financial large language model system for the storage of massive financial small files. It can closely combine high-performance computing with banking business scenarios to conduct intelligent management and efficient use of financial data. At the same time, it explores the mechanism of meta-information extraction in the construction of the RAG-FinLLM system, and realizes the breakthrough and application of key technologies of the explainable full-text retrieval-enhanced financial large language model.
[0057] The present invention solves the problems of illusory errors in FinLLM when generating answers and its inability to integrate the latest financial knowledge data in real time. Guided by the interpretability of the big financial model, it forms a solution that combines the extraction of metadata of massive financial small files with full-text retrieval technology, and constructs an enhanced financial big language model system with strong interpretability.
[0058] First, an efficient management and storage mechanism for massive financial data is proposed. This part lays the data foundation for the implementation of the entire invention, by optimizing the data organization and storage methods and ensuring the ability to provide unified, convenient and efficient data services across platforms, thereby supporting subsequent research work at all levels, especially providing strong support for searching massive financial heterogeneous small file data processing.
[0059] Secondly, a full-text search technology for heterogeneous financial small file data is proposed, which aims to accurately extract meta-information from various financial small files and reveal the intrinsic correlation between these meta-information and the answers generated by the financial big model. Through the effective integration of meta-information, a comprehensive and systematic knowledge database is formed, which not only helps to improve the answer quality of the existing financial big model, but also significantly enhances the interpretability of the model and makes the model reasoning process more transparent.
[0060] Thirdly, the innovative design of the dynamic merging algorithm for small financial files will effectively solve the problems of incomplete indexing and low retrieval efficiency caused by data dispersion. The present invention can update and expand the knowledge base of large financial models in real time, ensuring that the model always maintains the latest knowledge status in the ever-changing financial market environment.
[0061] The RAG-FinLLM system of the present invention can generate explainable financial answers and has strong practicality, which is reflected in the following aspects:
[0062] ① Propose a compression storage algorithm for massive financial small file data, which significantly reduces the metadata usage in memory and improves the efficiency of subsequent access management.
[0063] ② Design a real-time indexing solution for financial data streams on the search side to solve the problem of low real-time search coverage and fill the application gap where inverted indexes and parameter indexes cannot search all financial data.
[0064] ③ The Transformer model with the user question and document relevance matrix is used to provide sufficient data support and interpretability basis for solving the problem of FinLLM generating accurate answers. This invention comprehensively helps deepen the theory and practice in the field of LLM interpretable intelligent learning, and combines artificial intelligence technology to improve the strategic layout of financial productivity and meet the growing information intelligence needs of the financial industry.
[0065] As a multi-level collaborative system, the RAG-FinLLM of the present invention can also solve the problems of information lag, poor accuracy and low transparency of traditional large language models in the field of financial applications, provide a theoretical basis and technical guarantee for building a scientific and efficient financial data management system and service model, and provide a practical solution to similar problems existing in general large language models.
[0066] The present invention proposes a dynamic merging algorithm for massive financial small files, which effectively improves the space utilization of hyperfiles. Unlike the existing merging methods that need to be frozen and cannot be deleted or modified, this algorithm facilitates the back-end maintenance of small file data, thereby providing data support for the distributed and cross-platform management of financial data by large models. The present invention designs a massive financial small file metadata extraction mechanism, which effectively integrates parameterized pre-trained data and real-time non-parametric data to generate concise and clear metadata, providing sufficient data support and explainability basis for solving the problem of FinLLM generating accurate answers. This mechanism can effectively integrate all professional data in the financial field, which is the first time in the field of large financial models.
[0067] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A retrieval-enhanced intelligent financial large language model system, characterized in that: include: The data storage and management terminal is used to store and manage small financial files, including: A financial small file management module is used to manage financial small files on the data storage end; Dynamic merging algorithm module, used to dynamically merge multiple small financial files into a larger single file, i.e., a hyperfile; A hyperfile management module, used for managing the hyperfiles generated by the dynamic merging algorithm module in the form of logical disks; The retrieval end is responsible for the indexing and search operations of financial data, including: Suffix index building module, used to indiscriminately index financial source data to ensure completeness; Suffix array construction algorithm module, used to use supercomputing resources to improve the construction speed of suffix index; The indexing and searching module is used to process data indexing and searching requests, and further includes: Data preprocessing unit, used to process raw financial data according to requirements; Document index unit, used to persist indexes to disk; A domain index management unit, used to maintain domain data to improve indexing efficiency; The generation end, as the core output link, generates business problem analysis and solutions, including: The meta-information extraction module is used to extract financial information resources, which includes: Transformer-based meta-information extraction algorithm module, used to calculate semantic relevance and retain highly relevant content; Multi-head attention mechanism, used to enhance the model’s perception of related sentences; Explainable answer generation module, which integrates user questions and meta information, including: Fine-tuning strategies to optimize large models for business domains; Attention mechanism, used to integrate question and summary information; Memory networks are used to leverage historical data to enhance answer accuracy.
2. The retrieval-enhanced intelligent financial large language model system according to claim 1, characterized in that: The parallel suffix array construction algorithm module includes: The parallel computing method is performed on a string X[0,…,n-1] consisting of n characters; Use the parallel processing capability of supercomputers to speed up the construction of suffix arrays; Sort all the suffixes of the string and store them in an integer array to form a suffix array to achieve fast retrieval of the suffixes; The suffix array allows a binary search algorithm to be performed to complete the task of searching for substring matching patterns.
3. The search-enhanced intelligent financial large language model system according to claim 1, characterized in that: The indexing and searching module includes: The data preprocessing module is used to receive the original financial data stream, parse the data according to user needs, and store the parsed data as a document with a unique identification code. i ; The document indexing module is used to receive the document D output by the data preprocessing module. i , and create corresponding document index information in the index library; The index management module is used to receive the output of the document index module and parse the document D i , and distribute them to the corresponding domain index modules according to the domain name; Suffix index module, used to construct suffix indexes for financial data; The query result module is used to provide search results to users.
4. The retrieval-enhanced intelligent financial large language model system according to any one of claims 1 to 3, characterized in that: The document D output by the data preprocessing module i , is assigned a document index information for unique identification and is passed to the document index module; The document indexing module receives the document D i , and create corresponding index information in the index library, and store the index information persistently in external storage to ensure data persistence and consistency; The suffix index module receives the segment set DF from the domain index module j , and build suffix indexes to support fast search operations; The index search module receives a user's query request, parses the query conditions, performs a search through the suffix index module, and retrieves index data that matches the query conditions; The query result module receives the search results returned by the index search module, further processes the results, and then provides the optimized results to the user.
5. The retrieval-enhanced intelligent financial large language model system according to any one of claims 1 to 3, characterized in that: The data storage and management end also includes: Index management module, used to maintain the metadata and content suffix index of small financial files; The financial small file search module is used to process file access requests from the search end and generate search tasks to find metadata information of files; Through the dynamic merging mechanism, multiple small files are merged into one large file; Integrate with Hadoop Distributed File System HDFS, search the file contents stored in HDFS through the retrieval end, and realize full-text search of file contents; Real-time update mechanism for metadata and content index: when files are added or deleted, the index management module generates an index update task and updates the index information in the search end to track the file status.
6. The retrieval-enhanced intelligent financial large language model system according to any one of claims 1 to 3, characterized in that: The data storage and management terminal further includes one or more of the following: File adding process: For the file uploading process from the client to the server, multiple small financial files are dynamically merged into one combination for overall upload; A metadata extraction mechanism, which is used to extract the metadata of each financial small file from the combined uploaded file group for subsequent processing and retrieval; A metadata index structure is used, which defines the metadata fields of each small financial file, and is used to build an index and achieve precise or fuzzy search and positioning of the file; A fast full-text search mechanism that uses the metadata information of each small financial document indexed by the search end to quickly locate and retrieve the required data based on user requests; A hyperfile management strategy involves generating a record containing a unique identifier and an offset for each small file, wherein the primary key indicates the hyperfile storing the small file, and the offset and file size determine the starting position and length of the small file in the hyperfile.
7. The retrieval-enhanced intelligent financial large language model system according to any one of claims 1 to 6, characterized in that: The dynamic merging algorithm module further includes one or more of the following: Hyperfile creation mechanism, which is used to dynamically merge the contents of multiple small financial files into a single hyperfile, so as to reduce the memory usage of the master node and improve the system's management efficiency of massive small financial files; Metadata information extraction means, used to extract metadata information from each small financial file, such as file name, size, etc., and establish a mapping relationship with the hyperfile for retrieval end management and indexing; Memory optimization technology, which reduces the memory load of a single master node by merging small files into super files. It is suitable for managing more than 10 million small financial files. Hyperfile maintenance strategies, including regular inspection and reorganization of hyperfile blocks to free up space occupied by deleted files, reduce file fragmentation, and improve storage space utilization; Dynamic tracking mechanism, used to monitor the usage status of hyperfiles, merge obsolete hyperfiles that exceed a preset threshold, generate new hyperfiles with high utilization, and update related index information; The index update mechanism is used to store the files in the package into the hyperfile after receiving the file package, and to establish a metadata index to ensure that the search end can retrieve the metadata and content information of each small file.
8. The search-enhanced intelligent financial large language model system according to any one of claims 1 to 7, characterized in that: The dynamic merging algorithm specifically includes the following steps: Construct a target optimization function based on the available space of the hyperfile, which aims to minimize the unused hyperfile space after merging. Use the group identification matrix to mark the status of the hyperfile, and realize the transformation of the dynamic addition problem of small financial files into a 0-1 target optimization problem. Design a group identification matrix to determine the order in which each small file is assigned to a super file, where each element of the matrix represents the allocation status of a small file, ensuring that each small file is assigned to at least one super file; The discrete particle swarm optimization algorithm is applied to optimize the group identification matrix through iterative calculation to ensure that all small files are added to the storage end while minimizing the available space of the hyperfile. Determine the optimal small file task adding plan, and find the optimal solution to minimize the objective function by adaptively adjusting the particle position and speed in the particle swarm; In the iterative process, each particle represents a possible small file allocation scheme, and the global optimal solution is gradually approached by updating the particle position and velocity; Using heuristic algorithms, the allocation of each small file is dynamically adjusted according to the information in the particle swarm to ensure the effectiveness and feasibility of the allocation plan; Complete dynamic merging of small files to form super files, optimize the use of storage space, reduce memory load, and improve storage efficiency.
9. The search-enhanced intelligent financial large language model system according to any one of claims 1 to 8, characterized in that: The meta-information extraction algorithm module based on the Transformer architecture includes the following processing: Input sentence representation: The input sentence is represented as a set of embedding vectors of characters, where each character is represented by a d-dimensional vector to capture its semantic features; Decomposition matrix construction: decompose the sentence matrix into three matrices: query (Q), key (K), and value (V), which are used for subsequent attention mechanism calculation; Attention mechanism calculation: Use the attention mechanism to calculate the correlation between any character vector and all other character vectors in the sentence, and normalize the correlation coefficient through the Softmax function to determine the strength of the association between characters; Multi-head attention processing: Implement a multi-head attention mechanism. By processing multiple attention heads in parallel, each head focuses on different types of semantic information, enhancing the model's understanding of complex semantics. Relevance metric fusion: Incorporating pre-computed relevance scores as additional attention weights into the Transformer architecture, adjusting the activation values of hidden layer nodes to dynamically perceive and enhance sentence components that are highly relevant to user queries; Multi-head attention matrix generation: The outputs of multiple attention heads are combined and linearly transformed to obtain a character embedding representation with the same dimension as the original character; Feedforward Network FFN: A feedforward network using ReLU activation function expands and compresses the sentence representation dimension, increasing the nonlinear expression capability of the model; Information integration and updating: Add the output of FFN to the original sentence representation, perform residual connection and layer normalization to maintain context integrity and enhance information integration; Semantic relevance ranking: Combines the relevance of sentences and user query content to rank all retrieved texts by semantic relevance to determine the information most closely related to the query; Highly relevant content retention: Based on the calculated semantic relevance score, highly relevant sentences or content fragments are retained as the result of meta-information extraction.
10. The search-enhanced intelligent financial large language model system according to any one of claims 1 to 9, characterized in that: The explainable answer generation module includes the following processing: Collect and build a dataset containing question-answer data pairs in the financial field; Based on the large language model, we implement targeted fine-tuning strategies to optimize the model's ability to understand and generate financial data; Using a meta-information guided mechanism, the extracted meta-information related to the user's question is combined with the original question and input into the model; Use real-world meta-information to ensure that the answers output by the model are highly supported and credible, and avoid imaginary content or false information; Define a conditional probability distribution function to describe the probability of the model getting an answer given a user's question and its highly relevant meta-information; With the help of attention mechanism, memory network and cross-modal fusion technology, the model can fully understand and integrate the information sources of questions and summaries; Generate accurate and authoritative financial answers.
Citation Information
Cited By
Illusion mitigation method and device for error premise
CN119398181A
Multi-document question and answer method and device based on multi-head self-attention and hierarchical enhancement
CN119537559A
Question and answer method and device, equipment, medium and program product
CN120821815A
Financial customer service RAG knowledge base updating method and device and storage medium
CN121882192A
Retrieval Augmentation and Generation Methods and Systems for Knowledge Management
TWI934791B
