Monday, May 29, 2023

OpenAI + Redis VSS w/JSON

Summary

This post will cover an example of how to use Redis Vector Similarity Search (VSS) capabilities with OpenAI as the embedding engine.  Documents will be stored as JSON objects within Redis and then searched via VSS via KNN and Hybrid queries.

Architecture

Code Snippets

OpenAI Embedding


Redis Index Creation


Redis JSON Document Insertion


RedisInsight



Redis Semantic Search (KNN)


Redis Hybrid Search (Full-text + KNN)


Source


Copyright ©1993-2024 Joey E Whelan, All rights reserved.