redis/modules/vector-sets/examples/movies
Pieter Cailliau d65102861f
Adding AGPLv3 as a license option to Redis! (#13997)
Read more about [the new license option](http://redis.io/blog/agplv3/)
and [the Redis 8 release](http://redis.io/blog/redis-8-ga/).
2025-05-01 14:04:22 +01:00
..
.gitignore Add 'modules/vector-sets/' from commit 'c6db0a7c20ff5638f3a0c9ce9c106303daeb2f67' 2025-04-02 16:34:28 +03:00
insert.py Adding AGPLv3 as a license option to Redis! (#13997) 2025-05-01 14:04:22 +01:00
README Add 'modules/vector-sets/' from commit 'c6db0a7c20ff5638f3a0c9ce9c106303daeb2f67' 2025-04-02 16:34:28 +03:00

This example maps long form movies plots to movies titles.
It will create fp32 and binary vectors (the two extremes).

1. Install ollama, and install the embedding model "mxbai-embed-large"
2. Download mpst_full_data.csv from https://www.kaggle.com/datasets/cryptexcode/mpst-movie-plot-synopses-with-tags
3. python insert.py

127.0.0.1:6379> VSIM many_movies_mxbai-embed-large_NOQUANT ELE "The Matrix"
 1) "The Matrix"
 2) "The Matrix Reloaded"
 3) "The Matrix Revolutions"
 4) "Commando"
 5) "Avatar"
 6) "Forbidden Planet"
 7) "Terminator Salvation"
 8) "Mandroid"
 9) "The Omega Code"
10) "Coherence"

127.0.0.1:6379> VSIM many_movies_mxbai-embed-large_BIN ELE "The Matrix"
 1) "The Matrix"
 2) "The Matrix Reloaded"
 3) "The Matrix Revolutions"
 4) "The Omega Code"
 5) "Forbidden Planet"
 6) "Avatar"
 7) "John Carter"
 8) "System Shock 2"
 9) "Coherence"
10) "Tomorrowland"