## TL;DR

Train on at least 5 documents with the same layout structure, and make sure the training set represents the documents you actually want to extract from. When a key-value pair is missed in production, add that document to the training data and retrain - the model improves per document you feed it.

## Steps

1. Bad label mapping in a custom Form Recognizer model is a training-data problem. Train on at least 5 documents with the same layout structure, and make sure the training set represents the documents you actually want to extract from. When a key-value pair is missed in production, add that document to the training data and retrain - the model improves per document you feed it. Do not debug the analyze call; the OCR text is fine, the model just never learned your layout.

## When to use

You are seeing this: Bad label mapping in a custom Form Recognizer model is a training-data problem. Use this skill when you run into "Custom model mislabels fields - train on 5+ same-layout documents and retrain on misses".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
