autointent.generation.description_generation.enhance_dataset_with_descriptions#

autointent.generation.description_generation.enhance_dataset_with_descriptions(dataset, client, prompt, model_name='gpt-4o-mini')#

Enhances a dataset by generating descriptions for intents using an OpenAI model.

Parameters:
  • dataset (autointent.Dataset) – The dataset containing utterances and intents that require descriptions.

  • client (openai.AsyncOpenAI) – The OpenAI client used to generate the descriptions.

  • prompt (autointent.generation.prompt_scheme.PromptDescription) – A string template for the prompt, which must include placeholders for {intent_name} and {user_utterances} to format the content sent to the model.

  • model_name (str) – The OpenAI model to use for generating descriptions.

Returns:

The dataset with intents enhanced by generated descriptions.

Return type:

autointent.Dataset