superlinear-ai / raglite

🥤 RAGLite is a Python toolkit for Retrieval-Augmented Generation (RAG) with PostgreSQL or SQLite
Mozilla Public License 2.0
71 stars 2 forks source link

Run hybrid search with a single SQL statement instead of separate invocations of keyword and vector search #39

Open lsorber opened 1 month ago

lsorber commented 1 month ago

Currently, hybrid search executes keyword search and vector search independently, and then combines the results of both with RRF. This could be optimised by implementing a single SQL query that pushes all of this computation to the database.

Related: https://github.com/superlinear-ai/raglite/issues/38