korvus  by postgresml

Postgres-native RAG SDK

created 1 year ago
1,381 stars

Top 29.9% on sourcepulse

GitHubView on GitHub
Project Summary

Korvus is an open-source SDK designed to streamline the entire Retrieval-Augmented Generation (RAG) pipeline by executing it within a single PostgreSQL database query. It targets developers seeking to simplify complex RAG architectures, reduce latency, and leverage the power and scalability of PostgreSQL for applications requiring efficient, customizable search and generation.

How It Works

Korvus leverages the pgml and pgvector PostgreSQL extensions to encapsulate RAG operations, including embedding generation, vector search, reranking, and text generation, directly within the database. This approach eliminates the need for external API calls and data movement, consolidating the entire pipeline into a single, optimized SQL query for enhanced performance and simplified infrastructure.

Quick Start & Requirements

  • Install: pip install korvus
  • Prerequisites: PostgreSQL database with pgml and pgvector extensions installed. Options include self-hosting or using the managed PostgresML Cloud service.
  • Configuration: Set the KORVUS_DATABASE_URL environment variable.
  • Documentation: Official Documentation

Highlighted Details

  • Unifies the entire RAG pipeline into a single SQL query.
  • Provides SDKs for Python, JavaScript, and Rust, with C support via source build.
  • Built on PostgreSQL, inheriting its scalability and performance.
  • Allows inspection and customization of underlying SQL operations.

Maintenance & Community

Licensing & Compatibility

  • License: Apache 2.0.
  • Compatible with commercial use and closed-source applications.

Limitations & Caveats

The project is built upon PostgreSQL extensions, requiring specific database setup. While the SDK abstracts SQL complexity, advanced customization may necessitate SQL expertise.

Health Check
Last commit

6 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
30 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Omar Sanseviero Omar Sanseviero(DevRel at Google DeepMind), and
3 more.

postgresml by postgresml

0.3%
6k
Postgres extension for in-database ML/AI
created 3 years ago
updated 1 month ago
Feedback? Help us improve.