Skip to content
1 min read · 114 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). The suite has no test-runner dependency: callers invoke it and await the returned promise from any test framework.

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).
runVectorStoreConformanceRun the framework-free vector-store conformance suite against a consumer implementation.
stubEncoderA deterministic stub encoder producing a 3-dim vector from simple text features.