{"data":{"slug":"postgresml-korvus","name":"korvus","tagline":"Unified RAG pipeline in a single database query","github_url":"https://github.com/postgresml/korvus","owner":"postgresml","repo":"korvus","owner_avatar_url":"https://avatars.githubusercontent.com/u/103390393?v=4","primary_language":"Rust","stars":1471,"forks":50,"topics":["ai","embeddings","javascript","llm","ml","python","rag","search","sql"],"archived":false,"github_pushed_at":"2025-01-31T00:00:07+00:00","maintenance_label":"Dormant","stars_delta_30d":2,"url":"https://www.graphcanon.com/tools/postgresml-korvus","markdown_url":"https://www.graphcanon.com/tools/postgresml-korvus.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/postgresml-korvus","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=postgresml-korvus","description":"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.","homepage_url":"https://postgresml.org","license":"MIT","open_issues":9,"watchers":14,"ai_summary":"Korvus is an SDK for search over Postgres that integrates the Retrieval-Augmented Generation (RAG) pipeline. It supports multiple programming languages and focuses on embedding AI capabilities within data retrieval operations.","readme_excerpt":"### 🏁 Quick Start\n\n1. Install Korvus:\n\n```bash\npip install korvus\n```\n\n2. Set the `KORVUS_DATABASE_URL` env variable:\n\n```bash\nexport KORVUS_DATABASE_URL=\"{YOUR DATABASE CONNECTION STRING}\"\n```\n\n3. Initialize a Collection and Pipeline:\n\n```python\nfrom korvus import Collection, Pipeline\nimport asyncio\n\ncollection = Collection(\"korvus-demo-v0\")\npipeline = Pipeline(\n    \"v1\",\n    {\n        \"text\": {\n            \"splitter\": {\"model\": \"recursive_character\"},\n            \"semantic_search\": {\"model\": \"Alibaba-NLP/gte-base-en-v1.5\"},\n        }\n    },\n)\n\nasync def add_pipeline():\n    await collection.add_pipeline(pipeline)\n\nasyncio.run(add_pipeline())\n```\n\n4. Insert documents:\n```python\nasync def upsert_documents():\n    documents = [\n        {\"id\": \"1\", \"text\": \"Korvus is incredibly fast and easy to use.\"},\n        {\"id\": \"2\", \"text\": \"Tomatoes are incredible on burgers.\"},\n    ]\n    await collection.upsert_documents(documents)\n\nasyncio.run(upsert_documents())\n```\n\n5. Perform RAG\n```python\nasync def rag():\n    query = \"Is Korvus fast?\"\n    print(f\"Querying for response to: {query}\")\n    results = await collection.rag(\n        {\n            \"CONTEXT\": {\n                \"vector_search\": {\n                    \"query\": {\n                        \"fields\": {\"text\": {\"query\": query}},\n                    },\n                    \"document\": {\"keys\": [\"id\"]},\n                    \"limit\": 1,\n                },\n                \"aggregate\": {\"join\": \"\\n\"},\n            },\n            \"chat\": {\n                \"model\": \"meta-llama/Meta-Llama-3-8B-Instruct\",\n                \"messages\": [\n                    {\n                        \"role\": \"system\",\n                        \"content\": \"You are a friendly and helpful chatbot\",\n                    },\n                    {\n                        \"role\": \"user\",\n                        \"content\": f\"Given the context\\n:{{CONTEXT}}\\nAnswer the question: {query}\",\n                    },\n                ],\n                \"max_tokens\": 100,\n            },\n        },\n        pipeline,\n    )\n    print(results)\n\nasyncio.run(rag())\n```","github_created_at":"2024-06-24T21:37:54+00:00","created_at":"2026-07-11T11:30:43.802449+00:00","updated_at":"2026-09-20T06:14:41.351364+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"embeddings","name":"embeddings"},{"slug":"javascript","name":"javascript"},{"slug":"llm","name":"llm"},{"slug":"ml","name":"ml"},{"slug":"python","name":"python"},{"slug":"rag","name":"rag"},{"slug":"search","name":"search"}],"trust":{"provenance":{"is_fork":false,"github_id":819613072,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-20T06:14:39.436Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":597,"last_release_at":null,"stars_delta_30d":2,"open_issues_delta_30d":1},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:30:44.986Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-20T06:14:40.551Z"},"languages":{"value":["rust"],"source":"github.language","observed_at":"2026-09-20T06:14:40.551Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-20T06:14:40.551Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"notes":["Compatible programming languages include Rust, Python, JavaScript, and C."],"min_ram_gb":null,"requires_docker":false},"constraints":{"min_ram_gb":null,"requires_docker":false},"when_to_use":["You require seamless integration of AI capabilities into data retrieval actions performed on a Postgres database.","Need to implement RAG functionality in your project but desire simplicity and efficiency by leveraging a single-query approach.","Your development team is proficient in Rust, Python, JavaScript, or C, as Korvus provides support across these languages."],"when_not_to_use":["You seek a solution that operates beyond the Postgres ecosystem, as Korvus specifically integrates with this type of database.","If your project necessitates highly specialized RAG implementations without leveraging existing databases for retrieval tasks."],"source":"enrich:decision_facts","observed_at":"2026-07-12T16:17:58.300Z"},"constraint_facets":{"min_ram_gb":null,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"Compatible programming languages include Rust, Python, JavaScript, and C."},{"label":"Adopt for","value":"Korvus is an SDK leveraging the Retrieval-Augmented Generation (RAG) pipeline within Postgres database operations, supporting multiple programming languages."}]}}