Overview#
The User Friction evaluator classifies whether the latest user message expresses friction with an assistant’s preceding behavior. It detects corrections, retries after an unsuccessful response, frustration, and challenges to unrequested or unexplained actions.
Use it to monitor conversational assistants, identify turns worth reviewing, and measure whether product changes reduce expressed user friction.
no_friction means no friction was expressed. It does not prove that the user
was satisfied; users often abandon conversations without saying why.
Supported Levels#
| Level | Supported | Notes |
|---|---|---|
| Span | Yes | Apply when a span contains the preceding conversation and latest user message. |
| Trace | Yes | Useful when each trace represents one conversational turn. |
| Session | Yes | Evaluate each user turn after the first using the preceding session history. |
Relevant span kinds: AGENT, CHAIN, and LLM spans that preserve multi-turn conversation history.
Input Requirements#
| Field | Type | Description |
|---|---|---|
conversation | string | Human-readable conversation before the target user message. |
user_message / userMessage | string | Latest user message to classify. |
Keep the target message separate from conversation. Include enough preceding
history to distinguish retries and corrections from ordinary follow-ups. Render
tool activity compactly and remove non-human payloads before evaluation.
Output Interpretation#
| Property | Value | Description |
|---|---|---|
label | "friction" or "no_friction" | Classification result |
score | 1.0 or 0.0 | 1.0 means expressed friction |
explanation | string | Judge reasoning |
direction | "minimize" | Lower aggregate scores are better |
Usage Examples#
Using Input Mapping#
Map your trace or dataset fields into the evaluator’s two-field contract. The conversation should end immediately before the target user message.
See Input Mapping for additional mapping options.
Viewing and Modifying the Prompt#
The default prompt is maintained in the classification evaluator config. Adapt it when your application has domain-specific conversational conventions.
Configuration#
For model and provider options, see Configuring the LLM.
Using with Phoenix#
Benchmarks#
On a 40-example public synthetic benchmark using gpt-4o-mini, the default
prompt achieves 0.97 accuracy, 0.98 macro precision, 0.97 macro recall, and
0.97 macro F1. See
user_friction.eval.ts
for the categorized example set.
API Reference#
- Python: UserFrictionEvaluator
- TypeScript: createUserFrictionEvaluator

