Drop-in adapters for popular vector databases and frameworks. Each integration works in serve mode (map queries on the fly) or offline mode (transform stored vectors).
Full adapter: serve-mode EmbeddingFunction for live queries, plus offline migration with batched I/O and recall sampling.
pip install "isotrieve[chroma]"
Drop-in EmbeddingFunction — new queries map into legacy space on the fly:
from isotrieve.adapters.chroma import IsotrieveChromaFunction
ef = IsotrieveChromaFunction(mapping, new_model_embedder=embed_fn)
col = client.get_collection("docs", embedding_function=ef)
results = col.query(query_texts=["search"], n_results=10)
Transform stored vectors in batches with recall verification:
from isotrieve.adapters.chroma import migrate_collection
report = migrate_collection(
client, "docs", mapping,
new_collection="docs_v2",
batch_size=1000,
)
print(f"Migrated {report.rows_processed} rows")
Drop-in Embeddings shim. Works with any LangChain vector store — Chroma, Qdrant, Pinecone, Weaviate, pgvector.
pip install "isotrieve[langchain]"
Wrap any base embeddings with the Isotrieve mapping:
from isotrieve.adapters.langchain import IsotrieveEmbeddings
from langchain_openai import OpenAIEmbeddings
mapping = Mapping.load("ada002_to_te3.isotrieve")
base = OpenAIEmbeddings(model="text-embedding-3-small")
ae = IsotrieveEmbeddings(mapping, base)
from langchain_chroma import Chroma
db = Chroma.from_documents(docs, embedding=ae)
results = db.similarity_search("query", k=10)
Stream-read adapter for Qdrant collections. Scroll, transform, write — with resumability and parallel upload.
pip install "isotrieve[qdrant]"
from isotrieve.stores.qdrant_store import QdrantStore
import numpy as np
store = QdrantStore.connect(url="http://localhost:6333")
for batch in store.iter_vectors(batch_size=1024):
Z = m.transform(np.stack([r.vector for r in batch]))
Use the CLI for resumable, non-destructive migration:
isotrieve migrate \
--mapping map.isotrieve \
--source-store qdrant \
--source-url http://localhost:6333 \
--source-collection docs \
--target-collection docs_v2 \
--parallel 4
Direct integration for local model inference. Fit mappings without API costs.
pip install "isotrieve[sentence-transformers]"
from sentence_transformers import SentenceTransformer
from isotrieve import RidgeMapping
old = SentenceTransformer("all-MiniLM-L6-v2")
new = SentenceTransformer("BAAI/bge-large-en-v1.5")
X = old.encode(calibration_texts)
Y = new.encode(calibration_texts)
m = RidgeMapping(alpha="auto", seed=0).fit(X, Y)
from isotrieve.quality import QualityGate
gate = QualityGate()
report = gate.evaluate(m, X_heldout, Y_heldout)
print(report.verdict) # PASS / WARN / FAIL
m.save("mapping.isotrieve")
Isotrieve works with any vector store that accepts vectors. The Mapping and QueryAdapter classes are store-agnostic — use them directly:
from isotrieve import RidgeMapping
from isotrieve.serve import QueryAdapter
# Fit and save
m = RidgeMapping(alpha="auto", seed=0).fit(X, Y)
m.save("mapping.isotrieve")
# Serve: map any query into legacy space
qa = QueryAdapter.load("mapping.isotrieve")
legacy_vec = qa.map_query(new_model_embed(query))
pgvector, Pinecone, Weaviate, Milvus, and any numpy-based store work with this pattern. See the Docs for store-specific examples.