Skip to content

Conversation

@jairad26
Copy link
Contributor

@jairad26 jairad26 commented Oct 28, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • There was a bug in sparse embedding query texts where key_overrides was used during query embedding instead of keys, as per the rename. This PR fixes that, and adds tests to ensure the happy path of embedding query strings works as intended
  • New functionality
    • ...

Test plan

How are these changes tested?

  • [x ] Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jairad26 jairad26 marked this pull request as ready for review October 28, 2025 21:11
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Oct 28, 2025

Fix sparse query embedding to honor renamed "keys" argument

This PR corrects a regression introduced when the sparse-query embedding API renamed the input parameter from key_overrides to keys. The server-side embedding logic still referenced the old name, causing valid keys supplied by clients to be ignored and producing empty or incorrect sparse vectors (degrading recall quality). All internal usages have been updated, and new/updated Python and TypeScript tests assert the correct behavior. A regenerated Cargo.lock is included with no functional impact.

Key Changes

• Replaced all remaining references to key_overrides with keys in chromadb/api/models/CollectionCommon.py
• Added/updated integration tests in Python and TypeScript to cover sparse query embedding with keys
• Regenerated Cargo.lock to keep Rust dependencies in sync

Affected Areas

• chromadb/api/models/CollectionCommon.py
• Python test suite (chromadb/test/api/test_schema_e2e.py)
• JS/TS test suite (clients/new-js/packages/chromadb/test/search.expression.test.ts)
• Cargo.lock (Rust workspace)

This summary was automatically generated by @propel-code-bot

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@jairad26 jairad26 force-pushed the jai/keys-instead-of-key-override branch from 41e84af to 0e03f5c Compare October 28, 2025 21:27
@jairad26 jairad26 force-pushed the jai/keys-instead-of-key-override branch from 0e03f5c to ff3c7a9 Compare October 28, 2025 21:43
@jairad26 jairad26 enabled auto-merge (squash) October 28, 2025 23:01
@jairad26 jairad26 merged commit ff1285d into main Oct 28, 2025
119 of 122 checks passed
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.

3 participants