You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FinanceAgent/README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Finance Agent Example
1
+
# Finance Agent Example
2
2
3
3
## Table of Contents
4
4
@@ -10,20 +10,20 @@
10
10
-[Deployment Options](#deployment-options)
11
11
-[Contribution](#contribution)
12
12
13
-
14
-
15
13
## Overview
16
14
17
15
The Finance Agent example showcases a hierarchical multi-agent system designed to assist users with financial document processing and analysis. It provides three main functionalities: summarizing lengthy financial documents, answering queries related to financial documents, and conducting research to generate investment reports on public companies.
18
16
19
17
Users interact with the system via a graphical user interface (UI), where requests are managed by a supervisor agent that delegates tasks to worker agents or the summarization microservice. The system supports document uploads through the UI for processing.
20
18
21
-
22
19
## Problem Motivation
20
+
23
21
Navigating and analyzing extensive financial documents can be challenging and time-consuming. Users often require concise summaries, answers to specific queries, or comprehensive investment reports. The Finance Agent addresses these needs by automating document summarization, query answering, and research tasks, thereby enhancing productivity and decision-making efficiency.
24
22
25
23
## Architecture
24
+
26
25
### High-Level Diagram
26
+
27
27
The Finance Agent system is structured as a hierarchical multi-agent architecture. User interactions are managed by a supervisor agent, which coordinates tasks among worker agents and the summarization microservice. The system supports document uploads and processing through the UI.
28
28
29
29
The architecture of this Finance Agent example is shown in the figure below. The agent is a hierarchical multi-agent system and has 3 main functions:
@@ -36,7 +36,8 @@ The user interacts with the supervisor agent through the graphical UI. The super
The architectural diagram of the `dataprep` microservice is shown below. We use [docling](https://github.com/docling-project/docling) to extract text from PDFs and URLs into markdown format. Both the full document content and tables are extracted. We then use an LLM to extract metadata from the document, including the company name, year, quarter, document type, and document title. The full document markdown then gets chunked, and LLM is used to summarize each chunk, and the summaries are embedded and saved to a vector database. Each table is also summarized by LLM and the summaries are embedded and saved to the vector database. The chunks and tables are also saved into a KV store. The pipeline is designed as such to improve retrieval accuracy of the `search_knowledge_base` tool used by the Question Answering worker agent.
@@ -55,8 +56,8 @@ The Question Answering worker agent uses `search_knowledge_base` tool to get rel
55
56
56
57

57
58
58
-
59
59
## Deployment Options
60
+
60
61
This CodeGen example can be deployed manually on various hardware platforms using Docker Compose or Kubernetes. Select the appropriate guide based on your target environment:
61
62
62
63
| Hardware | Deployment Mode | Guide Link |
@@ -65,7 +66,6 @@ This CodeGen example can be deployed manually on various hardware platforms usin
65
66
66
67
_Note: Building custom microservice images can be done using the resources in [GenAIComps](https://github.com/opea-project/GenAIComps)._
67
68
68
-
69
69
## Contribution
70
-
We welcome contributions to the OPEA project. Please refer to the contribution guidelines for more information.
71
70
71
+
We welcome contributions to the OPEA project. Please refer to the contribution guidelines for more information.
Copy file name to clipboardExpand all lines: FinanceAgent/docker_compose/intel/hpu/gaudi/README.md
+24-15Lines changed: 24 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# Deploy Finance Agent on Intel Gaudi HPU with Docker Compose
2
+
2
3
This README provides instructions for deploying the Finance Agent application using Docker Compose on systems equipped with Intel Gaudi HPUs.
3
4
4
5
## Table of Contents
@@ -14,6 +15,7 @@ This README provides instructions for deploying the Finance Agent application us
14
15
This guide focuses on running the pre-configured Finance Agent service using Docker Compose on Intel Gaudi HPUs. It leverages containers optimized for Gaudi for the LLM serving component, along with CPU-based containers for other microservices like embedding, retrieval, data preparation and the UI.
15
16
16
17
## Prerequisites
18
+
17
19
- Docker and Docker Compose installed.
18
20
- Intel Gaudi HPU(s) with the necessary drivers and software stack installed on the host system. (Refer to Intel Gaudi Documentation).
19
21
- Git installed (for cloning repository).
@@ -31,8 +33,11 @@ Clone the GenAIExamples repository:
31
33
```
32
34
33
35
## Start Deployment
36
+
34
37
This uses the default vLLM-based deployment profile (vllm-gaudi-server).
38
+
35
39
### Configure Environment
40
+
36
41
Set required environment variables in your shell:
37
42
38
43
```shell
@@ -41,12 +46,12 @@ Set required environment variables in your shell:
41
46
# Path to your model cache
42
47
export HF_CACHE_DIR="./data"
43
48
# Go to https://finnhub.io/ to get your free api key
44
-
export FINNHUB_API_KEY=<your-finnhub-api-key>
49
+
export FINNHUB_API_KEY=<your-finnhub-api-key>
45
50
# Go to https://docs.financialdatasets.ai/ to get your free api key
46
-
export FINANCIAL_DATASETS_API_KEY=<your-api-key>
51
+
export FINANCIAL_DATASETS_API_KEY=<your-api-key>
47
52
48
53
# Optional: Configure HOST_IP if needed
49
-
# Replace with your host's external IP address (do not use localhost or 127.0.0.1).
54
+
# Replace with your host's external IP address (do not use localhost or 127.0.0.1).
@@ -59,19 +64,21 @@ Set required environment variables in your shell:
59
64
Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (LLM_SERVICE_PORT, TEI_EMBEDDER_PORT, etc.) are set if not using defaults from the compose file. For instance, edit the set_env.sh to change the LLM model:
60
65
61
66
### Start Services
67
+
62
68
#### Deploy with Docker Compose
69
+
63
70
Below is the command to launch services
64
-
- vllm-gaudi-server
65
-
- tei-embedding-serving
66
-
- redis-vector-db
67
-
- redis-kv-store
68
-
- dataprep-redis-server-finance
69
-
- finqa-agent-endpoint
70
-
- research-agent-endpoint
71
-
- docsum-vllm-gaudi
72
-
- supervisor-agent-endpoint
73
-
- agent-ui
74
71
72
+
- vllm-gaudi-server
73
+
- tei-embedding-serving
74
+
- redis-vector-db
75
+
- redis-kv-store
76
+
- dataprep-redis-server-finance
77
+
- finqa-agent-endpoint
78
+
- research-agent-endpoint
79
+
- docsum-vllm-gaudi
80
+
- supervisor-agent-endpoint
81
+
- agent-ui
75
82
76
83
```shell
77
84
docker compose up -d
@@ -102,14 +109,16 @@ If deploy on Gaudi, also need to build vllm image.
Wait several minutes for models to download and services to initialize (Gaudi initialization can take time). Check container logs (docker compose logs -f <service_name>, especially vllm-gaudi-server).
0 commit comments