Create Eval Case
Record a case: one piece of an agent's output that can be judged.
Record a case: one piece of an agent's output that can be judged.
A case holds what the agent had in front of it and what it produced or chose,
under a kind you name. Judge it with
POST /api/v1/agents/{agent_id}/eval-cases/{case_id}/verdicts. Repeating a
key returns the case already recorded under it, unchanged.
Authorization
HTTPBearer In: header
Path Parameters
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.levainlabs.com/api/v1/agents/string/eval-cases" \ -H "Content-Type: application/json" \ -d '{ "kind": "string", "context": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
"kind": "string",
"key": "string",
"context": "string",
"output": "string",
"options": [
"string"
],
"choice": "string",
"rationale": "string",
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",
"agent_version": 0,
"object_ref": "string",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"gold": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"case_id": "c74269e5-1f97-4e20-9164-ffbe3494d8d6",
"type": "categorical",
"value": {},
"source": "person",
"confidence": 0,
"note": "string",
"status": "candidate",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"accepted_by": "string",
"accepted_at": "2019-08-24T14:15:22Z"
},
"candidates": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"case_id": "c74269e5-1f97-4e20-9164-ffbe3494d8d6",
"type": "categorical",
"value": {},
"source": "person",
"confidence": 0,
"note": "string",
"status": "candidate",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"accepted_by": "string",
"accepted_at": "2019-08-24T14:15:22Z"
}
],
"verdicts": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"case_id": "c74269e5-1f97-4e20-9164-ffbe3494d8d6",
"type": "categorical",
"value": {},
"source": "person",
"confidence": 0,
"note": "string",
"status": "candidate",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"accepted_by": "string",
"accepted_at": "2019-08-24T14:15:22Z"
}
]
}