Get Function Metrics
Retrieve performance metrics for functions based on labeled transformation data.
Calculates accuracy, precision, recall, F1, and the underlying confusion-matrix
counts for each matching function by comparing model outputs against user
corrections. Metrics are aggregated across every transformation the function
has produced, regardless of function type — extract, transform, analyze,
and join all populate the same metrics column on the transformation row,
so v3 surfaces all of them uniformly.
Filtering
Combine functionIDs / functionNames / types to narrow the result set.
types accepts extract alongside the legacy transform / analyze types
(which remain readable). Pagination is cursor-based.
Requirements
A function only shows non-zero metrics once at least one of its transformations
has been labeled — submit corrections via POST /v3/events/{eventID}/feedback.
Authorization
API Key Authenticate using API Key in request header
In: header
Query Parameters
501 <= value <= 1001 <= items1 <= items1 <= itemsSort direction over the result set (default asc). Pagination works
symmetrically in both directions via startingAfter / endingBefore.
"asc""asc" | "desc"Cursor — a functionID defining your place in the list.
Cursor — a functionID defining your place in the list.
Response Body
application/json
curl -X GET "https://api.bem.ai/v3/functions/metrics"{
"functions": [
{
"functionName": "invoice-extractor",
"totalLabeledResults": 54,
"totalResults": 120,
"metrics": {
"accuracy": 0.7407,
"precision": 0.9524,
"recall": 0.7692,
"f1Score": 0.8511,
"tp": 40,
"fp": 2,
"tn": 0,
"fn": 12
}
}
],
"totalCount": 1
}See also
- System overview — evaluating extraction quality