prompt

Interface for prompt.

Classes

Prompt

Initializes the prompt.

Module Contents

class prompt.Prompt(information_need: usersimcrs.core.information_need.InformationNeed, item_type: str, prompt_definition: str, persona: usersimcrs.user_modeling.persona.Persona = None)

Bases: abc.ABC

Initializes the prompt.

Parameters:
  • information_need – The information need of the user.

  • item_type – The type of the item to be recommended.

  • prompt_definition – The definition of the task to be performed.

  • persona – The persona of the user. Defaults to None.

property prompt_text: str

Prompt for the user simulator.

abstract build_new_prompt(**kwargs) str

Builds the initial prompt without any context.

Raises:

NotImplementedError – If the method is not implemented in subclasses.

Returns:

Initial prompt.

update_prompt_context(utterance: dialoguekit.core.utterance.Utterance, participant: dialoguekit.participant.participant.DialogueParticipant) None

Updates the context provided in the prompt.

Parameters:
  • utterance – Utterance to be added to the prompt.

  • participant – Participant of the conversation.