Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 20, 2026

When the embedding model changes after indexing, stored chunk embeddings can have a different dimensionality than the query embedding. Previously this was silently treated as 0.0 similarity, producing confusing 0% scores.

This change detects dimension mismatches (and corrupt embedding blobs) during search and returns a clear error suggesting reindexing via: vgrep index --force.

A unit test covers the mismatch case.

Validation:

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant