feat(semantic): support high-dimensional embeddings#55
Merged
ualtinok merged 1 commit intoMay 22, 2026
Merged
Conversation
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 #49
Summary
Raises the embedding dimension cap from 1024 to 4096 so larger models like
text-embedding-3-large(3072) can be indexed through the external backends.The cache format and all defaults stay the same.
What changed
semantic_index.rs:MAX_DIMENSIONgoes from 1024 to 4096. Dimensionchecking is consolidated into one
validate_embedding_dimension()that runsboth when a backend returns a batch and when a cache is read back.
build and deserialization.
Why just the cap and one check
This PR intentionally stays small: a constant change plus a single boundary
check. Bigger questions like aggregate memory ceilings and corrupt-cache
hardening are left out so they can be handled on their own if you want them.
Validation
cargo fmt --checkcargo test -p agent-file-tools --test semantic_validation_testcargo test -p agent-file-tools semantic_indexSummary by cubic
Raises the embedding dimension cap to 4096 to support high‑dimensional models like
text-embedding-3-large(3072) and common 4096‑d local models. Cache format and defaults are unchanged.New Features
MAX_DIMENSIONfrom 1024 to 4096.Refactors
validate_embedding_dimension()and use it in batch validation and deserialization.Written for commit 32f7f25. Summary will update on new commits. Review in cubic