korvus

Library Listed Dormant

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, Rust and C.

Checked · Sources

Downloads
54
Dependents
0
Stars
1,474
Forks
51
Contributors
3
Commits
51
Latest release
1.1.5 ·

About

From the project README ·

One query to rule them all

| Documentation | Blog | Discord |


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

  • 🦅 What is Korvus?
  • 🔠 Languages
  • 🏆 Why Korvus?
  • ⚡ Key Features
  • 🧩 System Architecture
  • 🚀 Get Started
  • 🔍 The Power of SQL
  • 📘 Documentation
  • 🌐 Community
  • 🤝 Contributing

https://github.com/postgresml/korvus/assets/19626586/2b697dc6-8c38-41a7-8c8e-ef158dacb29b

🦅 What is Korvus?

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.

🔠 Languages

Korvus provides SDK support for multiple programming languages, allowing you to integrate it seamlessly into your existing tech stack:

Read the full README

🏆 Why Korvus?

Korvus stands out by harnessing the full power of Postgres for RAG operations:

  1. 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.

  2. 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.

  3. 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.

⚡ Key Features

  • 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.

🧩 System Architecture

Korvus utilizes PostgresML's pgml extension and the pgvector extension to compress the entire RAG pipeline inside of Postgres.

🚀 Get Started

📋 Prerequisites

To use Korvus, you need a Postgres database with pgml and pgvector installed. You have two options:

  1. Self-hosted: Set up your own database with pgml and pgvector.

  2. Hosted Service: Use our managed Postgres service with pgml and pgvector pre-installed.

🏁 Quick Start
  1. Install Korvus:
pip install korvus
  1. Set the KORVUS_DATABASE_URL env variable:
export KORVUS_DATABASE_URL="{YOUR DATABASE CONNECTION STRING}"
  1. Initialize a Collection and Pipeline:
from korvus import Collection, Pipeline
import asyncio

collection = Collection("korvus-demo-v0")
pipeline = Pipeline(
    "v1",
    {
        "text": {
            "splitter": {"model": "recursive_character"},
            "semantic_search": {"model": "Alibaba-NLP/gte-base-en-v1.5"},
        }
    },
)

async def add_pipeline():
    await collection.add_pipeline(pipeline)

asyncio.run(add_pipeline())
  1. Insert documents:
async def upsert_documents():
    documents = [
        {"id": "1", "text": "Korvus is incredibly fast and easy to use."},
        {"id": "2", "text": "Tomatoes are incredible on burgers."},
    ]
    await collection.upsert_documents(documents)

asyncio.run(upsert_documents())
  1. Perform RAG
async def rag():
    query = "Is Korvus fast?"
    print(f"Querying for response to: {query}")
    results = await collection.rag(
        {
            "CONTEXT": {
                "vector_search": {
                    "query": {
                        "fields": {"text": {"query": query}},
                    },
                    "document": {"keys": ["id"]},
                    "limit": 1,
                },
                "aggregate": {"join": "\n"},
            },
            "chat": {
                "model": "meta-llama/Meta-Llama-3-8B-Instruct",
                "messages": [
                    {
                        "role": "system",
                        "content": "You are a friendly and helpful chatbot",
                    },
                    {
                        "role": "user",
                        "content": f"Given the context\n:{{CONTEXT}}\nAnswer the question: {query}",
                    },
                ],
                "max_tokens": 100,
            },
        },
        pipeline,
    )
    print(results)

asyncio.run(rag())

🔍 The Power of SQL

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.

📘 Documentation

For comprehensive documentation, including API references, tutorials, and best practices, visit our official documentation.

🌐 Community

Join our community to get help, share ideas, and contribute:

🤝 Contributing

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.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
Has Python bindings
  • korvus needs Python only with feature python
License
MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

korvus beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
korvus This page Listed Dormant

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, Rust and C.

Python bindings

54 downloads over 30 days 0 1,474 1.1.5 GPU support unknown No native code found MIT
tiktoken-rs Featured

Library for encoding and decoding with the tiktoken library in Rust

3,939,182 downloads over 30 days 449 410 0.12.1 GPU support unknown No native code found MIT

Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine.

170,111 downloads over 30 days 16 431 0.33.0 GPU support unknown No native code found MIT
splintr Listed

Tokenizer for Rust and Python: pure Rust by default, with 18 bundled vocabularies and four backends covering BPE, SentencePiece and WordPiece. Its output matches Hugging Face tokenizers id for id on 14 model families, including GPT-2, Qwen, Whisper, T5 and BERT.

Python bindings

8,204 downloads over 30 days 7 63 0.22.2 GPU support unknown Binds native code: pcre2-sys (feature pcre2) MIT
memvid Listed

Core library for Memvid v2, a crash-safe, deterministic, single-file AI memory.

5,276 downloads over 30 days 2 17,386 2.0.140 CUDA, Metal Binds native code: zstd-sys, link-cplusplus (feature llama-cpp), llama_cpp_sys (feature llama-cpp), ort-sys (feature logic_mesh) Apache-2.0
tinysearch App Listed

🔍 Tiny, full-text search engine for static websites built with Rust and Wasm

147 binary downloads per release Not applicable 2,980 Not measured Not measured Apache-2.0

Persistent cognitive memory for AI agents and robots — Hebbian learning, knowledge graph, spatial recall. Zenoh/ROS2 native. Single binary, runs offline.

Python bindings

1 downloads over 30 days 0 322 0.2.0 GPU support unknown Binds native code: libmimalloc-sys, librocksdb-sys, lz4-sys, ort-sys, pnet_sys (feature zenoh) Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 1,474 stars, 51 forks and 3 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
  • The project is dormant and not finished. Dormancy rule

What else the check found

  • The last activity is on 31 Jan 2025, 647 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
  • The oldest outside issue waits 851 days for a reply, past the limit of 270. No maintainer replied in 365 days. Rot signals rule

Not measured: Latest release fails cargo check.

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 1.1.5 base 700, capped at 3 releases = 150, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2025-01-31, 647 days ago, E = 365: dormant
  • rot: oldest unanswered issue 851 days (limit 270), no maintainer reply in 365 days
  • featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 1474 (needs 4539), forks 51 (needs 434), contributors 3 (needs 79); dormant and not stable
  • listed: listed: no archive, new or featured rule applies

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 21 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-01-31GitHub repositoryYes
Latest release2025-01-31crates.io database dumpYes
First release2024-06-27crates.io database dumpYes
Latest version1.1.5crates.io database dumpYes
Days the oldest outside issue waits for a reply851GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution3 releases, 54 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases3crates.io database dumpYes
Downloads over 30 days54crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository1,474 stars, 51 forks, 3 contributors, 51 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars1474GitHub repositoryYes — one part of the repository route
GitHub forks51GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account3GitHub contributorsYes — one part of the repository route
Commits on the default branch51GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesHas Python bindings: korvus needs Python only with feature pythoncrates.io database dumpNo
Crates that depend on a listed crate directly0crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.