RFC: vector search support across storage backends - #236
Open
LeeroyHannigan wants to merge 1 commit into
Open
Conversation
DynamoDB reached GA with native vector search on 2026-08-05: a new index type over an attribute holding an embedding, plus a SearchVectors operation returning nearest neighbours ranked by a distance function with exact-match inline filtering. An application that adopts it cannot use ExtendDB for that workload at all, since CreateTable rejects the index type and SearchVectors is unknown. The RFC separates the parts that must be identical everywhere from the part that cannot be. Wire surface, validation, score sign convention, index lifecycle and consistency are defined once in the engine. ANN execution is a declared per-backend capability (Ann, ExactScan, Unsupported), because pgvector and sqlite-vec are operator-installed extensions and MongoDB's vector search exists in Atlas but not in community mongod. Mandating ANN would convert a feature gap into a backend gap. Two design points carry the most risk and are called out deliberately. Score semantics are asymmetric: lower is more similar for Cosine and Euclidean, higher for DotProduct, so normalising to a single similarity inverts ranking for two of three functions. And a vector index is eventually consistent like a GSI, so the existing pending-index queue and gsi_propagation_delay_ms should carry it rather than a second async mechanism, with the index forbidden from reporting ACTIVE while its backfill is still draining. Recall is not assertable by equality, so ExactScan is proposed as the test oracle with ANN held to a recall threshold against it. Five service behaviours are listed as unresolved and needing live verification rather than guessed at, including the dimension-mismatch error on PutItem and whether a missing vector attribute yields sparse-index behaviour.
LeeroyHannigan
requested review from
amrith,
c33howard,
jcshepherd,
pdf-amzn and
yesyayen
as code owners
August 5, 2026 16:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DynamoDB reached GA with native vector search on 2026-08-05: a new index type created over an attribute holding an embedding, plus a
SearchVectorsoperation returning nearest neighbours ranked by a distance function, with optional exact-match inline filtering.An application that adopts it cannot use ExtendDB for that workload at all today.
CreateTablerejects the unknown index type andSearchVectorsis an unknown operation, so local development, CI, and offline or edge deployments lose the ability to exercise the code path.This RFC proposes adding that surface.
The central design question
The RFC separates what must be identical across backends from what cannot be.
Wire surface, validation, score sign convention, index lifecycle and the consistency model are defined once in the engine. ANN execution is a declared per-backend capability (
Ann,ExactScan,Unsupported), because the stores diverge sharply:pgvector, but only if the operator installed itsqlite-vec, likewise a loadable extensionmongodMandating ANN everywhere would convert a feature gap into a backend gap. The recommendation is that vector search be optional for backend acceptance, provided a backend that cannot do it fails closed at
CreateTablewith a typed error rather than returning wrong results later.Two points that carry most of the risk
Score semantics are asymmetric. Lower is more similar for
CosineandEuclidean(0 is identical); higher is more similar forDotProduct. Normalising all three into one "similarity" number inverts the ranking for two of them. I have seen this exact defect in a first-party client library against the real service, so the RFC asks for the sign convention to be asserted per distance function rather than inferred from result sets.A vector index is eventually consistent, the same model as a GSI. So the proposal reuses the existing pending-index queue and
gsi_propagation_delay_msrather than adding a second asynchronous mechanism. It also requires that an index must not reportACTIVEwhile its backfill is still draining, with the transition causally ordered after the drain rather than scheduled on a wall clock beside it.Testing
Recall is not assertable by equality, so
ExactScanis proposed as the oracle (perfect recall) with ANN backends held to a recall threshold against it. Everything deterministic (sign convention, top K truncation, partition-key scoping, filter rejection, lifecycle) is asserted exactly.What I am asking reviewers for
ExactScanbe reachable in a production configuration at all, or gated?Five service behaviours are listed as unresolved rather than guessed at, including the dimension-mismatch error on
PutItemand whether a missing vector attribute gives sparse-index behaviour. I am happy to verify each against the real service before the corresponding code is written.Note on numbering: the file is
0000-vector-search.mdper the process indocs/rfcs/README.md, which keeps0000until acceptance.