Evaluation Parameters
To compute therole_adherence
metric, the following inputs are required in every turn of the conversation:
input
: The current user message.actual_output
: The corresponding chatbot response.
How Is It Calculated?
Therole_adherence
score is computed through the following LLM-based steps:
- Role Identification: The system extracts the chatbot’s assigned role from the initial context or system prompt.
- Deviation Check: For each turn, the LLM determines whether the
actual_output
deviates from or contradicts the expected behavior of that role.
This metric is adapted from the bias metric of the open source library deepeval, for more information you can also visit their documentation.