Skip to main content
Fine-tuning

Validate a grader

POST
/openai/v1/fine_tuning/alpha/graders/validate

Validates the specified grader definition and returns the validation result.

Request BodyContent-Type: application/json
graderOpenAI.GraderStringCheck | OpenAI.GraderTextSimilarity | OpenAI.GraderPython | OpenAI.GraderScoreModel | OpenAI.GraderMultirequired
The grader used for the fine-tuning job.
One of the following:
OpenAI.GraderStringCheck
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
OpenAI.GraderTextSimilarity
A TextSimilarityGrader object which grades text based on similarity metrics.
OpenAI.GraderPython
A PythonGrader object that runs a python script on the input.
OpenAI.GraderScoreModel
A ScoreModelGrader object that uses a model to assign a score to the input.
OpenAI.GraderMulti
A MultiGrader object combines the output of multiple graders to produce a single score.
Responses
graderOpenAI.GraderStringCheck | OpenAI.GraderTextSimilarity | OpenAI.GraderPython | OpenAI.GraderScoreModel | OpenAI.GraderMulti
The grader used for the fine-tuning job.
One of the following:
OpenAI.GraderStringCheck
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
OpenAI.GraderTextSimilarity
A TextSimilarityGrader object which grades text based on similarity metrics.
OpenAI.GraderPython
A PythonGrader object that runs a python script on the input.
OpenAI.GraderScoreModel
A ScoreModelGrader object that uses a model to assign a score to the input.
OpenAI.GraderMulti
A MultiGrader object combines the output of multiple graders to produce a single score.
Request
curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "grader": {
      "type": "string_check",
      "name": "Example string check grader",
      "input": "{{sample.output_text}}",
      "reference": "{{item.label}}",
      "operation": "eq"
    }
  }'
Response
{
  "grader": {
    "type": "string_check",
    "name": "Example string check grader",
    "input": "{{sample.output_text}}",
    "reference": "{{item.label}}",
    "operation": "eq"
  }
}