https://github.com/jamescowling/rap-genie
Rap Genie is a semantic search engine for rap verses, built on Convex vector search.
https://github.com/jamescowling/rap-genie
convex openai vector-search
Last synced: 6 months ago
JSON representation
Rap Genie is a semantic search engine for rap verses, built on Convex vector search.
- Host: GitHub
- URL: https://github.com/jamescowling/rap-genie
- Owner: jamescowling
- License: mit
- Created: 2023-08-25T01:31:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T19:57:31.000Z (8 months ago)
- Last Synced: 2025-04-11T23:53:02.817Z (6 months ago)
- Topics: convex, openai, vector-search
- Language: TypeScript
- Homepage: https://rapgenie.net
- Size: 2.76 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rap Genie
Rap Genie is a semantic search engine for rap verses, built on [Convex vector
search](https://convex.dev). 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](https://www.kaggle.com/datasets/nikhilnayak123/5-million-song-lyrics-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](https://convex.dev/start).
- 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`.