prompting.validators.tasks#

Module Contents#

Classes#

Task

Helper class that provides a standard way to create an ABC using

SummaryTask

Helper class that provides a standard way to create an ABC using

QuestionGenerationTask

Helper class that provides a standard way to create an ABC using

QuestionAnswerTask

Helper class that provides a standard way to create an ABC using

Functions#

create_summarization_task(base_text)

create_qg_task(base_text, index)

create_qa_task(base_text, index)

class prompting.validators.tasks.Task#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

base_text: str#
task_name: str#
task_type: str#
criteria: List[prompting.validators.criteria.TaskCriterion]#
abstract compose_prompt()#
Return type:

str

class prompting.validators.tasks.SummaryTask#

Bases: Task

Helper class that provides a standard way to create an ABC using inheritance.

compose_prompt()#
Return type:

str

class prompting.validators.tasks.QuestionGenerationTask#

Bases: Task

Helper class that provides a standard way to create an ABC using inheritance.

compose_prompt()#
Return type:

str

class prompting.validators.tasks.QuestionAnswerTask#

Bases: Task

Helper class that provides a standard way to create an ABC using inheritance.

compose_prompt()#
Return type:

str

prompting.validators.tasks.create_summarization_task(base_text)#
Parameters:

base_text (str) –

Return type:

SummaryTask

prompting.validators.tasks.create_qg_task(base_text, index)#
Parameters:
  • base_text (str) –

  • index (int) –

Return type:

QuestionGenerationTask

prompting.validators.tasks.create_qa_task(base_text, index)#
Parameters:
  • base_text (str) –

  • index (int) –

Return type:

QuestionAnswerTask