Repository navigation
[FIX] Keep execution-distinct seeds when deduplicating - #3773
Open
Chen Yufeiyang (feiiiiii5) wants to merge 1 commit into
Open
Chen Yufeiyang (feiiiiii5) wants to merge 1 commit into
Chen Yufeiyang (feiiiiii5) wants to merge 1 commit into
Conversation
Standalone seeds and singleton groups were deduplicated by the behavioral key alone, so seeds that differed only by seed type, data type, or response_json_schema were silently skipped even though they execute differently. Standalone identity now includes those fields, and singleton/already-stored groups use the full member identity that multi-seed groups already use. Exact duplicates stay skipped; multi-seed group behavior is unchanged. Fixes microsoft#3738
This branch has not been deployed
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.
Fixes #3738.
Description
Seed deduplication used the coarse behavioral key for standalone seeds and for singleton groups, so seeds that differed only by seed type, data type, or response JSON schema were silently skipped: for example a prompt and an objective with the same value, or two singleton groups whose only difference is the response schema. Both execute differently, so only one of them was stored.
The standalone identity now covers the seed type, data type, response schema, and behavioral inputs, and singleton groups (and groups whose complete membership is already stored) are compared by the full member identity already used by multi-seed groups. Exact duplicates are still skipped and the multi-seed group path is unchanged.
Tests and Documentation
New file
tests/unit/memory/memory_interface/test_interface_seed_dedup_identity.pywith 5 cases:response_json_schema: both stored;Evidence:
No documentation or JupyText change: this is an internal dedup semantic fix, and the docstring of
add_seeds_to_memory_asyncis updated to state the identity it now uses.Not run: the full test suite and CI (no Azure SQL instance; the identity key is computed in Python, but that backend was not exercised locally).