separated similarity and clustering pipelines