laitimes

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

author:InfoQ

Author | Plain

Curated | FCon Global Fintech Conference

Proofreading | Huang Wenxi

Guest|Hirano, Head of the Artificial Intelligence Department of Tianhong Fund

Editor|Huang Wenxi

In recent years, with the deepening of the country's attention to the field of "science and technology finance", Tianhong Fund has continued to carry out independent research and development and innovation in large models with its years of accumulated technology development capabilities and rich industry experience. According to the latest industry data analysis, Tianhong Fund's financial big data model has made significant progress in key indicators such as industry analysis, depth of problem solving, and timeliness of financial data, and has been successfully applied to investment research and sales strategies, showing excellent results and leading technical strength.

AI Agent is an important technology in the field of artificial intelligence, which is able to simulate the intelligent behavior of humans and perform various tasks. In practice, however, AI Agents face a number of challenges. How to make decisions in complex environments, process data efficiently, and deeply explore the development and practice of AI Agent have become one of the important topics in the field of artificial intelligence.

At the ArchSummit held in Shenzhen recently, Hirano, head of Tianhong Fund's algorithm team, shared the AI Agent based on large models developed by his team in the financial industry, as well as the core technology of AI Agent and practical application cases in the financial field. Through deep learning and natural language processing technology, AI Agent can understand and generate human language, thereby realizing natural dialogue with customers, providing financial advice, and providing investment decision-making assistance, injecting new impetus into the innovation and development of the financial industry.

On August 16-17, FCon Global Fintech Conference will be held in Shanghai. This year's conference is an official partner of the CAICT Foundry Program, which will invite experts from domestic and foreign financial institutions and fintech companies to share their practical experience and in-depth insights. Ji Han, Head of Technology of Ant Group's Investment Research Branch, will bring "The Application Practice of Multi-agent Collaborative Paradigm in the Financial Industry", and Dr. Bao Jie, Chairman and Founder of Wenyin Internet, will share how enterprises can "Lean Build Financial Expert Agents...... More speech topics are being recruited, click the link to view the current topic schedule and submit the topic: https://fcon.infoq.cn/2024/shanghai/

The following is the full text of Hirano's sharing (edited by InfoQ without changing the original meaning)

The development status of large models

The emergence of large models has gone through a stage of development from excitement, to questioning, to rational treatment.

When it comes to AI Agent, it is actually an agent technology based on large models. Large models have been in the spotlight since the end of 2022 and are now becoming more and more popular and competitive.

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

In the first stage, the emergence of large models is very exciting, ChatGPT has accumulated 1 million users within five days of its launch, and reached 200 million users within two months, breaking the growth rate of all app users in history. Subsequently, major domestic manufacturers also began to enter this field and fully invested in AI, and many companies engaged in large models sprung up like mushrooms after a rain, all involved in this industry, and at that time it was common to hear "all in AI".

This is followed by the questioning phase. Media reports are full of news, some saying that huge computing power is needed in the AIGC era, and some saying that Stanford's Alpaca model can train our own large model for only $100. This incident has also sparked controversy among the public, who question that large models often talk nonsense in a serious way, which is also known as "hallucination". In addition, many companies and research institutions have invested a lot of computing resources and talent resources, but the real landing scenarios are still being explored, and no very good application scenarios of new technologies have been found. At this time, some people also questioned whether the cost of large models was too high? Is it hard to find relevant talent?

Moreover, with the continuous improvement of the regulatory system, the requirements for the ethics and related safety and compliance of large models are also getting higher and higher. Now the development of large models has entered a rational stage. According to the sampling survey of all employees of Tianhong Fund, it was found that about 25.7% of users are basically inseparable from the large model, and this data is still growing. In the future, large models will be more and more widely used in all walks of life.

How AI Agents are being used in the financial industry

When it comes to applying AI Agents in the financial industry, there are three first questions to consider:

The first issue is resources and talent. As a financial company, when it started to make large models, it did not have a lot of resources and talents like some big technology companies. The density and total amount of talent and resources are limited, and it is necessary to invest selectively and decide which projects to stick to and which to abandon. For example, digital humans may be useful in many companies in the sales field, but they are not very helpful to the business of finance, so we discard this kind of seemingly lofty technology.

The second issue is the way R&D is conducted. Should a financial company directly purchase a model from a third-party vendor for use? However, in many financial use cases, it is not feasible to use a large model of a third party. Therefore, Tianhong is more independent research and development.

The third issue is computing power. Is the financial industry going to apply AI Agent? Financial companies are often worried about the excessive investment in computing power, such as ChatGPT, which spends at least tens of millions of dollars on computing power every month. Do financial companies need thousands of GPU cards to develop their AI Agent? However, after exploration, it was found that a useful and effective model can be made at a small cost.

It's also important to understand that big models don't solve all the problems, and that big models are just a tool to improve productivity. It can be just a gun, but if you can understand the business in a specific scenario and then train and optimize the large model, then it can become a sniper rifle that accurately grasps market opportunities, which will be much better than ordinary large models.

Why and why AI Agents are being used in the financial industry

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

In the financial industry, for example, there are a lot of problems for different roles. As a fund manager, you have to read a lot of information every morning, what should you do if you can't finish it? As a trader, what should I do if I suddenly find that the PV sector is rising and want to know the reason or related news? As an operations manager, what should I do if I find a hot spot and want to quickly seize the market opportunity and take the lead in releasing relevant marketing materials? These problems may seem simple, but they cannot be completely solved by large models.

This is where the Al Agent comes into play. It can provide real-time data in various scenarios and solve the problem of lack of timeliness in training methods in traditional methods. So, what is Al Agent?

Agent is an entity that can make decisions and take actions to achieve a certain goal, and Al Agent mainly relies on the LLM model and specific business scenarios to call the corresponding tools to complete the task goal, in short, large model + plug-in + execution process = Agent. If it is extended to agents, then it also needs to be reflected, environment perception and so on. By applying AI Agents, we are able to solve problems in specific scenarios.

接下来简单介绍一下 AI Agent 的组成部分。 AI Agent 主要有四个分支:Memory、Tools、Planning 和 Action。

Memory is divided into long-term memory and short-term memory. Short-term memory is used to perceive the current state of occurrence in order to make instant decisions. Long-term memory stores some data and content in a database or memory system for later query. After querying, you can make pre-adjustments to make corresponding actions.

The Tools module is the algorithm and method used by the Agent to process and analyze data, make inferences, and make decisions. Tools connects the model to the outside world, allowing the model to perceive the world and the model to change the external state by using tools. Using tools in the financial sector, we can mainly give the model the ability to perceive real-time changes in the financial market. For example, if you want to look up the data of a fund, or look up the purchase data of a user in marketing, you need to call the corresponding query API, which we call Chat BI. Tools determines what APIs you need to use. The Tools section provides the core capabilities of the Agent to process information and perform tasks.

The Planning module is responsible for developing long-term and short-term action plans based on current goals and environmental conditions. This includes planning that takes into account uncertainties and possibilities, and how to effectively achieve the goals set. Planning enables agents to act in a structured manner in a complex and dynamic environment. For example, if I'm writing an outline, Planning will tell me what to do in the first step, what to do in the second step, and so on. Or, when writing marketing copy, it maps out a logical sequence to ensure that the steps are methodical. In addition, there is the Chain of Thought (COT), which is also part of Planning.

The Action module involves the Agent selecting and performing specific actions or actions based on the plan and the current state of the environment. This is how the Agent interacts with the outside world, performing actions to achieve its goals and tasks. By executing the steps of the Planning plan, combined with the perceptual information, the appropriate tools are invoked to achieve the final action goal.

So, what problems can Al Agent solve in the financial sector? Its most important application scenario in the financial field is the interaction of unified data interaction forms and diverse data types.

At the heart of Al Agent's application is data and interactions. The goal of Al Agent is to interact with data of different modalities and structures and present it to the user in a conversational way (e.g., ChatGPT) through simple and intuitive tool calls.

Therefore, in the application scenarios in the financial field, there are several important sections:

The first is the search API. Like the new Bing that you may be familiar with, these platforms now use real-time retrieval combined with large models. In the financial field, it is often necessary to query various fund data, transaction data or real-time market data.

The second is multimodal interaction. In many areas, multimodal interaction is important. For example, in scenarios such as video creation, marketing copywriting, and financial statements, multimodal interaction can more intuitively present complex data and improve user experience.

In addition, there is ChatBI and tool interaction, which depends on the specific operation we need to perform and the tools we need to call in each business scenario, and then display the results through the user interface for a user interface interaction.

Tianhong Fund's experience in applying Al Agent

Financial Analysis Model Framework

Here is a brief introduction to our team's large financial analysis model based on the modified Retrieval-Augmented-Generation based Agent framework.

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

The first is a framework that we call Modified RAG, a framework that combines real-time retrieval with large models. This framework is becoming more and more popular in 2024, and many large model companies will choose to extend on this framework. In fact, we started experimenting with this framework at the beginning of 2023 because it does not require high computing resources and has a real-time effect. So we've improved on the RAG and divided it into several modules:

1. Rewrite: The knowledge section obtained after retrieval is in the part of recall, we rewrite the traditional RAG, improve it according to the Agent's ideas, first analyze and think from multiple angles, and then disassemble the problem, rewrite the problem, and call the tool under each analysis perspective. We'll rewrite the questions so that the larger model can better understand and answer the questions. For example, we will break down a complex problem into multiple subtasks, and plan on top of these subtasks, i.e., planning. After planning, if necessary, it will be rewritten twice, and then retrieved from the planned content + called by financial instruments.

There are a lot of complex issues in the financial world. For example, which countries have had to lower interest rates because of the economic downturn, which has led to the healthy development of the entire country's economy? Such a question cannot be answered by searching directly on Baidu or Google. So in this case, you need to rewrite this content, turn it into a submodule, search for each submodule, and then use the large model to summarize.

2. Retrieve: Multiple recalls + multiple triggers + multiple index scoring. For example, ask a question and search first, rather than answering it directly with a large model. The search includes searching the Internet content and Tianhong Fund's own content library, so that it can not only obtain real-time data published on the Internet, data within Tianhong Fund, market views of professional researchers, and this internal corpus accumulated by themselves.

3. Read: i.e. induction and summarization. We will get a lot of information through the rewritten question retrieval, sort and reason the information obtained, and finally get a summary answer, which is what I call reasoning. Tianhong Fund uses multi-slot inference, which is used to carry out large model inference in multiple sub-tasks at the same time, and finally gives a summary.

Framework innovation

In the process of designing the large model, we also made some innovations. For example, we often say COT, that is, the Chain of Thought, on this basis, we have made improvements on this basis, calling it COM, which is to turn Thought into Mind. COM means to break down a complex problem about finance into sub-problems. Through many attempts, we have found that some basic large models, although the answers to the financial questions you ask are correct, are not what we want. As a professional financial researcher, I hope to get professional answers. In this case, what is needed is not an ordinary, correct answer, but an answer that can help make the right decision.

So we innovated COM to help us build this big model with this mindset of researchers and fund managers, so that the big model also has this kind of research thinking.

Next, I'm going to introduce some of the recall strategies that we do after the retrieval. After the search is complete, we will develop a recall strategy. For example, we use multi-way recalls and multi-condition triggers. Understanding user intent is not limited to keyword matching, but also involves timeliness and semantic understanding. We use a variety of indexing methods, including vector indexing, keyword matching (e.g., BERTSpan), entity recognition (NER), and more.

In addition, in the coarse stage, we optimized the filtering model for relevance. In the recall module, in addition to the data retrieved in real time, we also integrate internal data. This internal data is connected through a Knowledge Graph (KB) system, allowing Al Agent's responses to be more biased towards researchers' research. We combine the industrial chain system to ensure a comprehensive understanding of the upstream and downstream relationships of the industry. For example, when we want to analyze the photovoltaic industry, we need to understand its upstream and downstream suppliers, complete supply chain and product undertakers. How can this data be combined and accurately appear in the answers of financial practitioners? We did KB content building. The first is to open up the upstream and downstream data of the industrial chain. We will automatically process a part of the unchanged market data, such as the company's industry indicators, and present them objectively. In addition, we have also incorporated each sub-module into the abnormal monitoring model for some changing data, such as the opinions of some analysts and the changes of various industries, to ensure that these dynamic data can also be reflected in the answers of the large model in a timely manner.

With these improvements, we've seen a significant improvement in results. In the financial field, we will find that the AI agent based on large models developed by our team in the financial industry is almost on par with ChatGPT, and we will even answer better in some scenarios because we have been specially trained for the financial field.

We've actually made several versions of the reference. Now our reference has a few key points. One is to make sure that the output is all source-traceable and really needed. We will include a reference in the answer, indicating the source of each sentence, whether it is from our knowledge base or publicly available content online, it will be clearly labeled, and the final data source can be viewed.

Interpretation of large-scale model products

Finally, let's introduce the products of Tianhong Fund. What I just mentioned may be some technical details, in terms of products, Tianhong Fund has released about seven to eight large model-related products internally, and these products have not yet been released to the public. To sum up, what can a large model do in a day? Use a timeline to string together the entire large model of products, for example, if a research fund manager comes to our company in the morning, he may need to browse various research reports. At this time, we have a product called Zhihui, which allows researchers to quickly browse the latest research reports in the market and filter out the content they are interested in. The advantage of Tianhong model is that when summarizing the research report or PDF, if the investment field is involved, the large model can identify the investment targets mentioned in the article, such as the recent AI healthcare, AI office, AI law and other fields. This is something that the researcher is very concerned about.

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

We have also trained different research report summary templates according to different research report types, such as industry analysis, market strategy, and macro interpretation. Secondly, as researchers, when we browse gold news in the morning, we make further interpretations based on research reports, and we release smart reading products to interpret and ask questions specifically for specific research reports. That is, when you see an article that interests you in particular and you want to read it in depth, then open our system, you can ask questions and compare multiple articles to read.

Tianhong Fund: A new application of AI Agent in financial scenarios|FCon

Next is the "Hong Xiaozhu" section, which is one of our cores, covering industry research, market analysis and financial knowledge Q&A and other aspects of special training, in market performance, industry analysis, hot spot interpretation and other aspects are quite good. Our in-house product integrates a variety of publicly available research reports and publicly available third-party data sources, as well as in-house fund managers' perspectives. For example, if you ask this large-scale product, "Can the PV industry buy now?" "We then used our own original COM to incorporate the researcher's mindset and provide answers for the investment research role through intent analysis, giving the questioner at least an idea of the recent market performance of the PV industry. Not only limited to these Q&A, "Hongxiaozhu" will also provide industry indicators such as the photovoltaic index, and at the same time integrate information from the industry chain to explain the reasons behind each abnormal point, and analyze these abnormal points in depth. Next up is the "reference", which is what we mentioned, and you can see the source of each piece of content. In addition, we also integrate the large model into the industrial chain system, and use Hongxiaozhu to interpret the industrial chain changes, hot spot mining, etc., so as to make the industrial chain more intelligent, especially in the detection of changes, the effect is significantly better than the previous application of small models.

In addition to the implementation of the above applications, we have also carried out some possible exploratory work, including the use of large models to mine quantitative factors in finance. We have been thinking about whether large models can help us solve the problem of factor mining in investment. In the past, there were several large foreign fund companies that specially excavated a number of very powerful "big bulls" from private equity funds for the work of mining factors of large models. Tianhong Fund was also making a similar attempt at that time, whether this was feasible and whether it could be realized. We conducted a series of experiments, several of which were our own innovative approaches. After testing in the CSI 300 stock pool, we found that compared to our regular word count 101 algorithm or the recently popular reinforcement learning mining factor, the large model is very effective, and our information coefficient (IC) reaches 0.0326, which is even better than the reinforcement learning we have tried so far. Theoretically, if there are many factors that need to be combined, this is actually a brute-force solving process that is difficult for a computer to complete. However, if you can use the big model way of thinking and exclude some unnecessary combinations through some logical form, you can significantly narrow the scope of the final search.

Regarding the financial model, Tianhong Foundation has always adhered to business orientation, pragmatic innovation. Always adhere to technology leadership and forward-looking exploration. Always adhere to innovation and cooperation to create value together. Always adhere to compliance operations and be fearful of risks. Always adhere to cost-effective and precise investment.

Original link: Tianhong Fund: The new application of AI Agent in the financial scene|FCon_ Securities_InfoQ Selected articles

Read on