---
title: "subject(from:)"
framework: evaluations
role: symbol
role_heading: Instance Method
path: "evaluations/evaluation/subject(from:)"
---

# subject(from:)

Produces the subject of evaluation from a given sample.

## Declaration

```swift
nonisolated(nonsending) func subject(from sample: Self.Sample) async throws -> Self.Subject
```

## Parameters

- `sample`: The input sample.

## Mentioned in

Evaluating language model responses Evaluating tool-calling behavior

## Return Value

Return Value The subject of evaluation.

## Discussion

Discussion Implement this method to run your system under test and return the subject that evaluators will measure.

## See Also

### Testing an intelligent feature

- [Subject](evaluations/evaluation/subject.md)
- [EvaluationSubject](evaluations/evaluationsubject.md)
- [ModelSubject](evaluations/modelsubject.md)
- [name](evaluations/evaluation/name.md)
