usersimcrs.simulator.llm.llm_single_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
Initializes the user simulator. |
Module Contents
- class usersimcrs.simulator.llm.llm_single_prompt_user_simulator.LLMSinglePromptUserSimulator(id: str, domain: usersimcrs.core.simulation_domain.SimulationDomain, item_collection: usersimcrs.items.item_collection.ItemCollection, llm_interface: usersimcrs.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.UserSimulatorInitializes 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.
- llm_interface
- prompt