diff --git a/docs/docs/application/started_tutorial/chat_financial_report.md b/docs/docs/application/started_tutorial/chat_financial_report.md index 78439670a..7d7afbbd5 100644 --- a/docs/docs/application/started_tutorial/chat_financial_report.md +++ b/docs/docs/application/started_tutorial/chat_financial_report.md @@ -1,15 +1,32 @@ # Chat With Financial Report -# Description + + Recently, financial analysis with the help of large models is becoming a popular application in vertical fields. Large models can not only understand complex financial rules more accurately than humans, but can also output reasonable analysis results based on professional knowledge. Many cutting-edge solutions have provided answers such as RAG and Agent. However, financial statement information is large and complex, and the accuracy of data analysis is extremely high. It is difficult for general solutions to meet these needs. + +For example, when a user queries "What is the operating net profit of XXX subsidiary in 2022?", the conventional method is to recall the most relevant text blocks for summary and question and answer through knowledge vector similarity retrieval and matching. However, the annual financial report contains many relevant information that may lead to misjudgment. If you cannot accurately recall and understand the correct part, it is easy to generate wrong answers. + +In order to overcome some obstacles in the application of large models, we need to combine the knowledge background in the financial field and add specialized external modules to enhance its functions. This article will take DB-GPT's Awel orchestration mode as an example, and use several key atoms of DB-GPT-Hub to describe how to use large models to conduct effective financial report data analysis. + +# How to Use Upload financial report pdf and chat with financial report + scene1:ask base info for financial report -![base_info_chat](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/3091aa7b-b2e5-4f95-ba63-182bfa902039) -scene2:calculate financial indicator for financial report -![fin_indicator_chat](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/b0926d30-11af-4080-b2f7-2c6fcf895d58) +

+ +

+ +scene2:calculate financial indicator for financial report +

+ +

+scene3:analyze financial report +

+ +

-# How Has This Been Tested? +# How to Install Step 1: upgrade `knowledge_space` ```sql @@ -22,25 +39,39 @@ Step 2: upgrade python dependencies pip install pdfplumber pip install fuzzywuzzy ``` +Step 3: install financial report app from dbgpts +``` +# install poetry +pip install poetry +# install financial report knowledge process pipeline workflow +dbgpt app install financial-report-knowledge-factory + +# install financial report chat pipeline workflow +dbgpt app install financial-robot-app +``` + +Step4: +download pre_trained embedding model from https://www.modelscope.cn/models/AI-ModelScope/bge-large-zh-v1.5 +``` +git clone https://www.modelscope.cn/models/AI-ModelScope/bge-large-zh-v1.5 +``` -Step3: -download classifier pre_trained model from https://huggingface.co/luchun/bge_fin_intent_large_zh_v1.5/tree/main -download pkl classifier model from`DB-GPT/docker/examples/fin_report/model/logistic_regression_model.pkl` -and set in `.env` ``` #*******************************************************************# #** FINANCIAL CHAT Config **# #*******************************************************************# -FIN_REPORT_MODEL=/app/model/bge_fin_intent_large_zh_v1.5 -FIN_CLASSIFIER_PKL=DB-GPT/docker/examples/fin_report/model/logistic_regression_model.pkl +FIN_REPORT_MODEL=/app/DB-GPT/models/bge-large-zh-v1.5 ``` Step 4: restart dbgpt_server -Step 5: create financial report knowledge space -![financial_space](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/77b642aa-0c38-416c-8809-9cfce130140f) +Step 5: create FinancialReport knowledge space +![image](https://github.com/user-attachments/assets/90d938f0-e09f-49f2-8f8b-fa69ef6f8ae6) + Step 6: upload financial report from `docker/examples/fin_report` ![upload_report](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/4630f226-4bd6-4645-858a-bd3cde4e4789) Step 7: automatic segment and wait for a while ![process_log](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/0506dd86-4089-4ba4-8589-b617afc0eafe) Step 8: chat with financial report + +