Series: Azure Content Understanding — Field Schema Design

The Problem

A team had an extraction field for remarks in a document table. The description read:

"Remarks associated to the specific instrument type. This begins with REMARKS and will be an additional row in the document's table, but belonging to the same registration number, overlapping multiple columns in the document."

The extraction worked most of the time. But on certain documents — particularly when a remarks row happened to contain another registration number in its text — the field came back empty.

No code change. No model change. The word "RO993321" appearing inside a remarks line was enough to confuse the model into thinking it had found a new row rather than remark text.

The description wasn't wrong — it was just incomplete. It described the happy path but gave the model no guidance for edge cases. The fix was not a code change. It was a description rewrite.

What Makes a Description "Deterministic"?

A deterministic description is one that gives the model enough information to produce the same output every time it encounters the same input, regardless of edge cases in the document.

A vague description leaves the model to resolve ambiguity on its own. A deterministic description resolves every significant ambiguity explicitly.

There are five properties that separate vague descriptions from deterministic ones:

Property Vague Deterministic
Anchor "A row that belongs to this instrument" "The line positioned directly beneath this instrument's row, same REG. NUM."
Scope "The text of the remark" "The complete text of that one line, reading left to right"
Inclusion rule (silent) "Include any registration numbers that appear in the remark text"
Exclusion rule (silent) "Do NOT include party names; those belong to a PARTIES column on a different line"
Null case (silent) "Return an empty string if this instrument has no REMARKS line"

Before and After: Three Fields

Side-by-side comparison of vague vs deterministic field descriptions in Azure Content Understanding schemas

Field 1: Remarks

Vague:

"description": "Remarks associated to the specific instrument type.
This begins with 'REMARKS' and will be an additional row in the
document's table, overlapping multiple columns."

Problems:

Deterministic:

"description": "The remark for this instrument. A remark is the line
that begins with the word 'REMARKS:' positioned directly beneath this
instrument's row (same REG. NUM.). Return the complete text of that one
line, reading left to right to the end of the line, joining words that
are separated by column gaps into a single string. Include any
registration numbers that appear in the remark text. The remark NEVER
includes party or owner names; those belong to a PARTIES column on a
different line and must be excluded. Return an empty string if this
instrument has no REMARKS line."

What changed: Added row anchor, explicit inclusion rule for embedded registration numbers, explicit exclusion rule for party names, and a null-case instruction.

Field 2: Amount

Vague:

"description": "The monetary amount associated with the instrument
if applicable."

Problems:

Deterministic:

"description": "The monetary amount associated with the instrument,
taken only from the AMOUNT column. Capture ONLY a currency value
(a figure preceded by a '$' sign, e.g. '$29,248,934' or '$557,997').
Do NOT include any non-monetary text such as dates, names, remark text,
or words like 'ADDED', 'DELETED', or 'INSTRUMENTS NOT INCLUDED'.
If the instrument has no dollar amount, return an empty string."

What changed: Explicit format constraint ($ prefix), named examples of text to exclude, explicit null case.

Field 3: PartiesTo

Vague:

"description": "The party or parties to whom the instrument is directed."

Problems:

Deterministic:

"description": "The party or parties to whom the instrument is directed,
taken from the PARTIES TO column. An instrument may list more than one
party on separate lines within this column (e.g. 'THE CORPORATION OF
THE CITY OF ACTON' followed by 'THE REGIONAL MUNICIPALITY'); capture
all such party lines for this instrument. Do NOT include any REMARKS text."

What changed: Explicit multi-line rule, concrete example of multi-party layout, exclusion rule for REMARKS text.

The Five-Question Test

Before finalising any field description, run through this checklist:

If the answer to any of these is "the model will figure it out," that is where your next incident will originate.

Reinforcing Rules at Two Levels

For complex schemas, the same rule should appear at both the field level and the parent array/object level.

Consider a schema that extracts rows from a table. The table-level description governs what counts as a valid row. The field-level description governs what the field captures within a row. A rule that only appears at the field level may be ignored if the table-level logic has already made a conflicting decision.

Table-level (parent array):

"description": "A table of registered instruments. Some instruments
have an additional REMARKS row beneath them — do not create a separate
instrument entry for a REMARKS row. A REMARKS row may itself contain
registration numbers; these are part of the remark text and must NOT
be treated as a new row. Ignore any printout header lines."

Field-level (Remarks):

"description": "...A remarks row often contains one or more registration
numbers as part of its text; these are part of the remark and do NOT
start a new row — still capture the entire remark line and never skip it..."
The rule appears twice. That redundancy is intentional. The model reads both, and agreement between the two levels produces more consistent behaviour than either alone.

Key Takeaways