flowchart TD
UI["User Interface
how do I reset password"]:::uiNode
subgraph Processing["Input Processing"]
direction TB
Norm["Text normalization"]:::procNode
Syn["Synonym expansion"]:::procNode
Embed["Embedding generation"]:::procNode
Norm --> Syn --> Embed
end
subgraph Matching["Semantic Matching"]
direction TB
Sim["Similarity calculation"]:::matchNode
Rank["Ranking algorithm"]:::matchNode
Thresh["Confidence threshold"]:::matchNode
Sim --> Rank --> Thresh
end
DB[("FAQ Database
Q and A pairs")]:::dbNode
Response["Response Delivery
Top-ranked answer"]:::respNode
Feedback{{"User Feedback
thumbs up / down"}}:::respNode
UI --> Processing
Processing --> Matching
DB -. "supplies FAQ vectors" .-> Sim
Matching -->|"confidence 0.87"| Response
Response --> Feedback
Response -. "answer shown to user" .-> UI
Feedback -.->|"improve answers"| DB
classDef uiNode fill:#7b1fa2,stroke:#4a148c,stroke-width:2px,color:#fff,font-size:14px
classDef procNode fill:#1976d2,stroke:#0d47a1,stroke-width:2px,color:#fff,font-size:14px
classDef dbNode fill:#ef6c00,stroke:#e65100,stroke-width:2px,color:#fff,font-size:14px
classDef matchNode fill:#2e7d32,stroke:#1b5e20,stroke-width:2px,color:#fff,font-size:14px
classDef respNode fill:#00897b,stroke:#00695c,stroke-width:2px,color:#fff,font-size:14px
linkStyle default stroke:#888,stroke-width:2px,font-size:14px