autointent.generation.utterances.HumanUtteranceGenerator#

class autointent.generation.utterances.HumanUtteranceGenerator(generator, critic, async_mode=False, max_at_once=5, max_per_second=10)#

Generator of human-like utterances.

This class rewrites given user utterances to make them sound more natural and human-like, while preserving their original intent. The generation process is iterative and attempts to bypass a critic that identifies machine-generated text.

Warning

This method is experimental and can yield inferior data quality.

Parameters:
generator#
critic#
async_mode = False#
max_at_once = 5#
max_per_second = 10#
augment(dataset, split_name=Split.TRAIN, update_split=True, n_final_per_class=5)#

Generate human-like utterances for each intent by iteratively refining machine-generated candidates.

Parameters:
  • dataset (autointent.Dataset) – The dataset to augment.

  • split_name (str) – The name of the split to augment (e.g., ‘train’).

  • update_split (bool) – Whether to update the dataset split with the new utterances.

  • n_final_per_class (int) – Number of successful utterances to generate per intent.

Returns:

List of newly generated samples.

Return type:

list[Sample]

async augment_async(dataset, split_name=Split.TRAIN, update_split=True, n_final_per_class=5)#
Parameters:
Return type:

list[autointent.schemas.Sample]