Skip to main content

VantaDB × DSPy

DSPy Retriever adapter for VantaDB.

Install

Not on PyPI yet. The vantadb-dspy package builds and passes twine check locally; it will go live with the first adapters-v* tag release. Until then, install from source.

# Today, from a repo checkout
cd integrations/dspy && pip install .

Install from PyPI (after first release)

pip install vantadb-dspy

Quickstart

import dspy
from vantadb_dspy import VantaDBRetriever

retriever = VantaDBRetriever(
    db_path="./my_data",
    namespace="docs",
    k=5,
)

# Use in DSPy program
class RAG(dspy.Module):
    def __init__(self):
        self.retrieve = retriever

    def forward(self, question):
        context = self.retrieve(question)
        return context

API

  • VantaDBRetriever(db_path, namespace, k) — DSPy-compatible retriever
  • forward(query) — search and return passages

Why VantaDB?

  • Embedded & local-first: the storage engine is a Rust library embedded in your process — no server to deploy, no network hop; data lives in your filesystem.
  • Persistent hybrid search: vectors + BM25 text search out of the box; DSPy has no built-in memory, so VantaDB adds retrievable context across program runs.
  • Zero-setup alternative to hosted stacks: unlike Zep (requires a server) or Cognee (spins up its own knowledge-graph runtime), VantaDB is a plain library you import.

Development

pip install -e .

Metadata

Release files for vantadb-dspy 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vantadb-dspy 0.5.0
File Size Uploaded
vantadb_dspy-0.5.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vantadb-dspy 0.5.0
File Interpreter ABI Platform
vantadb_dspy-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / vantadb_dspy-0.5.0.tar.gz

Download URL vantadb_dspy-0.5.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
861092e819b655dbd38e7ea39a91e147800a640b26115fb324f54ca9a76f27bb
BLAKE2b-256 checksum
How to use checksums
704ac50a89b5ad403ea5428ccd7233a2800de08ad790b045a0463805065321ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / vantadb_dspy-0.5.0-py3-none-any.whl

Download URL vantadb_dspy-0.5.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0c0d76f9991f5f8a0272b9c44ebc8fbc2dc53625812e53081ee4d282ccfe750
BLAKE2b-256 checksum
How to use checksums
f10056609b689a4be12a6556daa7d47c9244228e9a6857484e94464e8c54f337
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page