redis-developer/redis-ai-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. ✨


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

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

Need quickstarts to begin your Redis AI journey?

RecipeGoogle 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

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:

RecipeGoogle 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

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.

RecipeGoogle 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

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

RecipeGoogle 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 redisvl to setup best cache configOpen In GitHubOpen In Colab

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

RecipeGoogle 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 redisvl to setup best router configOpen In GitHubOpen In Colab

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

RecipeGoogle Colab
🚪 LiteLLM Proxy - Getting started with LiteLLM proxy and RedisOpen In GitHubOpen In Colab
RecipeGoogle 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
RecipeGoogle Colab
👤 Facial Recognition - Build a facial recognition system using the Facenet embedding model and RedisVLOpen In GitHubOpen In Colab
RecipeGoogle 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
RecipeGoogle 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

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

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 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


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

Stars

Watchers

Forks

Contributors 13

Languages