Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e2de968
docs: state the list contract in one place, and correct the claims th…
sromoam Oct 16, 2026
ecaaecd
docs: link the None-list row gap to #418
sromoam Oct 16, 2026
91928e7
docs: link the first-pair mean_score exception to #428
sromoam Oct 19, 2026
9193892
Merge remote-tracking branch 'origin/dev' into docs/lists-contract
sromoam Oct 20, 2026
94f8401
Merge remote-tracking branch 'origin/dev' into m419
sromoam Oct 28, 2026
260fc04
docs: narrow the raw_similarity_score gap to List[StructuredModel] af…
sromoam Oct 28, 2026
1dd9089
Merge origin/dev into docs/lists-contract
sromoam Nov 17, 2026
a17dc85
docs(lists): correct the list contract against dev
sromoam Nov 17, 2026
0597663
docs(results): drop the fixed match gap and correct weighted_score fo…
sromoam Nov 17, 2026
789509f
docs(thresholds): correct what the runtime match_threshold gates
sromoam Nov 17, 2026
71fc040
docs(threshold-gated): qualify equal-length pairing for None, link th…
sromoam Nov 17, 2026
63af654
docs(hungarian): make the Result Structure checkable and nest leaf co…
sromoam Nov 17, 2026
ec0a2f9
docs: point list clipping at the Score rule, and limit the unordered …
sromoam Nov 17, 2026
5528a7e
docs(auto): state every effect of the runtime match_threshold in the …
sromoam Nov 17, 2026
d7dd08b
docs(changelog): re-add the list contract entry under Unreleased
sromoam Nov 17, 2026
4782d50
docs(auto): describe the List[BaseModel] clip gap without an issue link
sromoam Nov 17, 2026
e1d4e47
docs(lists): word the known gaps as defects, not as places the table …
sromoam Nov 17, 2026
174ed08
docs(thresholds): the runtime match_threshold also gates zero-config …
sromoam Nov 17, 2026
8150c77
docs: clip_under_threshold is off by default on dict and plain-model …
sromoam Nov 17, 2026
310a741
docs: qualify the equal-length pairing claims for None elements
sromoam Nov 17, 2026
90db276
docs(lists): scope the order claim to a list field's elements
sromoam Nov 17, 2026
9de4212
docs(lists): mark the List[StructuredModel] clip behaviour as a known…
sromoam Nov 17, 2026
e649f73
docs(lists): fix the review nits on reports, null lists and examples
sromoam Nov 17, 2026
0a314cf
docs(lists): scope the Reports row to field_comparisons, and say non_…
sromoam Nov 17, 2026
3218bc4
docs(lists): scope the clip defaults to a StructuredModel declared in…
sromoam Nov 17, 2026
23bc208
docs(json-schema): x-aws-stickler-infer-unspecified also infers the c…
sromoam Nov 17, 2026
6330692
docs(json-schema): keep the clip Default cell at true, and put the in…
sromoam Nov 17, 2026
69e178c
Merge origin/dev into docs/lists-contract
sromoam Nov 17, 2026
1d7ae07
docs(thresholds): fix the list rows the dev merge left inconsistent
sromoam Nov 17, 2026
aea762b
docs(thresholds): keep the List[StructuredModel] exception in Key Rul…
sromoam Nov 17, 2026
9a375d3
Merge branch 'dev' into docs/lists-contract
sromoam Nov 18, 2026
b918a52
Merge origin/dev into docs/lists-contract
sromoam Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge origin/dev into docs/lists-contract
Keep #406's Nested lists rules with the list contract's TP-pair wording
(an FD pair is not descended into, measured on the merged tree), and point
the Known gaps note at those cases: the value kinds it listed now count as
at top level.
  • Loading branch information
sromoam committed Nov 18, 2026
commit b918a5266f2158a81d7b94c778ef0de9244dbe8b
9 changes: 7 additions & 2 deletions docs/docs/Advanced/classification-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This table is the single statement of how Stickler treats a list field. Other pa
| Score | `sum(pair scores) / max(n_gt, n_pred)`, never clipped as a whole against a field threshold. For primitive, dict and plain-model lists the pair score is the element similarity, zeroed below the bar when `clip_under_threshold` is on. On a `StructuredModel` declared in Python it defaults to on for primitive lists and off for dict and plain-model lists. JSON Schema and the zero-config path have their own defaults ([JSON Schema](../Guides/Evaluation/README.md#extension-reference), [zero-config](../API-Reference/auto.md#inference)). For `List[StructuredModel]` the pair score is `GT[i].compare_with(Pred[j])["overall_score"]`, which applies each field's own threshold and can differ from the pairing similarity. Currently `clip_under_threshold` has no effect there, so an FD pair keeps its score: a known gap. [Worked example](hungarian-matching.md#step-4-list-score). |
| Reports | `field_comparisons`: one row per element of a primitive, dict or plain-model list, whatever its classification (a dict or plain-model element is not expanded into its keys or fields); for `List[StructuredModel]`, one row per leaf of a TP item and one object row per FD, FN or FA item. `non_matches` has the same rows, but only the FD, FN and FA ones. A `field_comparisons` row's `match` is true when its own classification is TP or TN: a value or object row met its bar; a list row had every element paired as a TP, with no FD, FA or FN at the element level. Failures deeper down get their own rows. |

**Known gaps.** Four behaviours are defects, not the contract: `clip_under_threshold` having no effect on `List[StructuredModel]`; inside a list item, a `field_comparisons` row reporting the clipped `score`, and a nested list or object getting one row; a `None` list being reported differently from `[]` in `field_comparisons` (one row for the whole field against a non-empty list, and one row against another `None`, where every other pair of null lists, such as `[]` vs `[]`, gets none); and inside a list item, some value kinds (tuple, set, bytes, whitespace-only string, a list in an `Any` field) counting differently than at top level.
**Known gaps.** Four behaviours are defects, not the contract: `clip_under_threshold` having no effect on `List[StructuredModel]`; inside a list item, a `field_comparisons` row reporting the clipped `score`, and a nested list or object getting one row; a `None` list being reported differently from `[]` in `field_comparisons` (one row for the whole field against a non-empty list, and one row against another `None`, where every other pair of null lists, such as `[]` vs `[]`, gets none); and inside a list item, the cases listed under **Nested lists** below counting differently than at top level.

#### `None` elements in a list {: #none-elements-in-a-list }

Expand Down Expand Up @@ -234,7 +234,12 @@ These are computed at every node of the result tree, from that node's own counts

**List order** -- The order of a list field's elements does not matter. The Hungarian algorithm finds the optimal pairing regardless of element position. A nested list element is compared as one whole value ([Pairing](#list-contract)).

**Nested lists** -- For `List[StructuredModel]`, the Hungarian algorithm pairs objects at the list level, then each TP pair is evaluated recursively ([Recursion](#list-contract)).
**Nested lists** -- For `List[StructuredModel]`, the Hungarian algorithm pairs objects at the list level, then each TP pair is evaluated recursively ([Recursion](#list-contract)): every field the ground-truth element's class declares is classified by the same dispatcher as a top-level field, so it follows the rules on this page. A field annotated as a model, a list, or an `Optional` model or union of models, such as `Optional[Inner]`, `List[str]`, `Optional[Union[A, B]]` or `Union[A, B, List[str]]`, goes to the dispatcher directly. Any other field, such as `Any`, `object`, `Union[A, B]`, `Sequence[str]` or `Optional[Annotated[Inner, Field(...)]]`, is read by its value first. If the classes in one list annotate a field differently, the first matched ground-truth element that declares it decides which, or, when the list's first element is not matched, each pair's own class does. These cases are counted differently from top level:

- A field the predicted element's class does not declare (an extra field) is not counted, where at top level it adds an FA to the root `overall`.
- In a field read by value, a model of another class than the ground truth's is one TP or FD, from the ground-truth model's `compare_with()` score against the field's threshold, and `aggregate` counts it the same way rather than per field. That score reads a field the prediction lacks as `None`, so `Search(query="hotels")` against `Browse(url="x.com")` scores `0.0` and is an FD. A ground-truth field left `None` matches the missing one, so `Inner(a="x", b=None)` against `Other(c="z")` scores `0.5`, from `b`, and is a TP at the default threshold of `0.5`. It scores only the ground truth's own fields, so `Pet(name="tom")` against its subclass `Cat(name="tom", lives=9)` scores `1.0` and is a TP, as the warning under [Objects of different classes](#objects-of-different-classes) says. A field that goes to the dispatcher directly counts such a pair as top level does.
- When a field holds models in some pairs and `None` or a primitive in others, `aggregate` keeps one shape. In a field read by value, every pair counts as one leaf, so the models' own fields are not broken out, and a model of another class has the same effect. In a field that goes to the dispatcher directly, such as `Optional[Inner]`, the models' fields are kept and the other pairs are left out. So `[Inner(a="x", b=None), Inner(a="y", b=None)]` against `[Inner(a="x", b=None), None]` gives `aggregate` 1 TP and 1 FN in an `Any` field and 1 TP and 1 TN in an `Optional[Inner]` one, where the same pairs at top level give 1 TP, 1 TN and 1 FN.
- In a field read by value, an empty list is null, as the null-vs-empty rule above says, so in an `Any` field `None` against `[]` is a TN and `"x"` against `[]` an FN. The same field at top level, and `non_matches`, read `[]` as a value, giving an FA and an FD.

**Missing vs. null fields** -- A missing field and a field explicitly set to `null` are handled the same way: if the other side has a non-null value, the result is FN or FA accordingly.

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.