{
  "abstract": "LLMs can be prohibitively expensive and slow to run at scale, especially for applications that invoke an LLM per sample over millions of inputs. A natural way to scale is to cluster the inputs, run the LLM only on cluster representatives, and propagate the outputs to other cluster members. However, the outputs a member receives are only as good as its match to the representative. Off-the-shelf clustering methods optimize an aggregate objective, targeting average-case quality without per-sample guardrails. As a result, members can be assigned to poorly-matched representatives, and the inherited outputs -- though appropriate for the representative -- may be irrelevant or even unsafe for the member. For example, a parent of a toddler grouped with parents of older children could receive age-inappropriate recommendations. Most clustering methods also scale poorly to millions of inputs in runtime and memory, limiting their use at industry scale. We propose a scalable two-stage clustering algorithm with provable per-sample guardrails: every sample is guaranteed to share a user-specified minimal embedding similarity and exact attribute match with its representative. The algorithm first generates initial clusters with Mini-batch K-Means, then greedily selects representatives within each to satisfy the guardrails. We provide theoretical guarantees, complexity analysis, and benchmarks against common methods on internal and public datasets. Our method delivers per-sample guardrails while running substantially faster and scaling to data sizes where most standard methods become intractable. We demonstrate its impact in a real-world deployment clustering 38 million customers, reducing downstream LLM cost and runtime by 50-fold while preserving personalization. This unblocked the launch of a persona-based recommender system that delivers significant gains in revenue and engagement in an A/B test.",
  "abstract_shown": true,
  "affiliations": [],
  "article_type": null,
  "arxiv": "2607.19704",
  "author_total": 6,
  "authors": [
    {
      "name": "Longshaokan Wang"
    },
    {
      "name": "Wai Tsang Keung"
    },
    {
      "name": "Punit Ghodasara"
    },
    {
      "name": "Roman Wang"
    },
    {
      "name": "Ali Dashti"
    },
    {
      "name": "Francesc Moreno-Noguer"
    }
  ],
  "bibtex": "https://research.draconitic.com/paper/ese64fd3dg7sc.bib",
  "cited_by": 0,
  "doi": "10.48550/arxiv.2607.19704",
  "fulltext_url": null,
  "id": "ese64fd3dg7sc",
  "issns": [],
  "landing_url": "https://arxiv.org/abs/2607.19704",
  "language": null,
  "licence": "LicenseRef-arXiv-nonexclusive-1.0",
  "licence_label": "arXiv licence",
  "licence_source": "article",
  "licence_url": "http://arxiv.org/licenses/nonexclusive-distrib/1.0/",
  "metadata_licence": "CC0-1.0",
  "native_subjects": [
    [
      "arxiv",
      "cs.LG"
    ],
    [
      "arxiv",
      "stat.ML"
    ],
    [
      "openalex",
      "1702|Advanced Clustering Algorithms Research"
    ]
  ],
  "openalex": "W7170162768",
  "pdf_url": "https://arxiv.org/pdf/2607.19704",
  "pmcid": null,
  "pmid": null,
  "published": "2026-09-03",
  "publisher": null,
  "ris": "https://research.draconitic.com/paper/ese64fd3dg7sc.ris",
  "sources": [
    {
      "first_seen": "2026-10-30T12:19:25Z",
      "native_id": "2607.19704",
      "source": "arxiv",
      "url": "https://arxiv.org/abs/2607.19704"
    }
  ],
  "subjects": [
    {
      "field": "mathematics",
      "origin": "arxiv:stat.ML",
      "subfield": "statistics"
    }
  ],
  "title": "Efficient Clustering with Quality Guardrails for LLM-based Recommender Systems at Industry Scale",
  "title_text": "Efficient Clustering with Quality Guardrails for LLM-based Recommender Systems at Industry Scale",
  "type": "preprint",
  "updated_at": "2026-10-30T12:19:25Z",
  "url": "https://research.draconitic.com/paper/ese64fd3dg7sc",
  "venue": "arXiv",
  "versions": []
}