usersimcrs.simulator.llm.simple_prompt_user_simulator

User simulator leveraging a large language model to generate responses.

The responses are generated via a single prompt template with a large language model.

Classes

SinglePromptUserSimulator

Initializes the user simulator.

Module Contents

class usersimcrs.simulator.llm.simple_prompt_user_simulator.SinglePromptUserSimulator(id: str, domain: usersimcrs.core.simulation_domain.SimulationDomain, item_collection: usersimcrs.items.item_collection.ItemCollection, llm_interface: usersimcrs.simulator.llm.interfaces.llm_interface.LLMInterface, item_type: str, task_definition: str = DEFAULT_TASK_DEFINITION, persona: usersimcrs.user_modeling.persona.Persona = None)

Bases: usersimcrs.simulator.user_simulator.UserSimulator

Initializes the user simulator.

Parameters:
  • id – User simulator ID.

  • llm_interface – Interface to the large language model.

  • item_type – Type of the item to be recommended. Defaults to None.

  • task_definition – Definition of the task to be performed. Defaults to DEFAULT_TASK_DEFINITION.

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