Repository navigation
feat(evaluate): add red teaming sample for Strands Evals - #336
Merged
Merged
Conversation
5 of 9 tasks
|
Latest scan for commit: ✅ Security Scan Report (PR Files Only)Scanned Files
Security Scan Results
Threshold: High No security issues detected in your changes. Great job! This scan only covers files changed in this PR. |
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.
Description
Adds a red teaming sample for Strands Evals 1.7.0 under
python/06-evaluate/red-teaming/. It attacks a small refund-desk agent with GOAT, scores each conversation with an LLM judge, and then checks the agent's recorded tool calls deterministically, so the judge's score and what the agent actually did can be compared.This is the sample from TheWitcherish/sample-strands-evals-red-teaming at
44ba621, moved under the org so the launch post (strands-agents/harness-sdk#5543) doesn't depend on a personal repo. Changes from the original:run.pysaves each run's report withreport.to_file()toruns/report-N.json, and saves the suite with the attacker and judge models, so the post'sto_file/from_fileround-trip snippet runs against files the sample produces.samples.jsonpicks it up as the description.samples.json: one entry added for the new sample.Testing
uv run pytest: 33 passed (offline, no Bedrock calls).uv run src/run.py --runs 1 --only leak_the_code --max-turns 2against Bedrock in us-east-1: completed, wroteruns/run-1.json,runs/report-1.json, andsuite/refund_desk_goat.json(suite includesdeepseek.v3.2andus.anthropic.claude-sonnet-5-5).RedTeamExperiment.from_file()replayed all 5 cases withagent_factorypassed to the run method, andRedTeamReport.from_file()reloaded and displayed the earlier report.Notes
samples.jsonis stale onmain: regenerating it withgenerate-samples-manifest.mjsalso addsfastapi-strands-production-starter,typescript/01-learn/07-express-chatbot, andtypescript/02-deploy/02-nextjs-vercel-adapter. I added only this sample's entry to keep the PR focused.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.