POST
/
evaluate
curl --request POST \
  --url https://api.deeprails.com/evaluate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model_input": {
    "prompt": "Explain quantum computing",
    "context": "Technical explanation"
  },
  "model_output": "Quantum computing is a type of computation...",
  "model_used": "gpt-4",
  "guardrail_metrics": [
    "correctness",
    "completeness"
  ],
  "score_format": "float",
  "nametag": "customer-support-batch-1",
  "webhook": "https://api.example.com/webhooks/evaluation-complete"
}'
{
  "eval_id": "eval-123e4567-e89b-12d3-a456-426614174000",
  "evaluation_status": "completed",
  "guardrail_metrics": [
    "correctness",
    "completeness"
  ],
  "model_used": "gpt-4",
  "model_input": {},
  "model_output": "<string>",
  "progress": 75,
  "created_at": "2024-01-01T00:00:00Z",
  "start_timestamp": "2024-01-01T00:01:00Z",
  "completion_timestamp": "2024-01-01T00:05:00Z",
  "error_message": "Failed to connect to evaluation service",
  "error_timestamp": "2024-01-01T00:03:00Z",
  "evaluation_result": {
    "correctness": 0.95,
    "completeness": 0.88,
    "overall_score": 0.92
  }
}

Authorizations

Authorization
string
header
required

JWT token for authentication

Body

application/json

Response

200
application/json

Evaluation created successfully

The response is of type object.