Skip to content
1 min read · 117 words

@nhtio/adk/batteries/vector/conformance

Shared conformance suite for vector-store adapters. Drive any adapter through runVectorStoreConformance to verify it honours the same contract all shipped adapters do. Public, deep-import-only (@nhtio/adk/batteries/vector/conformance) — it imports vitest, an optional peer you install to run the suite; it is never pulled in by the battery barrel.

Functions

FunctionDescription
paddedStubEncoderA dimension-padding encoder factory: wraps stubEncoder and zero-extends to dim. Used by backends that enforce a minimum dimension (e.g. Cloudflare Vectorize requires 32–1536).
runVectorStoreConformanceDrive a vector-store adapter through the shared contract suite.
stubEncoderA deterministic stub encoder producing a 3-dim vector from simple text features.