Skip to content

✨ A curated list of awesome community resources, integrations, and examples of Redis in the AI ecosystem.

License

Notifications You must be signed in to change notification settings

redis-developer/redis-ai-resources

AI Resources

AI Resources

License: MITLanguageGitHub last commitDiscordTwitter

✨ A curated repository of code recipes, demos, tutorials and resources for basic and advanced Redis use cases in the AI ecosystem. ✨


Getting Started

New to Redis for AI applications? Here's how to get started:

  1. First time with Redis? Start with our Redis Intro notebook
  2. Want to try vector search? Check our Vector Search with RedisVL recipe
  3. Building a RAG application? Begin with RAG from Scratch
  4. Ready to see it in action? Play with the Redis RAG Workbench demo

Demos

No faster way to get started than by diving in and playing around with a demo.

DemoDescription
Redis RAG WorkbenchInteractive demo to build a RAG-based chatbot over a user-uploaded PDF. Toggle different settings and configurations to improve chatbot performance and quality. Utilizes RedisVL, LangChain, RAGAs, and more.
Redis VSS - Simple Streamlit DemoStreamlit demo of Redis Vector Search
ArXiv SearchFull stack implementation of Redis with React FE
Product SearchVector search with Redis Stack and Redis Enterprise
ArxivChatGuruStreamlit demo of RAG over Arxiv documents with Redis & OpenAI
Redis Movies SearcherDemo of hybrid search using Java, Spring Boot, and Redis OM
Memory-Aware Alexa AssistantComplete example of an Alexa skill that can recall previously stored conversations and memories to provide contextual responses to users. Utilizes Redis Agent Memory Server, LangChain4J, Terraform, and AWS. It showcases how to implement context engineering to dynamically leverage RAG, tools, short-term and long-term memories.
From Postgres to Redis Cloud with RDIThis demo shows how to deploy RDI on Kubernetes running locally so it can be used to build a moving/transformation data pipeline to enable data on Redis Cloud. The source database lives on-premises, and the data is movied and transformed to Redis Cloud.
Virtual Banking Assistant with Semantic RouterA Banking Agent demo that uses semantic routing to route user queries to right banking tool. (Eg: Credit Card Recommendation, Loan EMI calculation, Banking FAQ etc)
Shopping AI AgentAn Agentic AI grocery-shopping platform demo that combines Redis's speed with LangGraph's workflow orchestration. Get personalized recipe recommendations, smart product suggestions, and lightning-fast responses through semantic caching.
Restaurant Discovery AI AgentAn Agentic AI restaurant discovery platform that combines Redis's speed with LangGraph's intelligent workflow orchestration. Get personalized restaurant recommendations, make reservations, and get lightning-fast responses through semantic caching.
Podcast Chatbot with Agent MemoryA chatbot that discusses and recommends podcasts. Affectionately called Podbot, it demonstrates how to use Redis Agent Memory Server to build context-aware agents with Azure Managed Redis.
Car Dealership Assistant with Agent MemoryA Car Dealership chatbot with Redis Agent Memory Server, showcasing short-term and long-term memory.

Recipes

Need quickstarts to begin your Redis AI journey?

Getting started with Redis & Vector Search

RecipeGitHubGoogle Colab
🏁 Redis Intro - The place to start if brand new to RedisOpen In GitHubOpen In Colab
🔍 Vector Search with RedisPy - Vector search with Redis python clientOpen In GitHubOpen In Colab
📚 Vector Search with RedisVL - Vector search with Redis Vector LibraryOpen In GitHubOpen In Colab
🔄 Hybrid Search - Hybrid search techniques with Redis (BM25 + Vector)Open In GitHubOpen In Colab
🔢 Data Type Support - Shows how to convert a float32 index to float16 or integer dataypesOpen In GitHubOpen In Colab
📊 Benchmarking Basics - Overview of search benchmarking basics with RedisVL and Python multiprocessingOpen In GitHubOpen In Colab
📊 Multi Vector Search - Overview of multi vector queries with RedisVLOpen In GitHubOpen In Colab
🗜️ HNSW to SVS-VAMANA Migration - Showcase how to migrate HNSW indices to SVS-VAMANAOpen In GitHubOpen In Colab
🗜️ FLAT to SVS-VAMANA Migration - Showcase how to migrate FLAT indices to SVS-VAMANAOpen In GitHubOpen In Colab

Retrieval Augmented Generation (RAG)

Retrieval Augmented Generation (aka RAG) is a technique to enhance the ability of an LLM to respond to user queries. The retrieval part of RAG is supported by a vector database, which can return semantically relevant results to a user's query, serving as contextual information to augment the generative capabilities of an LLM.

To get started with RAG, either from scratch or using a popular framework like Llamaindex or LangChain, go with these recipes:

RecipeGitHubGoogle Colab
🧩 RAG from Scratch - RAG from scratch with the Redis Vector LibraryOpen In GitHubOpen In Colab
⛓️ LangChain RAG - RAG using Redis and LangChainOpen In GitHubOpen In Colab
🦙 LlamaIndex RAG - RAG using Redis and LlamaIndexOpen In GitHubOpen In Colab
🚀 Advanced RAG - Advanced RAG techniquesOpen In GitHubOpen In Colab
🖥️ NVIDIA RAG - RAG using Redis and Nvidia NIMsOpen In GitHubOpen In Colab
📊 RAGAS Evaluation - Utilize the RAGAS framework to evaluate RAG performanceOpen In GitHubOpen In Colab
🔒 Role-Based RAG - Implement a simple RBAC policy with vector search using RedisOpen In GitHubOpen In Colab

LLM Memory

LLMs are stateless. To maintain context within a conversation chat sessions must be stored and re-sent to the LLM. Redis manages the storage and retrieval of message histories to maintain context and conversational relevance.

RecipeGitHubGoogle Colab
💬 Message History - LLM message history with semantic similarityOpen In GitHubOpen In Colab
👥 Multiple Sessions - Handle multiple simultaneous chats with one instanceOpen In GitHubOpen In Colab

Semantic Caching

An estimated 31% of LLM queries are potentially redundant (source). Redis enables semantic caching to help cut down on LLM costs quickly.

RecipeGitHubGoogle Colab
🧠 Gemini Semantic Cache - Build a semantic cache with Redis and Google GeminiOpen In GitHubOpen In Colab
🦙 Llama3.1 Doc2Cache - Build a semantic cache using the Doc2Cache framework and Llama3.1Open In GitHubOpen In Colab
⚙️ Cache Optimization - Use CacheThresholdOptimizer from redis-retrieval-optimizer to setup best cache configOpen In GitHubOpen In Colab
🎯 Context-Enabled Caching - Context-aware semantic caching with Redis for enhanced LLM performanceOpen In GitHubOpen In Colab

Semantic Routing

Routing is a simple and effective way of preventing misuse with your AI application or for creating branching logic between data sources etc.

RecipeGitHubGoogle Colab
🔀 Basic Routing - Simple examples of how to build an allow/block list router in addition to a multi-topic routerOpen In GitHubOpen In Colab
⚙️ Router Optimization - Use RouterThresholdOptimizer from redis-retrieval-optimizer to setup best router configOpen In GitHubOpen In Colab

AI Gateways

AI gateways manage LLM traffic through a centralized, managed layer that can implement routing, rate limiting, caching, and more.

RecipeGitHubGoogle Colab
🚪 LiteLLM Proxy - Getting started with LiteLLM proxy and RedisOpen In GitHubOpen In Colab

Agents

RecipeGitHubGoogle Colab
🕸️ LangGraph Agents - Notebook to get started with lang-graph and agentsOpen In GitHubOpen In Colab
👥 CrewAI Agents - Notebook to get started with CrewAI and lang-graphOpen In GitHubOpen In Colab
🧠 Memory Agent - Building an agent with short term and long term memory using RedisOpen In GitHubOpen In Colab
🛠️ Full-Featured Agent - Notebook builds full tool calling agent with semantic cache and routerOpen In GitHubOpen In Colab
🥗 Autogen Agent - Builds a blog writing agent with Autogen and Redis memoryOpen In GitHubOpen In Colab

Computer Vision

RecipeGitHubGoogle Colab
👤 Facial Recognition - Build a facial recognition system using the Facenet embedding model and RedisVLOpen In GitHubOpen In Colab

Recommendation Systems

RecipeGitHubGoogle Colab
📋 Content Filtering - Intro content filtering example with redisvlOpen In GitHubOpen In Colab
👥 Collaborative Filtering - Intro collaborative filtering example with redisvlOpen In GitHubOpen In Colab
🏗️ Two Towers - Intro deep learning two tower example with redisvlOpen In GitHubOpen In Colab

Feature Store

RecipeGitHubGoogle Colab
💳 Credit Scoring - Credit scoring system using Feast with Redis as the online storeOpen In GitHubOpen In Colab
🔍 Transaction Search - Real-time transaction feature search with RedisOpen In GitHubOpen In Colab

☕️ Java AI Recipes

A set of Java recipes can be found under /java-recipes.

Notebooks

NotebookDescription
notebooks/RAG/spring_ai_redis_rag.ipynbDemonstrates building a RAG-ba sed beer recommendation chatbot using Spring AI and Redis as the vector store
RAG/spring_ai_redis_rag.ipynbDemonstrates building a RAG-based beer recommendation chatbot using Spring AI and Redis as the vector store
semantic-routing/1_semantic_classification.ipynbDemonstrates how to perform text classification with vector search (RedisVL) instead of LLMs
semantic-routing/2_semantic_tool_calling.ipynbDemonstrates how to perform tool selection with vector search (RedisVL) instead of LLMs
semantic-routing/3_semantic_guardrails.ipynbDemonstrates how to implement guardrails with vector search (RedisVL)
semantic-caching/1_pre_generated_semantic_caching.ipynbDemonstrates how to perform pre generated semantic caching with RedisVL
semantic-caching/2_semantic_caching_with_langcache.ipynbDemonstrates how to perform pre generated semantic caching with LangCache

Applications

ApplicationDescription
applications/agent-long-term-memoryDemonstrates how to implement long-term memory for AI agents using Spring AI Advisor abstraction with Redis Vector Search
applications/agent-short-term-memoryDemonstrates how to implement short-term memory for AI agents using Spring AI ChatHistory abstraction
applications/vector-similarity-search/redis-om-springDemonstrates building a vector similarity search application using Spring Boot and Redis OM Spring
applications/vector-similarity-search/spring-aiDemonstrates building a vector similarity search application using Spring Boot and Spring AI

Tutorials

Need a deeper-dive through different use cases and topics?

🤖 Agentic RAG
A tutorial focused on agentic RAG with LlamaIndex and Cohere
☁️ RAG on VertexAI
A RAG tutorial featuring Redis with Vertex AI
🔍 Recommendation Systems
Building realtime recsys with NVIDIA Merlin & Redis
🧑🏻‍💻 Redis Movies Searcher Workshop
A hands-on workshop to create the Redis Movies Searcher application

Integrations

Redis integrates with many different players in the AI ecosystem. Here's a curated list below:

IntegrationDescription
RedisVLA dedicated Python client lib for Redis as a Vector DB
AWS BedrockStreamlines GenAI deployment by offering foundational models as a unified API
LangChain PythonPopular Python client lib for building LLM applications powered by Redis
LangChain JSPopular JS client lib for building LLM applications powered by Redis
LlamaIndexLlamaIndex Integration for Redis as a vector Database (formerly GPT-index)
LiteLLMPopular LLM proxy layer to help manage and streamline usage of multiple foundation models
Semantic KernelPopular lib by MSFT to integrate LLMs with plugins
RelevanceAIPlatform to tag, search and analyze unstructured data faster, built on Redis
DocArrayDocArray Integration of Redis as a VectorDB by Jina AI

Other Helpful Resources


Contributing

We welcome contributions to Redis AI Resources! Here's how you can help:

  1. Add a new recipe: Create a Jupyter notebook demonstrating a Redis AI use case
  2. Improve documentation: Enhance existing notebooks or README with clearer explanations
  3. Fix bugs: Address issues in code samples or documentation
  4. Suggest improvements: Open an issue with ideas for new content or enhancements

To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Please follow the existing style and format of the repository when adding content.

About

✨ A curated list of awesome community resources, integrations, and examples of Redis in the AI ecosystem.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 22

Languages