This quick project was built as a part of a talk on semantic search to demonstrate the difference between traditional keyword search and semantic search in the context of movies. The goal is to showcase how semantic search can provide more relevant and accurate results compared to simple keyword-based search which most websites like IMDb offer.
Follow these instructions to set it up locally.
Clone the repository.
Install the required packages in both the client and the server directories:
npm installSet up the movie database:
Run the application on Docker with docker compose:
docker compose upAdd the following environment variables in a .env file in the server directory.
MONGO_DB_URI=
CHROMA_DB_URI=http://localhost:8000
CHROMA_DB_CREDENTIALS=
CHROMA_DB_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProviderTrigger the /api/movies/feed API to create vector embeddings of the movie dataset. (Feel free to search and tweak with the BATCH_SIZE variable to batch embeddings creation according to your specs, I set it to 100 on a Macbook Pro M1 16GB)
Test the application out.
http://localhost:3030.Boring Search and Cool Search to see the difference in results.Feel free to raise a PR! Your help is appreciated. Please follow these steps to contribute:
git checkout -b feature/YourFeature).git commit -m 'Add some feature').git push origin feature/YourFeature).If you have any questions or feedback, feel free to open an issue.
Happy Searching!