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: AgentQnA/README.md
+51-25Lines changed: 51 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,17 +81,13 @@ flowchart LR
81
81
3. Hierarchical agent can further improve performance.
82
82
Expert worker agents, such as retrieval agent, knowledge graph agent, SQL agent, etc., can provide high-quality output for different aspects of a complex query, and the supervisor agent can aggregate the information together to provide a comprehensive answer.
83
83
84
-
### Roadmap
84
+
##Deployment with docker
85
85
86
-
- v0.9: Worker agent uses open-source websearch tool (duckduckgo), agents use OpenAI GPT-4o-mini as llm backend.
87
-
- v1.0: Worker agent uses OPEA retrieval megaservice as tool.
88
-
- v1.0 or later: agents use open-source llm backend.
89
-
- v1.1 or later: add safeguards
86
+
1. Build agent docker image
90
87
91
-
## Getting started
88
+
Note: this is optional. The docker images will be automatically pulled when running the docker compose commands. This step is only needed if pulling images failed.
In this example, we will use some of the mock APIs provided in the Meta CRAG KDD Challenge to demonstrate the benefits of gaining additional context from mock knowledge graphs.
111
-
112
-
```
113
-
docker run -d -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
export HF_CACHE_DIR=<directory-where-llms-are-downloaded> #so that no need to redownload every time
120
+
121
+
# optional: OPANAI_API_KEY if you want to use OpenAI models
129
122
export OPENAI_API_KEY=<your-openai-key>
130
123
```
131
124
132
-
4. Launch agent services</br>
133
-
The configurations of the supervisor agent and the worker agent are defined in the docker-compose yaml file. We currently use openAI GPT-4o-mini as LLM, and we plan to add support for llama3.1-70B-instruct (served by TGI-Gaudi) in a subsequent release.
134
-
To use openai llm, run command below.
125
+
3. Deploy the retrieval tool (i.e., DocIndexRetriever mega-service)
126
+
127
+
First, launch the mega-service.
128
+
129
+
```
130
+
cd $WORKDIR/GenAIExamples/AgentQnA/retrieval_tool
131
+
bash launch_retrieval_tool.sh
132
+
```
133
+
134
+
Then, ingest data into the vector database. Here we provide an example. You can ingest your own data.
135
+
136
+
```
137
+
bash run_ingest_data.sh
138
+
```
139
+
140
+
4. Launch other tools. </br>
141
+
In this example, we will use some of the mock APIs provided in the Meta CRAG KDD Challenge to demonstrate the benefits of gaining additional context from mock knowledge graphs.
142
+
143
+
```
144
+
docker run -d -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
145
+
```
146
+
147
+
5. Launch agent services</br>
148
+
We provide two options for `llm_engine` of the agents: 1. open-source LLMs, 2. OpenAI models via API calls.
149
+
150
+
To use open-source LLMs on Gaudi2, run commands below.
151
+
152
+
```
153
+
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/hpu/gaudi
154
+
bash launch_tgi_gaudi.sh
155
+
bash launch_agent_service_tgi_gaudi.sh
156
+
```
157
+
158
+
To use OpenAI models, run commands below.
135
159
136
160
```
137
-
cd docker_compose/intel/cpu/xeon
161
+
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/cpu/xeon
138
162
bash launch_agent_service_openai.sh
139
163
```
140
164
@@ -143,10 +167,12 @@ flowchart LR
143
167
First look at logs of the agent docker containers:
You can take a look at the tools yaml and python files in this example. For more details, please refer to the "Provide your own tools" section in the instructions [here](https://github.com/opea-project/GenAIComps/tree/main/comps/agent/langchain/README.md#5-customize-agent-strategy).
199
+
You can take a look at the tools yaml and python files in this example. For more details, please refer to the "Provide your own tools" section in the instructions [here](https://github.com/opea-project/GenAIComps/tree/main/comps/agent/langchain/README.md).
We deploy the retrieval tool on Xeon. For LLMs, we support OpenAI models via API calls. For instructions on using open-source LLMs, please refer to the deployment guide [here](../../../../README.md).
0 commit comments