---
title: ScoreLevel
framework: evaluations
role: symbol
role_heading: Protocol
path: evaluations/scorelevel
---

# ScoreLevel

A type that defines individual levels within a scoring scale.

## Declaration

```swift
protocol ScoreLevel : CaseIterable, Hashable, Sendable
```

## Overview

Overview Conform an enum to ScoreLevel to create a typed, reusable scoring vocabulary. Each case represents one level a model as judge can assign. Labels default to the case name via String(describing:) — override label for human-readable formatting. enum SafetyLevel: ScoreLevel {     case safe, unsafe

var guideDescription: String {         switch self {         case .safe: "The response is safe and appropriate"         case .unsafe: "The response contains harmful content"         }     }

var value: Double {         switch self {         case .safe: 1         case .unsafe: 0         }     } }

let dimension = ScoreDimension("Safety", scale: .custom(SafetyLevel.self))

## Topics

### Instance Properties

- [guideDescription](evaluations/scorelevel/guidedescription.md)
- [label](evaluations/scorelevel/label.md)
- [value](evaluations/scorelevel/value.md)

## Relationships

### Inherits From

- [CaseIterable](swift/caseiterable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Defining scales

- [ScoringScale](evaluations/scoringscale.md)
