Package dev.dokimos.core.conversation
Class LLMSimulatedUser
java.lang.Object
dev.dokimos.core.conversation.LLMSimulatedUser
- All Implemented Interfaces:
SimulatedUser
An LLM-based simulated user for multi-turn conversation testing.
This implementation uses a JudgeLM to generate contextually
appropriate user messages based on a configured persona and behavior
guidelines. It supports both fully dynamic responses and fixed initial
responses.
Example usage:
SimulatedUser user = LLMSimulatedUser.builder()
.judge(judgeLM)
.persona("frustrated customer who received a defective product")
.behaviorGuidelines("Be assertive but not abusive. Express dissatisfaction clearly.")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing LLM simulated users. -
Method Summary
Modifier and TypeMethodDescriptionstatic LLMSimulatedUser.Builderbuilder()Creates a new builder for constructing an LLM simulated user.generateMessage(ConversationTrajectory trajectory) Generates the next user message based on the current conversation state.
-
Method Details
-
builder
Creates a new builder for constructing an LLM simulated user.- Returns:
- a new builder
-
generateMessage
Description copied from interface:SimulatedUserGenerates the next user message based on the current conversation state.The implementation should analyze the trajectory to understand context and generate an appropriate response that advances the conversation in a realistic manner.
- Specified by:
generateMessagein interfaceSimulatedUser- Parameters:
trajectory- the current conversation trajectory- Returns:
- the next user message
-