JamesCowling / rap-genie

Rap Genie is a semantic search engine for rap verses, built on Convex vector search.

Home Page:https://rapgenie.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rap Genie

Rap Genie is a semantic search engine for rap verses, built on Convex vector search. It's hosted at https://rapgenie.net.

Want to find a verse about motorcycles? Rap Genie has got your back:

Ninja! (Ninja!) Kawasaki! (Kawasaki!)
Ducati! (Ducati!) My old Harley (My old Harley!)
Rock the party! (Rock the party)
Move your body! (Move your body)
Wassup? (Wassup?) Everybody! (Everybody!)

This would have been better if it mentioned Triumph but maybe I'm biased. Anyway the word "motorcycle" doesn't show up in the verse but it's clearly about motorcycles - Rap Genie still finds it.

Rap Genie uses OpenAI to generate an embedding for each verse and each search query. The song/verse database is stored in Convex and Convex vector search is used to obtain the embeddings that have the closest cosine similarity to a given search query.

Convex is a serverless fullstack development platform that makes it easy to build dynamic web apps, talk to third party APIs, and run background jobs. Feel free to fork the repo to make changes, or build something else cool on Convex.

The app is seeded with the Genius dataset from Kaggle. Despite storing millions of songs the Rap Genie workload fits within the included resources on a Convex Pro account.

Deployment instructions

  • Get familiar with the Convex platform.
  • Run Convex function sync in the background with npx convex dev.
  • Load the database via load.py.
  • Extract verses and generate embeddings e.g., with processSongBatch({limit: 20, recursive: true, minViews: 100000n}).
  • Run website with npx vite.

About

Rap Genie is a semantic search engine for rap verses, built on Convex vector search.

https://rapgenie.net

License:MIT License


Languages

Language:TypeScript 73.3%Language:JavaScript 14.6%Language:Python 10.8%Language:HTML 1.0%Language:CSS 0.2%