v36

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0187270483.0 KB
Function Accuracy

Function Review

Estimate human review requirements for a function.

Combines confusion-matrix metrics with the per-transformation evaluation scores (confidence / hallucination / relevance produced by the eval service) to compute:

  • A confidence-bucketed distribution of the function's outputs.
  • Sample-size estimates at configurable margin-of-error and confidence levels (Wald or Wilson intervals).
  • A precision-recall AUC and a per-threshold matrix you can use to pick a review cutoff.

Supported for every function type that produces transformations and feeds the auto-evaluation pipeline: extract, transform, analyze, join. Extract works on both vision (PDF/PNG/JPEG/HEIC/HEIF/WebP) and OCR-routed inputs.

Pass isRegression: true to scope the review to transformations created by a previous regression run (see POST /v3/functions/regression).

post/v3/functions/review

Request body

functionNamestring required

Name of the function to analyze

functionVersionNuminteger

Optional function version number to analyze. If not provided, uses the latest/current version of the function.

evaluationVersion'0.1.0-gemini'

Optional evaluation version to filter evaluations by. Must be one of the supported versions. If not provided, defaults to "0.1.0-gemini".

marginOfErrornumber float

Margin of error for statistical calculations

thresholdMinnumber float

Minimum confidence threshold to analyze

thresholdMaxnumber float

Maximum confidence threshold to analyze

thresholdStepnumber float

Step size for threshold analysis (smaller = more granular)

confidenceLevelsinteger[]

Confidence levels for statistical analysis as integers representing percentages (e.g., [90, 95, 99] for 90%, 95%, 99%). IMPORTANT: Only integers are accepted, floats like 0.95 will be rejected.

confidenceMethod'wald' | 'wilson'

Confidence interval calculation method (default "wald").

  • "wald": Normal approximation method (faster, standard)
  • "wilson": Wilson score interval (more robust for extreme rates)
isRegressionboolean

Internal flag indicating if the request is from a regression test

Response

The request has succeeded.

functionNamestring required

Name of the analyzed function

functionVersionNuminteger required

Version number of the function that was analyzed