RedisVL queries interactive demo
RedisVL builds Redis queries from Python objects. This demo runs three of its query types on the restaurants of a food delivery app: a vector query that searches by meaning, a filter query, and a range query that limits the search to a distance threshold. For each query, it shows the RedisVL code, the FT.SEARCH command RedisVL sends, and the results.
The demo runs in your browser and doesn't connect to Redis or run an embedding model. Its results are the ones Redis returned for these queries, with descriptions embedded by sentence-transformers/all-mpnet-base-v2, and its code and commands are what RedisVL 0.27.1 builds. The restaurants are the same sample data as the Context Retriever interactive demo.
What the demo shows
- Vector query. A
VectorQueryembeds a phrase and returns the nearest restaurants by cosine distance, even when their descriptions share no words with the phrase. WithTagandNumfilters, it returns the nearest restaurants among those that pass the filters. - Filter query. A
FilterQuerymatches on the same filter expressions, with no vector. - Range query. A
VectorRangeQueryreturns every restaurant within a distance threshold, instead of a fixed number of nearest neighbors.
Next steps
- Read about each query type RedisVL supports.
- Follow the query and filter data guide for text, geo, and timestamp filters.