Smart flow echo match queues same song each time

Just to add to this, while normalizing the distances would be nice, I’m not sure how feasible/usable this actually is. All libraries are different, and the different “genres” within the libraries might not all have the same density or size. So for one specific genre, a normalized distance of 0.2 might be good radius to include similar tracks, but for another genres 0.4 or 0.05 might be more suitable instead.
It’s probably best to handle this on a best-effort basis by combining the amount of requested tracks with the cosine similarity. That should ensure only the most similar tracks are returned at all, and then the cosine similarity can be used to filter out any tracks that reasonably similar to the seed track (e.g. because there are only a couple of tracks from that genre in the library).
That all is only if you need explicit control.

If not, using the “song alchemy” endpoint with a temperature above 0 should do a good job of adding in some variation.