Back to Postgresml

Korvus

pgml-cms/docs/open-source/korvus/README.md

2.10.01.8 KB
Original Source

Korvus

Korvus is an all-in-one, open-source RAG (Retrieval-Augmented Generation) pipeline built for PostgresML. It combines LLMs, vector memory, embedding generation, reranking, summarization and custom models into a single query, maximizing performance and simplifying your search architecture.

Korvus can be installed using standard package managers for JavaScript, Python, and Rust. Since the SDK is written in Rust, the JavaScript and Python packages come with no additional dependencies.

For key features, a quick start, and the code see the Korvus GitHub

Common links:

Installation

Installing the SDK into your project is as simple as:

{% tabs %} {% tab title="JavaScript" %}

bash
npm i korvus

{% endtab %}

{% tab title="Python" %}

bash
pip install korvus

{% endtab %}

{% tab title="Rust" %}

bash
cargo add korvus

{% endtab %}

{% tab title="C" %}

First clone the korvus repository and navigate to the korvus/c directory:

bash
git clone https://github.com/postgresml/korvus
cd korvus/korvus/c

Then build the bindings

bash
make bindings

This will generate the korvus.h file and a .so on linux and .dyblib on MacOS. {% endtab %} {% endtabs %}

Connect to PostgresML

The SDK automatically manages connections to PostgresML. The connection string can be specified as an argument to the collection constructor, or as an environment variable.

If your app follows the twelve-factor convention, we recommend you configure the connection in the environment using the KORVUS_DATABASE_URL variable:

bash
export KORVUS_DATABASE_URL=postgres://user:[email protected]:6432/korvus_database

Next Steps

Common links: