pyrit.score.TrueFalseQuestion

pyrit.score.TrueFalseQuestion#

class TrueFalseQuestion(*, true_description: str, false_description: str = '', category: str = '', metadata: str = '')[source]#

Bases: object

A class that represents a true/false question.

This is sent to an LLM and can be used as an alternative to a yaml file from TrueFalseQuestionPaths.

__init__(*, true_description: str, false_description: str = '', category: str = '', metadata: str = '')[source]#

Initialize a TrueFalseQuestion instance.

Parameters:
  • true_description (str) – Description of what constitutes a “true” response.

  • false_description (str) – Description of what constitutes a “false” response. Defaults to a generic description if not provided.

  • category (str) – The category of the question. Defaults to an empty string.

  • metadata (str) – Additional metadata for context. Defaults to an empty string.

Methods

__init__(*, true_description[, ...])

Initialize a TrueFalseQuestion instance.