Transformations
Get Evaluation Results for Multiple Transformations
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.
x-api-key<token>
Authenticate using API Key in request header
In: header
Query Parameters
transformationIDsarray<string>
Array of transformation IDs to get evaluation results for. Formatted as a CSV array.
evaluationVersion?string
Optional evaluation version to filter results by
Value in
"0.1.0-gemini"
Response Body
curl -X GET "https://api.bem.ai/v1-beta/transformations/eval/results?transformationIDs=tr_2bxoJPNdSD4LgRT4YVC4gt72hlI%2Ctr_3cxpKQOeTE5MhSU5ZWD5hu83imJ&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"
}
}