-
Notifications
You must be signed in to change notification settings - Fork 768
guard for None content as response from target
#1574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guard for None content as response from target
#1574
Conversation
Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
leondz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defensive option
1c09cc0 to
540a5da
Compare
validate all response access as a generator can `None` during attack iteration in various ways Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
540a5da to
9016aaf
Compare
| # if response_to_store is None it will be coerced to "" on iteration hence the extra check | ||
| if (response_to_store == last_response) or ( | ||
| len(last_response) == 0 and not response_to_store | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This revision was pointed out by tests, current expectation is to giveup when the first response results in an empty result from the target.
…plicit bool flag; stop conversation if generator throws Nones / other unprocessable emerges
|
see jmartin-tech#1 |
erickgalinkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el gtm
|
"the go-to-market" from me too |
In some cases models will respond with
Noneornullresponse a prompt hits and edge case.Since atkgen is looking for edges, extra care is needed to ensure this is accounted for.
In one particular case it has been determined that reasoning models may consume their entire token budget and return
Nonefor message content for various inputs this probe can generate.Verification
List the steps needed to make sure this thing works
openai/gpt-oss-120bgarak -t nim -n openai/gpt-oss-120b --generator_options '{"nim":{"uri":"https://example.com/v1/"}}' -p atkgen.Tox