mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-30 15:21:02 +00:00
feat:add financial report how to use doc. (#1757)
This commit is contained in:
parent
78c912fd29
commit
d754168ede
@ -1,10 +1,20 @@
|
||||
# Chat With Financial Report
|
||||
|
||||
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.
|
||||
# Chat With Financial Report
|
||||
Financial report analysis using 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.
|
||||
|
||||
Using AWEL to build a financial report knowledge building workflow and a financial report intelligent Q&A workflow app can help users
|
||||
- answer basic information questions about financial reports
|
||||
- financial report indicator calculation and analysis questions
|
||||
- financial report content analysis questions.
|
||||
|
||||
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.
|
||||
#### financial report knowledge building workflow
|
||||
<p align="left">
|
||||
<img src={'/img/chat_knowledge/fin_report/knowledge_workflow.png'} width="1000px"/>
|
||||
</p>
|
||||
|
||||
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.
|
||||
#### a financial report intelligent robot workflow
|
||||
<p align="left">
|
||||
<img src={'/img/chat_knowledge/fin_report/financial_robot_chat.png'} width="1000px"/>
|
||||
</p>
|
||||
|
||||
# How to Use
|
||||
Upload financial report pdf and chat with financial report
|
||||
@ -29,12 +39,13 @@ scene3:analyze financial report
|
||||
# How to Install
|
||||
|
||||
Step 1: make sure your dbgpt version is >=0.5.10
|
||||
```
|
||||
|
||||
Step 2: upgrade python dependencies
|
||||
```
|
||||
pip install pdfplumber
|
||||
pip install fuzzywuzzy
|
||||
```
|
||||
|
||||
Step 3: install financial report app from dbgpts
|
||||
```
|
||||
# install poetry
|
||||
@ -45,8 +56,7 @@ dbgpt app install financial-robot-app financial-report-knowledge-factory
|
||||
|
||||
```
|
||||
|
||||
Step4:
|
||||
download pre_trained embedding model from https://www.modelscope.cn/models/AI-ModelScope/bge-large-zh-v1.5
|
||||
Step 4: 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
|
||||
```
|
||||
@ -58,14 +68,22 @@ git clone https://www.modelscope.cn/models/AI-ModelScope/bge-large-zh-v1.5
|
||||
FIN_REPORT_MODEL=/app/DB-GPT/models/bge-large-zh-v1.5
|
||||
```
|
||||
|
||||
Step 4: create FinancialReport knowledge space
|
||||

|
||||
Step 5: create knowledge space, choose `FinancialReport` doamin type
|
||||
<p align="left">
|
||||
<img src={'/img/chat_knowledge/fin_report/financial_space.png'} width="1000px"/>
|
||||
</p>
|
||||
|
||||
Step 5: upload financial report from `docker/examples/fin_report`
|
||||

|
||||
Step 6: automatic segment and wait for a while
|
||||

|
||||
Step 7: chat with financial report
|
||||
|
||||
Step 6: upload financial report from `docker/examples/fin_report`, if your want to use the financial report dataset, you can download from modelscope.
|
||||
```bash
|
||||
git clone http://www.modelscope.cn/datasets/modelscope/chatglm_llm_fintech_raw_dataset.git
|
||||
```
|
||||
Step 7: automatic segment and wait for a while
|
||||
|
||||
Step 8: chat with financial report
|
||||
<p align="left">
|
||||
<img src={'/img/chat_knowledge/fin_report/chat.jpg'} width="1000px"/>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
@ -85,8 +85,8 @@ vector_store = ChromaStore(
|
||||
vector_store_config=ChromaVectorConfig(
|
||||
name="test_vstore",
|
||||
persist_path="/tmp/awel_rag_test_vector_store",
|
||||
),
|
||||
embedding_fn=embeddings
|
||||
embedding_fn=embeddings
|
||||
)
|
||||
)
|
||||
|
||||
with DAG("load_knowledge_dag") as knowledge_dag:
|
||||
@ -275,8 +275,8 @@ vector_store = ChromaStore(
|
||||
vector_store_config=ChromaVectorConfig(
|
||||
name="test_vstore",
|
||||
persist_path="/tmp/awel_rag_test_vector_store",
|
||||
embedding_fn=embeddings
|
||||
),
|
||||
embedding_fn=embeddings
|
||||
)
|
||||
|
||||
with DAG("load_knowledge_dag") as knowledge_dag:
|
||||
|
BIN
docs/static/img/chat_knowledge/fin_report/chat.jpg
vendored
Normal file
BIN
docs/static/img/chat_knowledge/fin_report/chat.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 204 KiB |
BIN
docs/static/img/chat_knowledge/fin_report/financial_robot_chat.png
vendored
Normal file
BIN
docs/static/img/chat_knowledge/fin_report/financial_robot_chat.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 KiB |
Binary file not shown.
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 178 KiB |
BIN
docs/static/img/chat_knowledge/fin_report/knowledge_workflow.png
vendored
Normal file
BIN
docs/static/img/chat_knowledge/fin_report/knowledge_workflow.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 319 KiB |
Loading…
Reference in New Issue
Block a user