denselinkage.core.ports.VectorIndex

class denselinkage.core.ports.VectorIndex(*args, **kwargs)[source]

Bases: Protocol

Spec for a vector-index backend — stateless and reusable.

Holds no vectors, only the configuration of which index to build. build is a factory (cf. Trainer, “a factory, not a fit”): it returns a fresh populated SearchableIndex and mutates neither self nor its arguments, so one spec safely builds many artifacts over different datasets.