---
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`

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/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/3ff4c0bd276b/schema)
