pyrit.executor.workflow.XPIAManualProcessingWorkflow

pyrit.executor.workflow.XPIAManualProcessingWorkflow#

class XPIAManualProcessingWorkflow(*, attack_setup_target: ~pyrit.prompt_target.common.prompt_target.PromptTarget, scorer: ~pyrit.score.scorer.Scorer, converter_config: ~pyrit.executor.core.config.StrategyConverterConfig | None = None, prompt_normalizer: ~pyrit.prompt_normalizer.prompt_normalizer.PromptNormalizer | None = None, logger: ~logging.Logger = <Logger pyrit.executor.workflow.xpia (WARNING)>)[source]#

Bases: XPIAWorkflow

XPIA workflow with manual processing intervention.

This variant pauses execution to allow manual triggering of the processing target, then accepts the output via console input. This is useful for scenarios where the processing target requires manual interaction or cannot be automated.

The workflow will prompt the operator to manually trigger the processing target’s execution and paste the output into the console for scoring.

__init__(*, attack_setup_target: ~pyrit.prompt_target.common.prompt_target.PromptTarget, scorer: ~pyrit.score.scorer.Scorer, converter_config: ~pyrit.executor.core.config.StrategyConverterConfig | None = None, prompt_normalizer: ~pyrit.prompt_normalizer.prompt_normalizer.PromptNormalizer | None = None, logger: ~logging.Logger = <Logger pyrit.executor.workflow.xpia (WARNING)>) None[source]#

Initialize the XPIA manual processing workflow.

Parameters:
  • attack_setup_target (PromptTarget) – The target that generates the attack prompt and gets it into the attack location.

  • scorer (Scorer) – The scorer to use to score the processing response. This is required to evaluate the manually provided response.

  • converter_config (Optional[StrategyConverterConfig]) – Optional converter configuration for request and response converters.

  • prompt_normalizer (Optional[PromptNormalizer]) – Optional PromptNormalizer instance. If not provided, a new one will be created.

  • logger (logging.Logger) – Logger instance for logging events.

Methods

__init__(*, attack_setup_target, scorer[, ...])

Initialize the XPIA manual processing workflow.

execute_async(**kwargs)

Execute the XPIA workflow strategy asynchronously with the provided parameters.

execute_with_context_async(*, context)

Execute strategy with complete lifecycle management.

get_identifier()