Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fd27ee6
Updating SearchQnA xeon with nginx component
edlee123 Apr 7, 2025
f366570
Update xeon README to use nginx, and instruction to access the UI.
edlee123 Apr 7, 2025
aa96ffe
Reverting back changes
edlee123 Apr 7, 2025
7c8ae4a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 7, 2025
b7f098f
Merge branch 'main' into searchqna_fix
edlee123 Apr 7, 2025
7d18b24
Merging README changes
edlee123 Apr 7, 2025
c8bdc04
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 7, 2025
4e13de2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 7, 2025
9720561
Update SearchQnA/docker_image_build/build.yaml file to include nginx …
edlee123 Apr 7, 2025
5f5075e
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 7, 2025
e16d9d4
Merge branch 'main' into searchqna_fix
edlee123 Apr 9, 2025
a8daf7f
Fix unneeded breaks in code blocks, and markdown title formatting
edlee123 Apr 9, 2025
dd9c32e
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 9, 2025
f52c3db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2025
57548b7
Add nginx to SearchQnA hpu compose.yaml
edlee123 Apr 11, 2025
5703ceb
Add nginx to SearchQnA amd compose.yaml
edlee123 Apr 11, 2025
20d0e5a
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 11, 2025
f9bc776
Add nginx to build_docker_images in unit tests
edlee123 Apr 11, 2025
5c34ed2
Add nginx to SearchQnA for amd rocm compose_vllm.yaml
edlee123 Apr 11, 2025
738cdca
Change playwright config so that unit testis accessing the app via ng…
edlee123 Apr 11, 2025
5fc9901
Add nginx to vllm rocm unit test
edlee123 Apr 12, 2025
8eea721
Modified SearchQnA xeon README.md to be more explicit about best prac…
edlee123 Apr 12, 2025
d69e65c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2025
5984157
Updated diagram to include nginx, and use names like the container names
edlee123 Apr 12, 2025
03d7502
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 12, 2025
ea03294
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2025
758bc8c
Format the microservice chart
edlee123 Apr 12, 2025
ef8e53a
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 Apr 12, 2025
11437ad
Generalize the SearchQnA diagram so its not xeon specific
edlee123 Apr 12, 2025
12c42cf
Merge branch 'main' into searchqna_fix
edlee123 Apr 16, 2025
50b44cb
Merge branch 'main' into searchqna_fix
edlee123 May 5, 2025
b3119be
Update the SearchQnA diagram to use nginx and container labels
edlee123 May 5, 2025
3fae551
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 5, 2025
cbbe4eb
Merge branch 'opea-project:main' into searchqna_fix
edlee123 May 7, 2025
001be5c
Merge branch 'main' into searchqna_fix
edlee123 May 9, 2025
7d281a5
Merge branch 'main' into searchqna_fix
yinghu5 May 13, 2025
d2d7793
Merge branch 'main' into searchqna_fix
yinghu5 May 14, 2025
3f6b7d6
Merge branch 'main' into searchqna_fix
xiguiw May 16, 2025
f68509c
Updated the flow diagram to include Nginx, and with container labeling
edlee123 May 19, 2025
62f9bf5
Revert back to original xeon README.md
edlee123 May 19, 2025
74428a4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 19, 2025
152c36f
Reverting back to xeon README.md
edlee123 May 19, 2025
d0d017d
Merge branch 'searchqna_fix' of github.com:edlee123/GenAIExamples int…
edlee123 May 19, 2025
b1c0850
Explicitly link to README.md of hardware implementations rather than …
edlee123 May 19, 2025
618fd75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 19, 2025
11a19ba
Merge branch 'main' into searchqna_fix
edlee123 May 19, 2025
187456b
Merge branch 'main' into searchqna_fix
yinghu5 May 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 35 additions & 63 deletions SearchQnA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,66 +30,38 @@ The architecture of the SearchQnA Application is illustrated below:
The SearchQnA example is implemented using the component-level microservices defined in [GenAIComps](https://github.com/opea-project/GenAIComps). The flow chart below shows the information flow between different microservices for this example.

```mermaid
---
config:
flowchart:
nodeSpacing: 400
rankSpacing: 100
curve: linear
themeVariables:
fontSize: 50px
---
%% Orange are microservices from third parties that are 'wrapped' as OPEA components.
flowchart LR
%% Colors %%
classDef blue fill:#ADD8E6,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
classDef orange fill:#FBAA60,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
classDef orchid fill:#C26DBC,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
classDef invisible fill:transparent,stroke:transparent;
style SearchQnA-MegaService stroke:#000000

%% Subgraphs %%
subgraph SearchQnA-MegaService["SearchQnA MegaService "]
direction LR
EM([Embedding MicroService]):::blue
RET([Web Retrieval MicroService]):::blue
RER([Rerank MicroService]):::blue
LLM([LLM MicroService]):::blue
end
subgraph UserInterface[" User Interface "]
direction LR
a([User Input Query]):::orchid
UI([UI server<br>]):::orchid
end



TEI_RER{{Reranking service<br>}}
TEI_EM{{Embedding service <br>}}
VDB{{Vector DB<br><br>}}
R_RET{{Web Retriever service <br>}}
LLM_gen{{LLM Service <br>}}
GW([SearchQnA GateWay<br>]):::orange

%% Questions interaction
direction LR
a[User Input Query] --> UI
UI --> GW
GW <==> SearchQnA-MegaService
EM ==> RET
RET ==> RER
RER ==> LLM

%% Embedding service flow
direction LR
EM <-.-> TEI_EM
RET <-.-> R_RET
RER <-.-> TEI_RER
LLM <-.-> LLM_gen

User["User"] --> Nginx["Nginx<br>searchqna-nginx-server"]
Nginx --> UI["UI<br>searchqna-ui-server"] & Gateway & User
UI --> Nginx
Gateway --> Nginx & Embedding
Embedding --> Retriever
Retriever --> Reranker
Reranker --> LLM
LLM --> Gateway
LLM <-.-> TGI_Service["LLM<br>tgi-service"]
Embedding <-.-> TEI_Embedding["TEI Embedding<br>tei-embedding-server"]
Reranker <-.-> TEI_Reranker["TEI Reranker<br>tei-reranking-server"]

TEI_Embedding:::ext
TEI_Reranker:::ext
TGI_Service:::ext

subgraph MegaService["MegaService"]
LLM["LLM<br>llm-textgen-server"]
Reranker["Reranker<br>reranking-tei-server"]
Retriever["Retriever<br>web-retriever-server"]
Embedding["Embedding<br>embedding-server"]
end
subgraph Backend["searchqna-backend-server"]
direction TB
%% Vector DB interaction
R_RET <-.-> VDB

MegaService
Gateway["Backend Endpoint"]
end
classDef default fill:#fff,stroke:#000,color:#000
classDef ext fill:#f9cb9c,stroke:#000,color:#000
style MegaService margin-top:20px,margin-bottom:20px
```

This SearchQnA use case performs Search-augmented Question Answering across multiple platforms. Currently, we provide the example for Intel® Gaudi® 2 and Intel® Xeon® Scalable Processors, and we invite contributions from other hardware vendors to expand OPEA ecosystem.
Expand All @@ -98,8 +70,8 @@ This SearchQnA use case performs Search-augmented Question Answering across mult

The table below lists the available deployment options and their implementation details for different hardware platforms.

| Category | Deployment Option | Description |
| ---------------------- | ---------------------- | -------------------------------------------------------------- |
| On-premise Deployments | Docker Compose (Xeon) | [DocSum deployment on Xeon](./docker_compose/intel/cpu/xeon) |
| | Docker Compose (Gaudi) | [DocSum deployment on Gaudi](./docker_compose/intel/hpu/gaudi) |
| | Docker Compose (ROCm) | [DocSum deployment on AMD ROCm](./docker_compose/amd/gpu/rocm) |
| Category | Deployment Option | Description |
| ---------------------- | ---------------------- | --------------------------------------------------------------------------- |
| On-premise Deployments | Docker Compose (Xeon) | [SearchQnA deployment on Xeon](./docker_compose/intel/cpu/xeon/README.md) |
| | Docker Compose (Gaudi) | [SearchQnA deployment on Gaudi](./docker_compose/intel/hpu/gaudi/README.md) |
| | Docker Compose (ROCm) | [SearchQnA deployment on AMD ROCm](./docker_compose/amd/gpu/rocm/README.md) |
20 changes: 19 additions & 1 deletion SearchQnA/docker_compose/amd/gpu/rocm/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,25 @@ services:
no_proxy: ${no_proxy}
https_proxy: ${https_proxy}
http_proxy: ${http_proxy}
BACKEND_BASE_URL: ${SEARCH_BACKEND_SERVICE_ENDPOINT}
ipc: host
restart: always
search-nginx-server:
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
container_name: search-nginx-server
depends_on:
- search-backend-server
- search-ui-server
ports:
- "${NGINX_PORT:-80}:80"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- FRONTEND_SERVICE_IP=search-ui-server
- FRONTEND_SERVICE_PORT=5173
- BACKEND_SERVICE_NAME=search
- BACKEND_SERVICE_IP=search-backend-server
- BACKEND_SERVICE_PORT=8888
ipc: host
restart: always

Expand Down
21 changes: 19 additions & 2 deletions SearchQnA/docker_compose/amd/gpu/rocm/compose_vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,27 @@ services:
no_proxy: ${no_proxy}
https_proxy: ${https_proxy}
http_proxy: ${http_proxy}
BACKEND_BASE_URL: ${SEARCH_BACKEND_SERVICE_ENDPOINT}
ipc: host
restart: always

search-nginx-server:
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
container_name: search-nginx-server
depends_on:
- search-backend-server
- search-ui-server
ports:
- "${NGINX_PORT:-80}:80"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- FRONTEND_SERVICE_IP=search-ui-server
- FRONTEND_SERVICE_PORT=5173
- BACKEND_SERVICE_NAME=search
- BACKEND_SERVICE_IP=search-backend-server
- BACKEND_SERVICE_PORT=8888
ipc: host
restart: always
networks:
default:
driver: bridge
21 changes: 19 additions & 2 deletions SearchQnA/docker_compose/intel/cpu/xeon/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,27 @@ services:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- BACKEND_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
ipc: host
restart: always

searchqna-xeon-nginx-server:
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
container_name: searchqna-xeon-nginx-server
depends_on:
- searchqna-xeon-backend-server
- searchqna-xeon-ui-server
ports:
- "${NGINX_PORT:-80}:80"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- FRONTEND_SERVICE_IP=searchqna-xeon-ui-server
- FRONTEND_SERVICE_PORT=5173
- BACKEND_SERVICE_NAME=searchqna
- BACKEND_SERVICE_IP=searchqna-xeon-backend-server
- BACKEND_SERVICE_PORT=8888
ipc: host
restart: always

networks:
default:
Expand Down
20 changes: 19 additions & 1 deletion SearchQnA/docker_compose/intel/hpu/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,25 @@ services:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- BACKEND_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
ipc: host
restart: always
searchqna-gaudi-nginx-server:
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
container_name: searchqna-gaudi-nginx-server
depends_on:
- searchqna-gaudi-backend-server
- searchqna-gaudi-ui-server
ports:
- "${NGINX_PORT:-80}:80"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- FRONTEND_SERVICE_IP=searchqna-gaudi-ui-server
- FRONTEND_SERVICE_PORT=5173
- BACKEND_SERVICE_NAME=searchqna
- BACKEND_SERVICE_IP=searchqna-gaudi-backend-server
- BACKEND_SERVICE_PORT=8888
ipc: host
restart: always

Expand Down
6 changes: 6 additions & 0 deletions SearchQnA/docker_image_build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ services:
context: GenAIComps
dockerfile: comps/third_parties/vllm/src/Dockerfile.amd_gpu
image: ${REGISTRY:-opea}/vllm-rocm:${TAG:-latest}
nginx:
build:
context: GenAIComps
dockerfile: comps/third_parties/nginx/src/Dockerfile
extends: searchqna
image: ${REGISTRY:-opea}/nginx:${TAG:-latest}
2 changes: 1 addition & 1 deletion SearchQnA/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function build_docker_images() {
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git

echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen"
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen nginx"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log

docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
Expand Down
2 changes: 1 addition & 1 deletion SearchQnA/tests/test_compose_on_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function build_docker_images() {
git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../

echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen"
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen nginx"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log

docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
Expand Down
2 changes: 1 addition & 1 deletion SearchQnA/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function build_docker_images() {
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git

echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen"
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen nginx"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log

docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
Expand Down
2 changes: 1 addition & 1 deletion SearchQnA/tests/test_compose_vllm_on_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function build_docker_images() {
git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../

echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen vllm-rocm"
service_list="searchqna searchqna-ui embedding web-retriever reranking llm-textgen vllm-rocm nginx"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log

docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
Expand Down
2 changes: 1 addition & 1 deletion SearchQnA/ui/svelte/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BACKEND_BASE_URL = 'http://backend_address:3008/v1/searchqna'
BACKEND_BASE_URL = '/v1/searchqna'
2 changes: 1 addition & 1 deletion SearchQnA/ui/svelte/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default defineConfig({
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://localhost:5173",
baseURL: "http://localhost:80",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
Expand Down