---
title: "Set Smart Doc Extraction Field Preference"
method: POST
path: "/internal/evals/smart-doc-extraction/preference"
tags: ["internal"]
---

# Set Smart Doc Extraction Field Preference

`POST /internal/evals/smart-doc-extraction/preference`

## Request

- Base URL: `https://api.kobaltlabs.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kobaltlabs.com/internal/evals/smart-doc-extraction/preference`
- Auth: none declared

Save (or clear) a reviewer's pick of which backend's field result was
better for one field of one document, from the comparison pane. Picks are
aggregated into `preference_score` on the returned item and stored in a
per-run sidecar file (`<run_id>-preferences.json`), so re-running the eval
script never wipes out prior human judgments for an earlier run.

## Request body

- SmartDocExtractionPreferenceRequest
  - `run_id` string, required
  - `upload_id` string, required
  - `field_id` string, required
  - `preference` string, nullable

## Response `200`

Successful Response

- SmartDocExtractionResultItem
  - `upload_id` string, required
  - `group` string, required
  - `filename` string, nullable
  - `document_type` string, nullable
  - `smart_document_type` string, required
  - `preview_url` string, nullable
  - `ground_truth_expiration_date` string, nullable
  - `backends` object, required
  - `field_preferences` object
  - `preference_score` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api.md) - [All operations](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api/revisions/8587332d5e43?raw)
