Agents for Question and Answering Application

Table of contents

  1. Build Service Docker Image

  2. Build UI Docker Image

  3. Generate a HuggingFace Access Token

  4. Monitor and Tracing

Build Service Docker Image

To construct the Megaservice of AgentQnA, the GenAIExamples repository is utilized. Build service Docker image via command below:

git clone https://github.com/opea-project/GenAIExamples.git
cd GenAIExamples/AgentQnA/docker_image_build
git clone https://github.com/opea-project/GenAIComps.git
# build for Intel Gaudi
service_list="vllm-gaudi agent agent-ui"
# build for AMD ROCm
service_list="vllm-rocm agent agent-ui"
docker compose -f build.yaml build ${service_list} --no-cache

You also need to build DocIndexRetriever docker images:

cd GenAIExamples/DocIndexRetriever/docker_image_build/
git clone https://github.com/opea-project/GenAIComps.git
service_list="doc-index-retriever dataprep embedding retriever reranking"
docker compose -f build.yaml build ${service_list} --no-cache

Build UI Docker Image

Build frontend Docker image via below command:

cd GenAIExamples/AgentQnA/ui
docker build -t opea/AgentQnA-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .

Generate a HuggingFace Access Token

Some HuggingFace resources, such as some models, are only accessible if the developer have an access token. In the absence of a HuggingFace access token, the developer can create one by first creating an account by following the steps provided at HuggingFace and then generating a user access token.

Monitor and Tracing

Follow OpenTelemetry OPEA Guide to understand how to use OpenTelemetry tracing and metrics in OPEA.
For AgentQnA specific tracing and metrics monitoring, follow OpenTelemetry on AgentQnA section.