All work

Recommenders & RankingEuropean B2B wholesale group

One recommender platform serving 19 country models

One two-tower recommender platform serves 19 country models across several channels. Shadow traffic caught a vector-store regression (approximately 65% → 95% result coverage) before migration.

country models retrained monthly
19
filtered-search result coverage, up from ~65% by default
~95%
rows in the event and invoice tables
1–2B

The problem

A European B2B wholesaler serves hotels, restaurants, caterers and independent traders. Recommendations are delivered through cross-sell carousels, a mobile app, the storefront, marketing email and field sales tools. Countries differ in assortment, store availability and promotion rules, and customer and product identity is not uniform across channels. A separate recommender per channel would mean duplicate models, pipelines and endpoints to maintain. The goal was one shared capability that still respects local rules.

What was built

The platform trains a two-tower retrieval model with TensorFlow Recommenders: 128-dimensional customer and product embeddings, scored by dot product. Each of 19 markets has its own model, retrained monthly by Kubeflow pipelines on Vertex AI, with BigQuery and Dataflow preparing the training data. One Go API on Kubernetes serves every channel.

Key engineering decisions:

  • Feature flags set the model alias per request: A/B tests without new API code
  • Vector search enforces availability, assortment, promotion and recent-purchase filters at query time
  • Every recommender publishes the same mart: identifier, embedding, payload, alias, model UUID, payload hash
  • The payload hash marks changed records, so only deltas propagate daily

A migration from a dedicated vector database to PostgreSQL with pgvector was evaluated with shadow traffic: both stores answered the same live requests before any cutover.

Results

The shadow evaluation caught a regression before cutover. With metadata filters applied, default pgvector behavior returned only approximately 65% of the expected results. Enabling iterative scanning raised result coverage to approximately 95%. The platform operated 19 country models behind one serving API, backed by approximately 226 dbt models and tables of one to two billion rows. A new model or signal enters production by publishing a compatible mart, not by building a new serving pipeline.

Where it applies

The pattern fits organizations consolidating several recommendation use cases onto one governed platform while keeping market-specific behavior and channel-specific delivery.

Delivered by Peak AI’s engineers, including in roles held before Peak AI. The organization is described rather than named, and sensitive details are left out.

Have a POC that needs to become a product?

Tell us what you are shipping. You will talk to the engineers who would build it.