Repository navigation
Category search compares only matching embedding spaces - #1036
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks done
zlareb1
force-pushed
the
fix/issue-1033
branch
2 times, most recently
from
November 20, 2026 16:54
b4ebaeb to
dd0f815
Compare
Bind the query embedder model and vector length in category search so incompatible category vectors stay out of the cosine ranking. Signed-off-by: Lareb Zafar <[email protected]>
The quantized category column fixes the physical vector width. Vary dimension metadata to exercise the search filter without failing fixture insertion. Signed-off-by: Lareb Zafar <[email protected]>
zlareb1
force-pushed
the
fix/issue-1033
branch
from
November 20, 2026 18:14
dd0f815 to
5380d89
Compare
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.
Closes: #1033
Changelog category (leave one):
Changelog entry
Category search compares only embeddings from the query's model with the same vector length. Categories embedded by another model stay out of the ranking.
Why
Category registration records its embedding model and dimension, but search filtered only for a positive dimension. This mixed unrelated embedding spaces and allowed different vector lengths to reach cosine distance. Search binds the model from the query embedder and the length of the vector it returned.
Scope and risk
The change adds two predicates to the category search read. Regression tests cover both bindings and live searches with incompatible models or dimension metadata. The analyzer corpus and category-search documentation match the read. Tenant and tombstone filters remain in the query.
Compatibility, rollout and rollback
Tests
Merge status: the following hosted checks have not passed: Cell trigger end-to-end acceptance. The unchecked validation item below records these limits.
Category unit regressions failed on both missing predicates before the fix and pass after it.
make format,make format-check,make lintandmake typecheckpass after rebasing.Current-head category, documentation, linear-cost fixture and benchmark-harness unit tests: 540 passed.
Current-head offline analyzer corpus render and shape checks: 4 passed.
Historical database evidence before this rebase: analyzer corpus against the pinned release, 12 passed.
Historical database evidence before this rebase: live category integration checks, 2 passed.
On the previous head, Linux unit shards, coverage/floors, integrations, mixed-version checks, and quickstarts passed. Two initial unit-job failures passed on one unchanged-head diagnostic retry; no cause was established for those initial failures.
Cell acceptance failed at the fixed workload deadline during measurement. The retained evidence records 20,159 of 20,500 API requests completed. The gate has not passed at merge; the shared entity-normalization work is tracked in Avoid redundant work when resolving entity names #1060.
Current local results apply to
5380d898b9fd220508ec006100db53e8b9beb959, rebased on5fa9f58f7ddec4b6d51c8923848e703abc71bb71. Not all hosted checks passed on this composition. Full Linux unit shards, coverage, integrations, isolation, mixed-version checks, quickstarts and Cell acceptance are incomplete at merge. The separate performance change is not a prerequisite for this rebase.AI assistance in the code
AI-generated (Codex). Verified the query parameters, generated shape diff and targeted test results; each pushed commit receives a fresh independent review.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.test_public_copy.py.