• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visual and semantic vector similarity with Redis Stack, FastAPI, PyTorch and Huggingface.


Hosted DemoΒ Β Β  CodeΒ Β Β  Redis VSS DocumentationΒ Β Β 


Redis Vector Search Demo Application

This demo showcases the vector search similarity (VSS) capability within Redis Stack and Redis Enterprise. Through the RediSearch module, vector types and indexes can be added to Redis. This turns Redis into a highly performant vector database which can be used for all types of applications.

The following Redis Stack capabilities are available in this demo:

  • Vector Similarity Search
    • by image
    • by text
  • Multiple vector indexing types
    • HNSW
    • Flat (brute-force)
  • Hybrid Queries
    • Apply tags as pre-filter for vector search

Application

This app was built as a Single Page Application (SPA) with the following components:

Some inspiration was taken from this Cookiecutter project and turned into a SPA application instead of a separate front-end server approach.

Datasets

The dataset was taken from the the following Kaggle links.

Running the App

Before running the app, install Docker Desktop.

Redis Cloud (recommended)

  1. Get your Redis Cloud Database (if needed).

  2. Export Redis Endpoint Environment Variables:

    $ export REDIS_HOST=your-redis-host
    $ export REDIS_PORT=your-redis-port
    $ export REDIS_PASSOWRD=your-redis-password
  3. Run the App:

    $ docker compose -f docker-cloud-redis.yml up

The benefit of this approach is that the db will persist beyond application runs. So you can make updates and re run the app without having to provision the dataset or create another search index.

Redis Docker

$ docker compose -f docker-local-redis.yml up

Customizing (optional)

You can use the Jupyter Notebook in the data/ directory to create product embeddings and product metadata JSON files. Both files will end up stored in the data/ directory and used when creating your own container.

Create your own containers using the build.sh script and then make sure to update the .yml file with the right image name.

Using a React development env

It's typically easier to write front end code in an interactive environment, testing changes in realtime.

  1. Deploy the app using steps above.
  2. Install NPM packages (you may need to use npm to install yarn)
    $ cd gui/
    $ yarn install --no-optional
  3. Use yarn to serve the application from your machine
    $ yarn start
  4. Navigate to http://localhost:3000 in a browser.

All changes to your local code will be reflected in your display in semi realtime.

Troubleshooting

Sometimes you need to clear out some Docker cached artifacts. Run docker system prune, restart Docker Desktop, and try again.

Open an issue here on GitHub and we will try to be responsive to these. Additionally, please consider contributing.

More Repositories

1

ArXivChatGuru

Use ArXiv ChatGuru to talk to research papers. This app uses LangChain, OpenAI, Streamlit, and Redis as a vector database/semantic cache.
Python
512
star
2

redis-ai-resources

✨ A curated list of awesome community resources, integrations, and examples of Redis in the AI ecosystem.
Jupyter Notebook
144
star
3

redis-arXiv-search

Vector search demo with the arXiv paper dataset, RedisVL, HuggingFace, OpenAI, Cohere, FastAPI, React, and Redis.
TypeScript
135
star
4

LLM-Document-Chat

Using LlamaIndex, Redis, and OpenAI to chat with PDF documents. Supplementary material for blog post on Microsoft Developer Blog
Jupyter Notebook
106
star
5

basic-redis-chat-app-demo-nodejs

A basic Redis chat application demo written in Nodejs
JavaScript
84
star
6

redis-datasets

A Curated List of Sample Redis Datasets
Python
79
star
7

agentic-rag

Jupyter Notebook
69
star
8

fastapi-redis-tutorial

Using Redis with FastAPI
Python
68
star
9

redis-stack-stocks

This project demonstrates how you can use the multi-model capabilities of Redis to create a real-time stock watchlist application.
TypeScript
66
star
10

redis-nvidia-recsys

Three examples of recommendation system pipelines with NVIDIA Merlin and Redis
PureBasic
56
star
11

redis-om-python-flask-skeleton-app

A starter application for performing CRUD type operations with Redis OM Python and the Flask Microframework
Python
48
star
12

redis-developer.github.io

The Home of Redis Developers
TypeScript
47
star
13

basic-redis-chat-app-demo-python

Redis chat demo app written in Python
JavaScript
42
star
14

redis-microservices-ecommerce-solutions

TypeScript
39
star
15

basic-redis-chat-app-demo-dotnet

Basic Redis Chat Demo App dot net
JavaScript
32
star
16

gcp-redis-llm-stack

Reference architecture for LLM-based applications on Google Cloud Platform with Redis Enterprise as a high-performance data layer.
Jupyter Notebook
25
star
17

basic-redis-chat-demo-go

A Basic redis chat demo app written in Go language
JavaScript
23
star
18

testcontainers-redis

Testcontainers module for Redis
Java
23
star
19

basic-redis-shopping-chart-nodejs

Basic Redis Shopping cart demo using NodeJS
Vue
22
star
20

redis-om-fastapi

Examples of using Redis OM Python with FastAPI
Python
22
star
21

finding-bigfoot-with-semantic-search

Sample application showing how to use semantic search with Redis and JavaScript.
JavaScript
21
star
22

basic-caching-demo-nodejs

This is an example demo app that shows how Redis caching works using Nodejs
Vue
19
star
23

basic-redis-chat-app-demo-java

A sample redis chat demo app written in Java
JavaScript
18
star
24

express-redis-om-workshop

JavaScript
18
star
25

LLM-Recommender

Use OpenAI, Redis, and streamlit to recommend hotels using Large Language Models
Python
18
star
26

redis-aqi-monitor

A demonstration of Redis Stack Streams, Timeseries, JSON, and Search using a Raspberry Pico W and PMS5003 sensor
Python
16
star
27

redis-chat-challenge

A Hackathon challenge to build a real-time chat application powered by Redis.
JavaScript
16
star
28

redi2read

Java
15
star
29

nosql-data-modeling-patterns

Contains sample code for modeling data using Redis and NoSQL
Python
15
star
30

redis-hacker-news-demo

The demo is a Hacker News clone and uses RedisJSON for storing the data and RediSearch for searching.
JavaScript
15
star
31

redis-om-dotnet-skeleton-app

skeleton app for redis-om-dotnet
C#
14
star
32

beats-by-redis

A demonstration of Redis Stack with Vue, Express, and Node.js
JavaScript
14
star
33

brewdis

Retail demo
Java
12
star
34

introducing-the-geosearch-command

Demo application using a Bulma / Leaflet JS / JavaScript front end and Python / Flask backend to demonstrate the GEOSEARCH command added in Redis 6.2.
HTML
12
star
35

redis-om-spring-react-todomvc

Tutorial: Redis OM Spring + React TodoMVC
JavaScript
12
star
36

redis-bike-co

Redis Bike Company Example Application
Jupyter Notebook
12
star
37

basic-analytics-dashboard-redis-bitmaps-nodejs

This repo shows a basic analytics dashboard app that uses Redis Bitmap written in NodeJS (JavaScript)
Vue
10
star
38

basic-redis-leaderboard-demo-nodejs

Basic Redis Leaderboard demo written in Nodejs
JavaScript
10
star
39

redis-caching-api-responses

JavaScript
10
star
40

redis-om-spring-skeleton-app

Redis OM Spring Skeleton App
Java
10
star
41

basic-redis-leaderboard-demo-python

A Basic Redis leaderboard demo app written in Python
Python
10
star
42

nredi2read-preview

C#
9
star
43

aws-redis-cloud-demo

A Demo App using Redis Enterprise Cloud with AWS Services
Vue
9
star
44

basic-redis-leaderboard-demo-go

A basic Redis leaderboard demo app written in Go
Go
9
star
45

redis-om-python-search-demo

Demo using the Redis OM Python client and RediSearch
Python
8
star
46

financial-vss

Notebooks demonstrating vector search & RAG design patterns with Redis Python clients.
Jupyter Notebook
8
star
47

dot-net-redis-intro

C#
7
star
48

redis-om-node-tutorial

Code sample for tutorial on Redis OM for Node.js
JavaScript
7
star
49

redis-kaboom-rpg

Redis RPG game example with Kaboom.JS.
JavaScript
7
star
50

keyspace-notifications-node-redis

Keyspace Notifications demo with Node Redis 4
Python
7
star
51

hitc-dotnet-redisearch-demo

HITC video accompanying repository
C#
7
star
52

basic-redis-leaderboard-demo-dotnet

Basic leaderboard app written in C#.net
C#
7
star
53

basic-rate-limiting-demo-python

This repo shows a basic rate limiting demo in Python and Django
Python
7
star
54

basic-redis-rate-limiting-demo-nodejs

This is a basic Redis Rate Limiting demo written in NodeJS
JavaScript
7
star
55

redis-caching-slow-database-queries

Simple demonstration of caching database queries with Redis.
JavaScript
7
star
56

hackathon-docs

6
star
57

basic-redis-rate-limiting-demo-go-lang

A basic redis rate limiting demo written in Go language
Go
6
star
58

redis-streams-hotel-jobs

Redis Streams example with Python and Node.js
JavaScript
6
star
59

ebook-speed-mern-backend

TypeScript
6
star
60

haunted-places-data-service

Simple Node.js data service that exposes haunted places using Apollo GraphQL, Redi, and RediSearch.
JavaScript
6
star
61

introducing-redis-talk

Resources for Simon's Introducing Redis Talk.
JavaScript
6
star
62

video-qa-semantic-vector-caching

This repository is a Video Q&A site that uses LangChain, OpenAI, Google Gemini, and Redis to answer questions using videos for RAG.
TypeScript
6
star
63

redis-real-time-inventory-solutions

TypeScript
5
star
64

redismod-docker-compose

Contains a docker-compose.yml using redismod : a Docker image with selected Redis Labs modules
5
star
65

redis-om-autocomplete-demo

Redis OM Spring Autocomplete/Autosuggest Demo
Java
5
star
66

sliding-window-rate-limiter-aspnet

Sliding Window Rate Limiter Example for ASP.NET Core
C#
5
star
67

fixed-window-rate-limiter

Redis Fixed Window Rate Limiter with Spring Boot
Java
5
star
68

devcember

Redis Devcember: https://developer.redis.com/devcember/
JavaScript
5
star
69

basic-redis-rate-limiting-demo-csharp-dot-net

Basic redis rate limiting demo written in C# .net
C#
5
star
70

redis-om-node-skeleton-app

JavaScript
4
star
71

redisbloom-moby-dick

Experiments with RedisBloom and the text from Moby Dick
Python
4
star
72

basic-redisgraph-movie-demo-app-nodejs

Basic RedisGraph movie demo app written in NodeJS
JavaScript
4
star
73

acre-terraform

Templates to get started with the 'azurerm_redis_enterprise_cluster' resource.
HCL
4
star
74

demo-movie-app-redisearch-nodejs

A movie demo app that shows redisearch capabilities
Vue
4
star
75

banking-on-redis

An app demonstrating real time querying of JSON within a banking application
JavaScript
4
star
76

sql-cache-invalidation-debezium

This project shows how to use Debezium to update Redis from PostgreSQL transactions
Java
4
star
77

mlh-prize-potato

The inspiration repo for those who win (or don't!) MLH hackathons where Redis is a sponsor. This repo is aimed at getting you started with a Libre Potato mini computer and using Redis.
4
star
78

spring-ai-redis-demo

JavaScript
4
star
79

micropython-redis-boilerplate

A boilerplate MicroPython script for getting started with Redis on microcontrollers (tested on Raspberry Pi Pico W)
Python
3
star
80

fhir-search

Redis Document (JSON + Search) examples against FHIR data
JavaScript
3
star
81

polygon-demo

Polygon search in Redis
Python
3
star
82

ebook-speed-mern-frontend

TypeScript
3
star
83

doc-crawler

Web crawler with search indexing
JavaScript
3
star
84

nextjs-redis-netlify

This app is a minimal starter template for building a site with Next.js, TailwindCSS, Redis, and deploying to Netlify
JavaScript
3
star
85

redis-vector-nodejs-solutions

TypeScript
3
star
86

redis-polygon-search-trains-demo

Redis Stack Polygon search demo with train data, written in Node.js.
JavaScript
3
star
87

basic-caching-redis-demo-go-lang

Basic caching redis demo app written in GO language
Go
3
star
88

basic-caching-demo-python

This project shows a basic caching demo in Python
Python
2
star
89

the-redis-marketplace-app-frontend

The Redis Marketplace app
JavaScript
2
star
90

speechdis

A Tool that transcribe audio from Podcast using RedisAI and RediSearch
Jupyter Notebook
2
star
91

hentry-server

early prototype, please do not test your hacking skills here :)
TypeScript
2
star
92

RedisBirdTracker

A demonstration of JSON storage and query capabilities using bird sightings as a data set
Python
2
star
93

gitpod-flask-redis

A quick start to get up and running with Flask and Redis application development using GitPod
HTML
2
star
94

redis-developer-old

CSS
2
star
95

node-redis-json-demo

Node Redis 4 RedisJSON demo.
JavaScript
2
star
96

basic-redis-rate-limiting-demo-ruby

A basic Redis rate limiting demo written in Ruby
Ruby
2
star
97

basic-caching-demo-csharpdotnet

Basic caching demo written in C# .net
C#
2
star
98

gitpod-express-redis

A Node.js Express with Redis starter application that uses Gitpod
JavaScript
2
star
99

basic-rate-limiting-demo-java

This project show how to implement a basic rate limiting using Redis in Java
JavaScript
2
star
100

redis-streams-with-dotnet

Example applications use Redis Streams with various .NET libraries
C#
2
star