Skip to content

Conversation

@christso
Copy link
Collaborator

Summary

Fixes a bug where inline rubrics with score_ranges were silently ignored.

Problem

The inline rubrics parsing in yaml-parser.ts and jsonl-parser.ts was not handling:

  • score_ranges field
  • required_min_score field
  • Rubrics with score_ranges but no top-level expected_outcome were filtered out

Solution

  • Parse score_ranges and required_min_score in inline rubrics
  • Fix filter to keep rubrics that have score_ranges (even without expected_outcome)
  • Use proper TypeScript casts for score_range tuples

Test plan

  • All 351 tests pass
  • Build passes
  • Lint passes
  • E2E test on summary-multi-criteria-score-ranges-proposed now uses score_ranges evaluation:
    • factual_accuracy: 10/10 (weight 2.0, required_min_score: 8) ✅
    • brevity_and_clarity: 9/10 (weight 1.0)
    • Final score: 0.967 ✅

🤖 Generated with Claude Code

Align CLI and rubric generator output with expected_outcome and add score-range rubric proposal + mapping analysis.
…lias

- Add description as backward-compatible alias for expected_outcome in all parsers
  (evaluator-parser, yaml-parser, jsonl-parser)
- Add ScoreRange and extended RubricItem types with score_ranges and required_min_score
- Implement score_ranges parsing with validation:
  - Ranges must be integers 0-10
  - Ranges must not overlap
  - Ranges must cover 0-10 inclusive
  - Each range requires non-empty expected_outcome
- Implement score-range evaluation in llm-judge:
  - Detect score_ranges rubrics automatically
  - Build specialized prompt for 0-10 integer scoring
  - Normalize scores to 0-1 (divide by 10)
  - Apply required_min_score gating (legacy required: true = required_min_score: 10)
- Update test to use expected_outcome field name
- Add 4 minimal unit tests for score_ranges validation:
  - Valid score_ranges parsing with required_min_score
  - Overlapping ranges validation error
  - Incomplete coverage validation error
  - Backward-compatible description alias
- Update rubric-evaluator.md skill documentation:
  - Add Score-Range Rubrics (Analytic Mode) section
  - Document score_ranges validation rules
  - Add required_min_score field to table
  - Add "When to Use Each Mode" guidance
  - Note description as backward-compatible alias
The inline rubrics parsing in yaml-parser.ts and jsonl-parser.ts was not
handling score_ranges - they were being silently ignored and filtered out.

- Parse score_ranges and required_min_score in inline rubrics
- Fix filter to keep rubrics that have score_ranges (even without expected_outcome)
- Use proper TypeScript casts for score_range tuples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants