MAINT: Add labels to attack results#1624
Open
behnam-o wants to merge 7 commits intomicrosoft:mainfrom
Open
Conversation
rlundeen2
reviewed
Apr 16, 2026
| last_preview = stats.last_message_preview | ||
| labels = dict(stats.labels) if stats.labels else {} | ||
|
|
||
| # Merge attack-result labels with conversation-level labels. |
Contributor
There was a problem hiding this comment.
Confused about this comment. Aren't attack-result labels conversation-level?
rlundeen2
reviewed
Apr 16, 2026
| Get the SQL Azure implementation for filtering AttackResults by labels. | ||
|
|
||
| Matches if the labels are found on the AttackResultEntry directly | ||
| OR on an associated PromptMemoryEntry (via conversation_id). |
Contributor
There was a problem hiding this comment.
Can we get rid of PromptMemoryEntry labels?
Contributor
There was a problem hiding this comment.
I think I'd rather have the route to only attack result labels to simplify things. And a data migration path for the databases
Contributor
Author
There was a problem hiding this comment.
I am putting that in a separate PR (deprecate labels on message piece and its memory entries) and then, this OR will be removed too.
Maybe I'm being over-cautious? should I do the flip in one go?
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.
This PR adds labels to attack results and allows us to remove them from individual message pieces.
Labels are really meaningful in the context of an attack and since all message pieces associated with an attack have the same labels, it makes more sense to store them on the attack result.