pyrit.executor.workflow.XPIAResult#

class XPIAResult(processing_conversation_id: str, processing_response: str, score: Score | None = None, attack_setup_response: str | None = None)[source]#

Bases: WorkflowResult

Result of XPIA workflow execution.

Contains the outcome of the cross-domain prompt injection attack, including the processing response, optional score, and attack setup response.

__init__(processing_conversation_id: str, processing_response: str, score: Score | None = None, attack_setup_response: str | None = None) None#

Methods

__init__(processing_conversation_id, ...[, ...])

duplicate()

Create a deep copy of the result.

Attributes

attack_setup_response

score

status

Get the status of the attack result.

success

Determine if the attack was successful based on the score.

processing_conversation_id

processing_response

attack_setup_response: str | None = None#
processing_conversation_id: str#
processing_response: str#
score: Score | None = None#
property status: XPIAStatus#

Get the status of the attack result.

Returns:

The status of the attack result.

Return type:

XPIAStatus

property success: bool#

Determine if the attack was successful based on the score.

Returns:

True if the attack was successful (score exists and has a positive value),

False otherwise.

Return type:

bool