For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
ProductAPI ReferenceChangelogModel Versioning
ProductAPI ReferenceChangelogModel Versioning
    • Authentication
    • API Versioning
  • Workflow Endpoints
    • Run Workflow
    • Workflow Run
    • List Workflow Runs
    • Update Workflow Run
    • Create Workflow
    • Batch Run Workflow
    • Correct Workflow Run (Deprecated)
  • Processor Endpoints
    • Run Processor
    • Get Processor Run
    • Batch Processor Run
    • Create Processor
    • Update Processor
    • Publish Processor Version
    • Processor Version
    • List Processor Versions
  • Parse Endpoints
    • Parse File
  • File Endpoints
    • Upload File
    • Get File
    • List Files
    • Create File (Deprecated)
  • Evaluation Set Endpoints
    • Create Evaluation Set
    • Create Evaluation Set Item
    • Update Evaluation Set Item
    • Bulk Create Evaluation Set Item
  • Objects
    • Block
    • Evaluation Set
    • Evaluation Set Item
    • File
    • Processor
    • Processor Run
    • Batch Processor Run
    • Processor Version
    • Workflow
    • Workflow Run
    • Workflow Run Summary
  • Guides
    • Processor Configs
    • Output Types
    • Bounding Boxes
    • Supported File Types
    • Rate Limits
    • User Roles and Permissions
  • Webhooks
    • Configuration
    • Events
LogoLogo
Book a demoLog in
Evaluation Set Endpoints

Create Evaluation Set Item

Create a new evaluation set item for a given evaluation set.
$curl --location --request POST 'https://api-prod.extend.app/evaluation_set_items' \
>--header 'Content-Type: application/json' \
>--header 'Authorization: Bearer <API_TOKEN>' \
>--data '{
> "evaluationSetId": "eval_set_123",
> "fileId": "file_456",
> "expectedOutput": {
> "value": {
> "invoice_number": "36995",
> "total_amount": 15735.1,
> "line_items": [
> {
> "description": "Premium Widget",
> "quantity": 5,
> "unit_price": {
> "amount": 200.00,
> "iso_4217_currency_code": "USD"
> },
> "total": {
> "amount": 1000.00,
> "iso_4217_currency_code": "USD"
> }
> },
> {
> "description": "Basic Widget",
> "quantity": 10,
> "unit_price": {
> "amount": 25.05,
> "iso_4217_currency_code": "USD"
> },
> "total": {
> "amount": 250.50,
> "iso_4217_currency_code": "USD"
> }
> }
> ]
> },
> "metadata": {},
> }
>}'
Example Response
1{
2 "success": true,
3 "evaluationSetItem": {
4 "object": "evaluation_set_item",
5 "id": "eval_item_1234",
6 "evaluationSetId": "eval_set_123",
7 "fileId": "file_456",
8 "expectedOutput": {
9 // Output object - see “Processor output types” for details
10 },
11 "createdAt": "2024-01-01T00:00:00Z",
12 "updatedAt": "2024-01-01T00:00:00Z"
13 }
14}
Was this page helpful?
Previous

Update Evaluation Set Item

Update an evaluation set item by ID.
Next
Built with

Evaluation set items are the individual files and expected outputs that are used to evaluate the performance of a given processor in Extend. This endpoint will create a new evaluation set item in Extend, which will be used during an evaluation run.

Best Practices for Outputs in Evaluation Sets

  1. Configure First, Output Later
  • Always create and finalize your processor configuration before creating evaluation sets
  • Field IDs in outputs must match those defined in your processor configuration
  1. Type Consistency
  • Ensure output types exactly match your processor configuration
  • For example, if a field is configured as “currency”, don’t submit a simple number value
  1. Field IDs
  • Use the exact field IDs from your processor configuration
  • Create your own semantic IDs instead in the configs for each field/type instead of using the generated ones
  1. Value
  • Remember that all results are inside the value key of a result object, except the values within nested structures.

Body

evaluationSetId
stringRequired

The ID of the evaluation set to add the item to.

fileId
stringRequired

The ID of the file to add to the evaluation set.

expectedOutput
objectRequired

The expected output of the processor when run against the file. This should be a JSON object conforming to the output type schema of the processor.

Response

success
boolean

A true or false value for whether the evaluation set item was created successfully or not.

evaluationSetItem
EvaluationSetItem

An EvaluationSetItem object representing the newly created evaluation set item. See the EvaluationSetItem object for more details.