Description
API ReferenceEvaluations

Create Feedback

Create feedback for LLM Monitoring results and Evaluation Run results

This endpoint is deprecated. Please use Give Feedback endpoint instead.

Provide feedback for LLM Monitoring results and Evaluation Run results.

Feedbacks are used by Active Learning

Give feedback for a Evaluation Run result:

To give feedback for evaluation run result, following fields has to be provided to identify the sample for which feedback is given:

  • evaluation_run_id
  • evaluator_id
  • evaluation_run_candidate_input_id

Example:

curl --location 'https://api.patronus.ai/v1/feedback' \
  --header 'x-api-key: <your api key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "feedback_positive": true,
    "evaluation_run_id": "1234567891234567890",
    "evaluator_id": "toxicity-v1",
    "evaluation_run_candidate_input_id": 1
  }'

Give feedback for a LLM Monitoring result:

To give feedback for LLM Monitoring result only evaluation_result_id to identify the record.

Example:

curl --location 'https://api.patronus.ai/v1/feedback' \
  --header 'x-api-key: <your api key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "feedback_positive": true,
    "evaluation_result_id": "1234567891234567890"
  }'
POST
/v1/feedback
/v1/feedback

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Request Body

application/jsonRequired

evaluation_run_idEvaluation Run Id

Evaluation Run ID associated with sample for which feedback is given. Only applicable for Evaluation Run results.

evaluator_idEvaluator Id

Evaluator ID associated with sample for which feedback is given. Only applicable for Evaluation Run results.

profile_nameProfile Name

Evaluation run profile name.

evaluation_run_candidate_input_idEvaluation Run Candidate Input Id

ID of the sample for which feedback is given. Only applicable for Evaluation Run results.

evaluation_result_idEvaluation Result Id

Evaluation Result ID for which feedback is given. Only applicable for LLM Monitoring results.

feedback_positive
Required
Feedback Positive

Whether the feedback is positive or negative.

curl -X POST "https://api.patronus.ai/v1/feedback" \
  -H "X-API-KEY: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "evaluation_run_id": "string",
    "evaluator_id": "string",
    "profile_name": "string",
    "evaluation_run_candidate_input_id": 0,
    "evaluation_result_id": "string",
    "feedback_positive": true
  }'

Successful Response

{
  "feedback_positive": true
}