Coalent sits on top of the vector database you already run — it never constructs, pins, or replaces your client. Your DB stays the retrieval substrate; Coalent adds the freshness/reuse layer above it.
| You have… | Use | Effort |
|---|---|---|
| Qdrant / Chroma / pgvector | a shipped adapter | one line |
| another vector DB | extend BaseVectorRetriever | two methods |
| an existing search function | wrap it with FunctionRetriever | one line |
Shipped adapters
Pass your configured client and the field names; that's it:
from coalent import QdrantRetriever, ChromaRetriever, PgVectorRetriever
QdrantRetriever(client=my_qdrant_client, collection="docs", embed=my_embed)
ChromaRetriever(collection=my_chroma_collection, embed=my_embed)
PgVectorRetriever(connection=my_pg_conn, table="docs", embed=my_embed)
Want hybrid search, custom filters, or reranking? Pass your own search= callable — the adapter does pass-through, so you keep every vendor feature:
QdrantRetriever(client=client, collection="docs", search=my_hybrid_search)
Bring your own client. You pass the client you configured, at the version you run — Coalent uses capability detection so a client upgrade doesn't break the adapter. Nothing in your lockfile to fight.
Any other vector DB
BaseVectorRetriever removes the boilerplate — implement search (call your client's native API) and to_chunk (map one hit, deriving a stable artifact_id):
from coalent import BaseVectorRetriever, Chunk
class WeaviateRetriever(BaseVectorRetriever):
def search(self, query, namespace):
return self.client.near_text(query, limit=6) # your client, in full
def to_chunk(self, hit):
return Chunk(artifact_id=hit["doc_id"], text=hit["text"], version=hit["rev"])
The artifact_id is what freshness keys on — derive it from the document id (not the per-chunk point uuid), so a single source change invalidates the unit cleanly.
Next
- The Retriever — the full ladder: contract,
FunctionRetriever,CompositeRetriever, embeddings. - Vector-search example — a shipped adapter end-to-end, with invalidation.
- With a vector cache — Coalent layered over an existing vector cache.