Skip to main content

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.

Info

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#

LevelSupportedNotes
SpanYesApply when a span contains the preceding conversation and latest user message.
TraceYesUseful when each trace represents one conversational turn.
SessionYesEvaluate 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#

FieldTypeDescription
conversationstringHuman-readable conversation before the target user message.
user_message / userMessagestringLatest 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#

PropertyValueDescription
label"friction" or "no_friction"Classification result
score1.0 or 0.01.0 means expressed friction
explanationstringJudge 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#