One query to rule them all, One query to find them, One query to bring them all and in the context bind them
Korvus is a search SDK that unifies the entire RAG pipeline in a single database query. Built on top of Postgres with bindings for Python, JavaScript and Rust, Korvus delivers high-performance, customizable search capabilities with minimal infrastructure concerns.
π Table of Contents
Korvus is an all-in-one, open-source RAG (Retrieval-Augmented Generation) pipeline built for Postgres. It combines LLMs, vector memory, embedding generation, reranking, summarization and custom models into a single query, maximizing performance and simplifying your search architecture.
Korvus stands out by harnessing the full power of Postgres for RAG operations:
-
Postgres-Native RAG: Korvus leverages Postgres' robust capabilities, allowing you to perform complex RAG operations directly within your database. This approach eliminates the need for external services and API calls, significantly reducing latency and complexity many times over.
-
Single Query Efficiency: With Korvus, your entire RAG pipeline - from embedding generation to text generation - is executed in a single SQL query. This "one query to rule them all" approach simplifies your architecture and boosts performance.
-
Scalability and Performance: By building on Postgres, Korvus inherits its excellent scalability and performance characteristics. As your data grows, Korvus grows with it, maintaining high performance even with large datasets.
- Simplified Architecture: Replace complex service oriented architectures with a single, powerful query.
- High Performance: Eliminates API calls and data movement for faster processing and greater reliability.
- Open Source: Improve your developer experience with open source software and models that run locally in Docker too.
- Multi-Language Support: Use Korvus with Python, JavaScript and Rust. Open an issue to vote for other language support.
- Unified Pipeline: Combine embedding generation, vector search, reranking, and text generation in one query.
- Postgres-Powered: Under the hood, Korvus operations are powered by efficient SQL queries on a time-tested database platform.
[Insert system architecture diagram here]
To use Korvus, you need a Postgres database with pgml and pgvector installed. You have two options:
-
Self-hosted: Set up your own database with pgml and pgvector.
- For instructions, see our self-hosting guide.
-
Hosted Service: Use our managed Postgres service with pgml and pgvector pre-installed.
-
Install Korvus:
pip install korvus
-
Initialize Korvus with your database connection:
from korvus import Korvus # For self-hosted: korvus = Korvus(connection_string="postgresql://user:password@localhost/database") # For PostgresML Cloud: korvus = Korvus(connection_string="postgresql://user:password@your-instance.postgresml.org/database")
-
Perform a RAG query:
result = korvus.query("What is the capital of France?") print(result)
While Korvus provides a high-level interface in multiple programming languages, its core operations are built on optimized SQL queries. This approach offers several advantages:
- Transparency: Advanced users can inspect and understand the underlying queries.
- Customizability: Extend Korvus's capabilities by modifying or adding to its SQL operations.
- Performance: Benefit from PostgreSQL's advanced query optimization capabilities.
Don't worry if you're not a SQL expert - Korvus's intuitive API abstracts away the complexity while still allowing you to harness the full power of SQL-based operations.
For comprehensive documentation, including API references, tutorials, and best practices, visit our official documentation.
Join our community to get help, share ideas, and contribute:
We welcome contributions to Korvus! Please read our Contribution Guidelines before submitting pull requests.
Korvus is maintained by PostgresML. For enterprise support and consulting services, please contact us.