Korvus is an open-source retrieval-augmented generation (RAG) pipeline designed to run entirely inside PostgreSQL, allowing developers to build AI search and knowledge systems directly within a database environment. The project consolidates the typical steps of a RAG pipeline—including embedding generation, document retrieval, reranking, and text generation—into a single query executed within the Postgres ecosystem. By leveraging PostgresML and vector extensions such as pgvector, Korvus eliminates the need for external microservices typically used for AI search architectures, reducing both system complexity and latency. The architecture enables machine learning operations to occur directly in the database, minimizing data transfer between services and improving overall performance for large datasets.
Features
- Unified RAG pipeline executed within a single SQL query in PostgreSQL
- In-database machine learning using PostgresML to reduce data transfer overhead
- Integrated vector search, embedding generation, reranking, and text generation
- SDKs available for Python, JavaScript, Rust, and C for flexible integration
- Support for open models and customizable AI pipelines within database queries
- High-performance architecture designed to reduce latency compared to external microservices