feat: add PyRIT Crescendo adaptive multi-turn to red-team task - #13
Closed
ikrispin wants to merge 1 commit into
Closed
feat: add PyRIT Crescendo adaptive multi-turn to red-team task#13ikrispin wants to merge 1 commit into
ikrispin wants to merge 1 commit into
Conversation
Complement Promptfoo with a full-mode Crescendo step that adapts each turn from live agent responses and scores objectives via LLM-as-judge.
Owner
Author
|
Closing in favor of upstream PR against RHEcosystemAppEng/ABEvalFlow. |
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.
Summary
Adds PyRIT-style adaptive Crescendo as a second red-team stage on top of RHEcosystemAppEng#65 (Promptfoo). Promptfoo keeps broad single-turn coverage; Crescendo runs real-time multi-turn attacks where an attacker LLM adapts each turn from the agent's replies and an LLM-as-judge scores objective success.
Builds on RHEcosystemAppEng#65. Stack this PR onto
konflux-redteam/ merge after (or into) RHEcosystemAppEng#65.Architecture
Crescendo is skipped when
red-team-mode=smoke,eval-engine=ase, or no endpoint. MCP Crescendo is out of scope for this PR.What's included
scripts/pyrit_crescendo/pipeline/images/pyrit/Containerfilehttpx+PyYAML)pipeline/tasks/konflux/red-team.yamlrun-crescendostep + finding mergepipeline/tasks/phases/red-team.yamlpipeline/pipelines/ci-pipeline.yamlpipeline/integration/konflux-eval-pipelinerun.yamlRED_TEAM_CRESCENDO_MAX_TURNSscripts/generate_redteam_config.py"crescendo"strategy (~125 tests)scripts/aggregate_scorecard.pyabevalflow/schemas.pyRedTeamConfig.crescendo_objectivesImage
quay.io/rh-ee-ikrispin/abevalflow-pyrit:0.1Key design decisions
Complementary, not duplicate — Promptfoo's static
crescendostrategy is removed; adaptive multi-turn lives only in the PyRIT-style step (~125 fewer Promptfoo cases; Crescendo is deeper, fewer objectives).Objectives — Use
red_team.crescendo_objectiveswhen set; otherwise auto-derive 3–5 frompurpose/policy/auth_context.Scoring — LLM-as-judge via LiteLLM (not keyword heuristics). Prefer a capable attacker/judge model (e.g. Sonnet); Haiku often refuses to generate attacker turns.
Gating — No separate enable flag; runs whenever red-team is on and mode is
full.How to enable Crescendo objectives
POC validation
Full Crescendo run against Lightspeed in
itay-evalflow(Promptfoo skipped; 5 objectives × max 7 turns, Sonnet attacker/judge): 2/5 objectives marked achieved. Manual review: both are borderline (CVE advisory "attack chain" wording + RH/OpenShift-adjacent education), not clear hard compromises — judge/policy tuning recommended as follow-up.Known limitations
quay-pull-secreton the pipeline SARelated