-
[OPIK-3611] [FE] Pre-populate input/output fields in online score rules with default values (#4774)
发布于
2026-01-16 18:08:52 +00:00 - [OPIK-3611] [FE] Pre-populate input/output fields in online score rules with default values
Pre-populate variable mapping fields with sensible defaults to reduce friction during online score rule creation. This change applies to both LLM-as-judge and Python code metrics across all evaluation templates.
Changes:
- Pre-populate 'input' field with 'input' value (passes entire input object)
- Pre-populate 'output' field with 'output' value (passes entire output object)
- Add clear button (X icon) to Autocomplete component for easy field reset
- Apply defaults to all LLM judge templates (Custom, Hallucination, Moderation, Answer Relevance, Structure Compliance, Meaning Match)
- Apply defaults to Python code metrics (Trace and Span scopes)
- Clear button styled consistently with other UI controls (opacity-50, hover:opacity-100)
- Input field adds right padding (pr-7) when clear button is visible to prevent text overlap
Benefits:
- Faster time-to-value: Users can start using rules immediately with sensible defaults
- Lower cognitive load: Removes decision-making during initial setup
- Better discoverability: Clear button allows users to easily see all available options
- Maintains flexibility: Users can still modify values for advanced use cases (nested properties)
- Consistent UX: Works across all rule types and templates
Implements OPIK-3611
- Revision 2: Change clear button to use onClick instead of onMouseDown for better UX and accessibility
下载附件