GenAIExamples icon indicating copy to clipboard operation
GenAIExamples copied to clipboard

[Doc] Update ChatQnA flow chart

Open xiguiw opened this issue 1 year ago • 2 comments

Draw flow-chat with mermaid script. make it easy to be maintained.

xiguiw avatar Aug 07 '24 07:08 xiguiw

The output flow-chart is: image

xiguiw avatar Aug 07 '24 07:08 xiguiw

Comment to review

ctao456 avatar Aug 08 '24 20:08 ctao456

Hi @xiguiw , the Retrieval microservice also need to access the Vector DB service. I think another arrow is needed.

Does Retrieval access VectorDB directly or access VectorDB via TEI Embedding service?

louie-tsai avatar Aug 21 '24 23:08 louie-tsai

updated flowchart according to wiki

---
config:
  flowchart:
    nodeSpacing: 100
    rankSpacing: 100
    curve: linear
  theme: base
  themeVariables:
    fontSize: 42px
---
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 ChatQnA-MegaService stroke:#000000
    %% Subgraphs %%
    subgraph ChatQnA-MegaService["ChatQnA-MegaService"]
        direction LR
        EM([Embedding <br>6000]):::blue
        RET([Retrieval <br>7000]):::blue
        RER([Rerank <br>8000]):::blue
        LLM([LLM <br>9000]):::blue
    end
    subgraph User Interface
        direction TB
        a([User Input Query]):::orchid
        Ingest([Ingest data]):::orchid
        UI([UI server<br>Port: 5173]):::orchid
    end
    subgraph ChatQnA GateWay
        direction LR
        invisible1[ ]:::invisible
        GW([ChatQnA GateWay<br>Port: 8888]):::orange
    end
    subgraph .
        X([Micsrservice]):::blue
        Y{{Service from industry peers}}
        Z([Gateway]):::orange
        Z1([UI]):::orchid
    end

    TEI_RER{{Reranking service<br>'TEI'<br>8808}}
    TEI_EM{{Embedding service <br>'TEI LangChain'<br>6006}}
    VDB{{Vector DB<br>'Redis'<br>8001}}
    R_RET{{Retriever service <br>'LangChain Redis'<br>7000}}
    DP([Data Preparation<br>'LangChain Redis'<br>6007]):::blue
    LLM_gen{{LLM Service <br>'TGI'<br>9009}}

    %% Data Preparation flow
    %% Ingest data flow
    direction LR
    Ingest[Ingest data] -->|a| UI
    UI -->|b| DP
    DP <-.->|c| TEI_EM

    %% Questions interaction
    direction LR
    a[User Input Query] -->|1| UI
    UI -->|2| GW
    GW <==>|3| ChatQnA-MegaService
    EM ==>|4| RET
    RET ==>|5| RER
    RER ==>|6| LLM


    %% Embedding service flow
    direction TB
    EM <-.->|3'| TEI_EM
    RET <-.->|4'| R_RET
    RER <-.->|5'| TEI_RER
    LLM <-.->|6'| LLM_gen

    direction TB
    %% Vector DB interaction
    R_RET <-.->|d|VDB
    DP <-.->|d|VDB




louie-tsai avatar Aug 23 '24 01:08 louie-tsai