Transformations
(DEPRECATED) Get Evaluation Results for Multiple Transformations
DEPRECATED: Use the GET endpoint instead. Retrieves evaluation results for multiple transformations. Returns completed evaluation results, lists transformations that are still pending evaluation, and reports any errors encountered. Invalid transformation IDs will be included in the errors map in the response.
Authorization
API Key x-api-key<token>
Authenticate using API Key in request header
In: header
Request Body
application/json
transformationIDs*array<string>
Array of transformation IDs to get evaluation results for
Items
1 <= items <= 100evaluationVersion?string
Optional evaluation version to filter results by
Value in
"0.1.0-gemini"Response Body
application/json
application/json
application/json
curl -X POST "https://api.bem.ai/v1-beta/transformations/eval/results" \ -H "Content-Type: application/json" \ -d '{ "transformationIDs": [ "tr_2bxoJPNdSD4LgRT4YVC4gt72hlI", "tr_3cxpKQOeTE5MhSU5ZWD5hu83imJ", "tr_invalid" ], "evaluationVersion": "0.1.0-gemini" }'{
"results": {
"tr_2bxoJPNdSD4LgRT4YVC4gt72hlI": {
"fieldMetrics": {
"/companyName": {
"confidenceScore": 0.95,
"reasoning": "Company name is clearly stated in the document header",
"hallucination": false,
"relevanceScore": 1
},
"/totalAmount": {
"confidenceScore": 0.88,
"reasoning": "Amount is extracted from the invoice total line",
"hallucination": false,
"relevanceScore": 0.95
},
"/invoiceNumber": {
"confidenceScore": 0.99,
"reasoning": "Invoice number is clearly visible at the top of the document",
"hallucination": false,
"relevanceScore": 1
},
"/date": {
"confidenceScore": 0.92,
"reasoning": "Date is found in standard invoice date field",
"hallucination": false,
"relevanceScore": 1
}
},
"overallConfidence": 0.935,
"runtime": 1.23,
"hasHallucinations": false,
"evaluationVersion": "0.1.0-gemini",
"createdAt": "2024-01-15T10:30:00Z"
}
},
"pending": [
{
"transformationId": "tr_3cxpKQOeTE5MhSU5ZWD5hu83imJ",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"failed": [
{
"transformationId": "tr_malformed",
"errorMessage": "evaluation failed",
"createdAt": "2024-01-15T10:25:00Z"
},
{
"transformationId": "tr_invalid",
"errorMessage": "transformation ID not found: tr_invalid",
"createdAt": "2024-01-15T10:20:00Z"
}
]
}{
"message": "invalid request body: missing required field 'transformationIDs'",
"code": 400,
"details": {
"field": "transformationIDs",
"reason": "required field missing"
}
}{
"message": "invalid request body: missing required field 'transformationIDs'",
"code": 400,
"details": {
"field": "transformationIDs",
"reason": "required field missing"
}
}