feat(vchordrq): add pluggable exact MaxSim reranking - #478
Draft
HuXinjing wants to merge 1 commit into
Draft
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
gaocegege
added a commit
to tensorchord/CLA
that referenced
this pull request
Aug 24, 2026
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
This is the second implementation slice proposed in Discussion #476.
It introduces a storage-independent exact MaxSim reranking boundary and a CPU reference backend. The reference tensor source reads the indexed expression from the PostgreSQL heap under the active scan snapshot; it does not introduce an external registry, network transport, GPU dependency, or quantized format.
User-visible behavior
vchordrq.maxsim_backend = 'coarse_only'.vchordrq.maxsim_backend = 'cpu_exact'.vchordrq.maxsim_candidate_limit, bounded at 65,536.Architecture boundary
CandidateTensorSourceseparates full-tensor retrieval from scoring.ExactMaxsimBackendseparates exact scoring from candidate generation and storage.HeapTensorSourceis the only source in this PR.CpuExactMaxsimBackendis the only backend in this PR.External tensor-source registration and any optional GPU process remain separate follow-up proposals, contingent on maintainer feedback.
Correctness and safety
HeapFetcher, active PostgreSQL snapshot, and indexed-expression evaluation.Validation
cargo fmt --all -- --checkcargo test --locked --workspace --exclude vchord --no-fail-fasttests/vchordrq/maxsim_cpu_exact.sltLocal validation gap: the isolated PG16 build image contains development headers but no
initdb, so the new SQLLogicTest was not executed against a locally started PostgreSQL server. It is expected to run in the repository CI PostgreSQL matrix.Relationship to other work
This branch is independently based on current
main; it does not depend on #477.