FlowDiagram
AI & ML pipelinesMermaid

Recommendation system architecture template

A two-stage recommender: user events feed a feature store, candidate generation retrieves items, a ranking model scores them and business rules re-rank — for ML and product engineers. This data flow diagram template contains 20 labelled components, branches such as “Yes”, “No”.

Open in the editor →
  • Free — no account, no trial, no watermark
  • Fully editable shapes and connectors, not a screenshot
  • Export PNG, SVG or PDF, or share it as a link
  • Private: the diagram never leaves your browser

Components in this data flow diagram

  • User opens app
  • Recommendation API
  • Clicks, views, purchases
  • Kafka event stream
  • Feature store: Feast
  • Data lake: interaction logs
  • Candidate generation
  • Two-tower retrieval: ANN index
  • Collaborative filtering
  • Trending & popular items
  • Merge ~1000 candidates
  • Ranking model: gradient boosted or DNN
  • Re-rank: diversity, freshness, business rules
  • Already purchased or out of stock?
  • Remove item
  • Return top 20 recommendations
  • Daily training in Spark & PyTorch
  • Offline metrics improved?
  • Deploy new model
  • Keep current model

How to use this data flow diagram template

  1. Click Open in the editor. The data flow diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
  2. Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
  3. Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
  4. Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
  5. Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.

Mermaid source

The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.

flowchart TD
  APP([User opens app]) --> API[Recommendation API]
  EVENTS[Clicks, views, purchases] --> KAFKA[Kafka event stream]
  KAFKA --> FEAT[(Feature store: Feast)]
  KAFKA --> LAKE[(Data lake: interaction logs)]
  API --> CAND[Candidate generation]
  CAND --> TT[Two-tower retrieval: ANN index]
  CAND --> CF[Collaborative filtering]
  CAND --> POP[Trending & popular items]
  TT --> MERGE[Merge ~1000 candidates]
  CF --> MERGE
  POP --> MERGE
  MERGE --> RANK[Ranking model: gradient boosted or DNN]
  FEAT --> RANK
  RANK --> RERANK[Re-rank: diversity, freshness, business rules]
  RERANK --> FILTER{Already purchased or out of stock?}
  FILTER -->|Yes| DROP[Remove item]
  FILTER -->|No| SERVE[Return top 20 recommendations]
  SERVE --> EVENTS
  LAKE --> TRAIN[Daily training in Spark & PyTorch]
  TRAIN --> EVAL{Offline metrics improved?}
  EVAL -->|Yes| DEPLOY[Deploy new model]
  EVAL -->|No| KEEP[Keep current model]
  DEPLOY --> RANK

Related: Data pipeline diagram tool · Mermaid editor · All ai & ml pipelines templates · All 521 templates