Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 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
88 changes: 30 additions & 58 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 Down
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
77 changes: 77 additions & 0 deletions SearchQnA/docker_compose/intel/cpu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# SearchQnA Application

Search Question and Answering (SearchQnA) harnesses the synergy between search engines, like Google Search, and large language models (LLMs) to enhance QA quality. While LLMs excel at general knowledge, they face limitations in accessing real-time or specific details due to their reliance on prior training data. By integrating a search engine, SearchQnA bridges this gap.

Operating within the LangChain framework, the Google Search QnA chatbot mimics human behavior by iteratively searching, selecting, and synthesizing information. Here's how it works:

- Diverse Search Queries: The system employs an LLM to generate multiple search queries from a single prompt, ensuring a wide range of query terms essential for comprehensive results.

- Parallel Search Execution: Queries are executed simultaneously, accelerating data collection. This concurrent approach enables the bot to 'read' multiple pages concurrently, a unique advantage of AI.

- Top Link Prioritization: Algorithms identify top K links for each query, and the bot scrapes full page content in parallel. This prioritization ensures the extraction of the most relevant information.

- Efficient Data Indexing: Extracted data is meticulously indexed into a dedicated vector store (Chroma DB), optimizing retrieval and comparison in subsequent steps.

- Contextual Result Matching: The bot matches original search queries with relevant documents stored in the vector store, presenting users with accurate and contextually appropriate results.

By integrating search capabilities with LLMs within the LangChain framework, this Google Search QnA chatbot delivers comprehensive and precise answers, akin to human search behavior.

## Table of contents

1. [Architecture](#architecture)
2. [Deployment Options](#deployment-options)

## Architecture

The architecture of the SearchQnA Application is illustrated below:

![architecture](./assets/img/searchqna.png)

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
%% Orange are microservices from third parties that are 'wrapped' as OPEA components.
flowchart LR
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
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.

## Deployment Options

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) |
Comment thread
edlee123 marked this conversation as resolved.
Outdated
| | 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) |
Comment thread
edlee123 marked this conversation as resolved.
Outdated
Comment thread
edlee123 marked this conversation as resolved.
Outdated
Loading