Help Wizard

Step 1


Seeking perfect song recommendation process

Seeking perfect song recommendation process


I hope you are doing as fine as you can.

I am investigating and researching solutions to a problem for a few months now and I need your valuable help today.



Be able to create an app that can generate a playlist based on multiple users music tastes. The goal is that the playlist suits everyone, at higher level of satisfaction for every user. So for instance, if all users in the room are Pink Floyd fans, they will probably hear Pink Floyd related songs.


Research path:

Spotify and recommendation engines

I arrived at the following conclusion: the best way to achieve it is to build a music recommendation engine, but of course, you don't want to create it by yourself because it will need a huge amount of data that I can provide on invest in, so I need to work with a third-party service that already has this data and recommendation engine, and it seems like there are not many companies that offer that service and that's how I went to think that Spotify was the best way to achieve it.


Limitations of the recommendation API

Then, I found out the Spotify Recommendation API which seemed to be the ideal solution to my problem. However, the first problem I faced was the seed limitation (amount of tracks or artist I can input to generate recommendations) which is limited to 5, so I will not be able to use this API on X users * their top tracks

I then received a solution proposed by @murraypaul :




Make multiple calls to the recommendations query with different random permutations of 5 of your 10 tracks, and build up a result out of the tracks that are recommended the most times.




which seems a very good idea to obtain "quite acceptable" recommendations but when I dug into this path I could also read from @kkhal that:




When I started working with the recommendations API I thought the same but I don't think that this would give very good results. As far as I can tell the recommendations API doesn't combine your seeds to come up with tracks that best meet a mixture of the seeds. If you have multiple seeds it just returns some recommendations relevant to each one.

- if you have 1 seed, you get 20 recommendations based on that seed
- if you have 2 seeds, you get about 10 recommendations based on each seed

For example, if I have 2 genre seeds: rock and soundtracks, I don't get rock music soundtracks. I get 10 recommendations of rock and 10 of (mostly orchestral) soundtracks. I'd love to think it's cleverer than that but, based on this example, I doubt it.





So I concluded that the recommendation API was still very valuable for my use case but not in the way I thought it will be.


Potential solutions:

This research path, with also a lot of experiment with friends data brought me to multiple solutions, and I am now trying to figuring out what will be the more efficient and optimal solution. And that's where I need your valuable help 🙃.


[A] Mixed recommendations:

This first solution is the easiest one to achieve but also the less accurate one. It consists of generating recommendations for each user and then choose random tracks from all recommendations (or generating recommendations based on random tracks from random users). The problem here is that songs will be enjoyable for users each has their turn and not for everyone at the same time.

[B] Crossing recommendations:

This solution will probably make some of you jump off their chair, but it's an exploration track. First, we will need to generate recommendations based on each users' top tracks, artists and playlists and then cross those different recommended tracks to find potential recurring / shared songs.
This solution is not very viable because 1 - it will completely flood the API, and 2 - if users have very different tastes it is less likely that we can find mutual songs, and this problem also apply if we have a lot of users.


[C] Fetching recommendation based on shared artists:

First, we need to gather users' favourite artists and find potential matches and similar artists. Once we have artists that all users' like, we can generate recommendations based on these artists.

Here, the recommendations will be more accurate, but I am afraid to reach a point where there are no shared artists anymore if used on a larger sample of users.


[D] Genre-based recommendations:

Here we can retrieve all top genres from users' top artists in order to obtain such a table (see below) and then make recommendations based on the most recurring genres.

This is potentially the more viable solution, but I am concerned by the results, as a genre can also be very large and diversified. I tend to think that recommendations will be less accurate than based on an artist or a track.


GenreUser 1User 2User 3User 4TotalRank
Rap  22
House 31
Soul   1


[D] Audio feature-based recommendations:

More a research project, as suggested by @murraypaul to use the audio feature function.




Use the audio features function ( to analyse all of your input tracks, then use that data to groups them into 5 groups based on similar features, and use one track from each group as input to the recommendation query.




However, this seems very time-consuming to understand as a non-professional music analyst and I have doubt about the accuracy of such a process.



Any of these solutions seems perfect to me, and I am really seeking perfection.


➡️I would really appreciate any reflection, suggestion and advice that can help me solve this problem in the most accurate way as now I am a bit lost with seems an endless source of imperfect solutions.

Let me please also thank you for reading me. ❤️

3 Replies

Hi, any ideas on this ? 😥

Still looking for ideas or help... after a year 😁

Hello, did you solved it?, and how?

Suggested posts