π₯ Redis RAG Workbench is your go-to development environment for building and experimenting with Retrieval-Augmented Generation (RAG) applications. Drop in a PDF, chat with your documents, and harness the full power of Redis for lightning-fast vector search, intelligent semantic caching, persistent LLM memory, and smart semantic routing.
β¨ What makes this special?
- π One-command setup - Get started in seconds with
make setup - β‘ Multi-LLM support - OpenAI, Azure OpenAI, Google VertexAI
- π― Redis-powered - Vector search, caching, and memory management
- π³ Docker ready - Consistent development across all environments
- π§ Developer-first - Hot reload, code formatting, and quality checks built-in
- Quick Start
- Prerequisites
- Getting Started
- Using Google VertexAI
- Project Structure
- Connecting to Redis Cloud
- Troubleshooting
- Contributing
- License
- Learn More
Get up and running in 3 commands:
git clone https://github.com/redis-developer/redis-rag-workbench.git
cd redis-rag-workbench
make setup && make devThen visit http://localhost:8000 and start chatting with your PDFs! π
- Make sure you have the following tools available:
- Setup one or more of the following:
- OpenAI API
- You will need an API Key
- Azure OpenAI
- You will need an API Key
- Google VertexAI
- OpenAI API
- Get a Cohere API key (for optional reranking features)
π Access the workbench at
http://localhost:8000in your web browser.
β±οΈ First run may take a few minutes to download model weights from Hugging Face.
| Command | Description |
|---|---|
make setup |
Initial project setup (install deps & create .env) |
make install |
Install/sync dependencies |
make dev |
Start development server with hot reload |
make serve |
Start production server |
make format |
Format and lint code |
make check |
Run code quality checks without fixing |
make docker |
Rebuild and run Docker containers |
make docker-up |
Start Docker services (without rebuild) |
make docker-logs |
View Docker application logs |
make docker-down |
Stop Docker services |
make clean |
Clean build artifacts and caches |
Local Development:
make setup # One-time setup
# Edit .env with your API keys
make dev # Start development serverDocker Development:
make setup # One-time setup
# Edit .env with your API keys
make docker # Build and start containers
make docker-logs # View logsDocker Management:
make docker-up # Start existing containers
make docker-down # Stop all services
make docker-logs # Follow application logsCode Quality:
make format # Auto-fix formatting issues
make check # Check code quality without changesThe project uses a single .env file for configuration. Copy from the example:
cp .env-example .envRequired variables:
REDIS_URL- Redis connection (auto-configured for Docker)COHERE_API_KEY- For reranking features
At least one LLM provider:
OPENAI_API_KEY- OpenAI API accessAZURE_OPENAI_*- Azure OpenAI configurationGOOGLE_APPLICATION_CREDENTIALS- Google VertexAI credentials
The workbench can be used with VertexAI, but requires you to set up your credentials using the gcloud CLI. The easiest way to do this is as follows:
- Make sure you have a gcloud project setup with the VertexAI API enabled.
- Install the gcloud CLI
- Follow the instructions to run the
gcloud auth application-default logincommand - Copy the JSON from the generated
application_default_credentials.jsoninto your.envfile using theGOOGLE_APPLICATION_CREDENTIALSvariable - Set the
GOOGLE_CLOUD_PROJECT_IDenvironment variable in your.envfile to the associated gcloud project you want to use.
main.py: The entry point of the applicationdemos/: Contains workbench demo implementationshared_components/: Reusable utilities and componentsstatic/: Static assets for the web interface
π€ Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you don't yet have a database setup in Redis Cloud get started here for free.
To connect to a Redis Cloud database, log into the console and find the following:
- The
public endpoint(looks likeredis-#####.c###.us-east-1-#.ec2.redns.redis-cloud.com:#####) - Your
username(defaultis the default username, otherwise find the one you setup) - Your
password(either setup through Data Access Control, or available in theSecuritysection of the database page.
Combine the above values into a connection string and put it in your .env file. It should look something like the following:
REDIS_URL="redis://default:<password>@redis-#####.c###.us-west-2-#.ec2.redns.redis-cloud.com:#####"π Note: When using Docker, the Redis URL is automatically configured to use the internal Docker network. Your
.envfile can contain either a local Redis URL (redis://localhost:6379) or a Redis Cloud URL - both will work with Docker.
If you find that docker will not work, it's possible you need to add the following line in the docker/Dockerfile (commented out in the Dockerfile for ease-of-use):
RUN apt-get update && apt-get install -y build-essentialTo learn more about Redis, take a look at the following resources:
- Redis Documentation - learn about Redis products, features, and commands.
- Learn Redis - read tutorials, quick starts, and how-to guides for Redis.
- Redis Demo Center - watch short, technical videos about Redis products and features.
