Tech Tips
528 FOLLOWERS
Random ramblings on technical topics.
Tech Tips
10M ago
Summary
This post will cover the usage of guardrails in the context of an RAG application using Redis Stack as the vector store.
Nvidia's guardrail package is used for the railed implementation.
Langchain LCEL is used for the non-railed implementation.
Content from the online Redis vector search documentation is used for the RAG content
GUI is implemented with Chainlit
Application Architecture
This bot is operating within a Chainlit app. It has two modes of operation:
'chain' - no guardrails
'rails' - NeMo guardrails in place for both user inputs and LLM ..read more
Tech Tips
11M ago
Summary
Redis Enterprise has the capability for continuous data integration with 3rd party data sources. This capability is enabled via the Redis Data Integration (RDI) product. With RDI, change data capture (CDC) can be achieved with all the major SQL databases for ingress. Similarly, in the other direction, updates to Redis can be continuously written to 3rd party targets via the write-behind functionality of RDI.
This post covers a demo-grade environment of Redis Enterprise + RDI with ingress and write-behind integrations with the following SQL databases ..read more
Tech Tips
11M ago
Summary
In this post, I cover an approach to a document AI problem using a task flow implemented in Apache Airflow. The particular problem is around the de-duplication of invoices. This comes up in payment provider space. I use Azure AI Document Intelligence for OCR, Azure OpenAI for vector embeddings, and Redis Enterprise for vector search.
Architecture
Code Snippets
File Sensor DAG
OCR DAG
OCR Client (Azure AI Doc Intelligence)
Embedding DAG
Embedding Client (Azure OpenAI)
Vector Search DAG
Vector Search Client (Redis Enterprise)
Source
https://github.com/Redisla ..read more
Tech Tips
1y ago
Summary
This post covers comparisons of various data search scenarios of equivalent SQL and Redis Search commands. The Chinook data set is deployed in Oracle Enterprise. The Oracle Enterprise data is then continuously populated into Redis JSON objects using Redis Data Integration (RDI).
Architecture
This entire architecture is deployed in Docker containers.
Sample Scenarios
Scenario - Which countries have the most Invoices? SQL
Redis Search
Scenario - Which artists have written the most Rock music?
This particular query touches 4 different tables in relational db ..read more
Tech Tips
1y ago
Summary
This is Part 2 of a two-part series on the implementation of a contact center ACD using Redis data structures. This part is focused on the network configuration. In particular, I explain the configuration of HAProxy load balancing with VRRP redundancy in a Redis Enterprise environment. To boot, I explain some of the complexities of doing this inside a Docker container environment.
Part 1: Basic ACD with Redis Enterprise
Part 2: HAProxy with Redis Enterprise
Network Architecture
Load Balancing Configuration
HAProxy w/Keepalived Docker Container
Dockerf ..read more
Tech Tips
1y ago
Summary
This post covers a contact ACD implementation I've done utilizing Redis data structures. The applications are written in Python. The client interface is implemented as REST API via FastAPI. An internal Python app (Dispatcher) is used to monitor and administer the ACD data structures in Redis. Docker containers are used for architectural components.
Part 1: Basic ACD with Redis Enterprise
Part 2: HAProxy with Redis Enterprise
Application Architecture
Data Structures
Contact, Queue
Contacts are implemented as Redis JSON objects. Each cont ..read more
Tech Tips
1y ago
Summary
This post covers a demonstration of the usage of Redis for caching DICOM imagery. I use a Jupyter Notebook to step through loading and searching DICOM images in a Redis Enterprise environment.
Architecture
Redis Enterprise Environment
Screen-shot below of the resulting environment in Docker.
Sample DICOM Image
I use a portion of sample images included with the Pydicom lib. Below is an example:
Code Snippets Data Load
The code below loops through the Pydicom-included DICOM files. Those that contain the meta-data that is going to be subsequently ..read more
Tech Tips
1y ago
Summary
In this post, I cover a utility I wrote for observing Redis vector data and index sizes with varying data types and index parameters. The tool creates a single-node, single-shard Redis Enterprise database with the Search and JSON modules enabled.
Code Snippets Constants and Enums
Redis Index Build and Data Load
Sample Results
Source
https://github.com/Redislabs-Solution-Architects/vss-sizer ..read more
Tech Tips
1y ago
Summary
This post covers a very specific use case of Redis in the short-term rental domain. Specifically, Redis is used to find property availability in a given geographic area and date/time slot.
Architecture
Code Snippets Data Load
The code below loads rental properties as Redis JSON objects and US Postal ZIP codes with their associated lat/longs as Redis strings.
Property Search
The code below represents an Expressjs route for performing searches on the Redis properties. The search is performed on rental property type and geographic distance from a given location.
Source
h ..read more
Tech Tips
1y ago
Summary
I'll be covering the use case of providing supplemental context to OpenAI in a question/answer scenario (ChatGPT). Various news articles will be vectorized and stored in Redis. For a given question that lies outside of ChatGPT's knowledge, additional context will be fetched from Redis via Vector Similarity Search (VSS). That context will aid ChatGPT in providing a more accurate answer.
Architecture
Code Snippets OpenAI Prompt/Collect Helper Function
The code below is a simple function for sending a prompt into ChatGPT and then extracting the resulting respon ..read more