You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// PgVector from Prisma raw queries usually returns strings like "[0.1, 0.2, ...]"
60
57
constseedEmbeddings: number[][]=rawEmbeddings
61
58
.map((row: any)=>{
@@ -102,7 +99,7 @@ export async function generateSeedPlaylist(
102
99
constalbums=awaitgetEveryAlbum(finalList);
103
100
104
101
console.log('Getting tracks for albums...');
105
-
constaiTracks=(awaitgetAllTracks(albumsasstring[],3,true))asany[];// Need more tracks to filter down
102
+
constaiTracks=(awaitgetAllTracks(albumsasstring[],5,true))asany[];// Need more tracks to filter down
106
103
107
104
console.log('AI Tracks:',aiTracks);
108
105
@@ -118,9 +115,12 @@ export async function generateSeedPlaylist(
118
115
constlimit=pLimit(15);
119
116
120
117
// 0.6 is a good starting point, but you can tune this
121
-
constTHRESHOLD=0.6
118
+
constTHRESHOLD=0.75
122
119
123
120
// we want to avoid low quality recommendations so we check each song against all seeds(selected songs) put that into an array and sort by the number of seeds that match the treshold then return the top 100
121
+
// we also want to avoid songs that are too far in similarity to the seeds so we set a cutoff of 0.2 below the threshold to give extra grace
0 commit comments