Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
docs(lists): fix the review nits on reports, null lists and examples
- Reports row and understanding-results: an element of a primitive, dict or
  plain-model list is one row whatever its classification, and a dict or
  plain-model element is not expanded (measured ds[0] and ps[1], TP, with
  no leaf rows).
- Known gaps: a None list is reported differently from [] in
  field_comparisons. Against another None it gets one row, while every
  other pair of null lists ([] vs [], [] vs None, [None] vs None, ...)
  gets none, although each counts one TN.
- aggregate-metrics: say the [A, B] vs [A] example has two-field items.
- CHANGELOG: the Hungarian result block is checkable, not runnable.
  • Loading branch information
sromoam committed Nov 17, 2026
commit e649f73e709d2436e905e5545c41df692b25e57e
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Each release links to full notes on the
its raw similarity, unweighted. Rows inside list items are described as
they are today ([#418](https://github.com/awslabs/stickler/issues/418)).
- The Hungarian matching example shows measured counts and the list score,
and its result block is runnable.
and its result block is checkable.

## [1.0.1] - 2026-11-02

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/Advanced/aggregate-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ Coinciding is not evidence that nothing was hidden, which is the separate and mo
node is treated as a leaf and its `aggregate` becomes a copy of its own
`overall`: one row per rejected item. The same holds for any list with no
accepted item, so its FN and FA items count here as object rows too; beside an
accepted sibling they are left out of `aggregate` (`[A, B]` vs `[A]` reads
`overall tp=1 fn=1`, `aggregate tp=2`). The **unit of the count changes with the
accepted sibling they are left out of `aggregate` (with two-field items,
`[A, B]` vs `[A]` reads `overall tp=1 fn=1`, `aggregate tp=2`). The **unit of the count changes with the
data**. This is decided per node, and needs only that one list's items to be
rejected -- not the whole document:

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/Advanced/classification-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ This table is the single statement of how Stickler treats a list field. Other pa
| Counts (the list node's `overall`) | Paired element: TP if it meets the bar, else FD. Unpaired GT element: FN. Unpaired prediction: FA. An empty, `None` or all-`None` list is null: both null is one TN (score `1.0`); one side null gives one FN or FA per present element (score `0.0`). |
| Recursion | Only TP pairs of `StructuredModel` items are descended into. FD, FN and FA items are atomic. `aggregate` holds the leaves of TP items only, so FD, FN and FA items are left out of it when any sibling was accepted. With no accepted item it falls back to the list node's own counts ([why](aggregate-metrics.md#aggregate-counts-objects-for-an-all-rejected-list)). |
| 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. Declared in Python, it defaults to on for primitive lists and off for dict and plain-model lists; JSON Schema has [its own defaults](../Guides/Evaluation/README.md#extension-reference). 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 | `non_matches` and `field_comparisons`: one row per primitive element or per leaf of a TP item, and one object row per FD, FN or FA item. `match` is true when the row's 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. |
| Reports | `non_matches` and `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. `match` is true when the row's 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 against a non-empty one getting one `field_comparisons` row for the whole field; 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, some value kinds (tuple, set, bytes, whitespace-only string, a list in an `Any` field) counting differently than at top level.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Guides/Evaluation/understanding-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ For list fields (e.g., products, line items), non-match entries can be at the ob

## Field Comparisons

When you pass `document_field_comparisons=True`, the result includes a `field_comparisons` list documenting every individual field comparison -- both matches and non-matches. For a list there is one row per primitive element or per leaf of a TP item, and one object row per FD, FN or FA item ([Reports](../../Advanced/classification-logic.md#list-contract)). Inside a list item, a nested list or object gets one row instead of being expanded, a [known gap](../../Advanced/classification-logic.md#list-contract).
When you pass `document_field_comparisons=True`, the result includes a `field_comparisons` list documenting every individual field comparison -- both matches and non-matches. For a list there is one row per element of a primitive, dict or plain-model list, one row per leaf of a TP `StructuredModel` item, and one object row per FD, FN or FA item ([Reports](../../Advanced/classification-logic.md#list-contract)). Inside a list item, a nested list or object gets one row instead of being expanded, a [known gap](../../Advanced/classification-logic.md#list-contract).

```python
result = ground_truth.compare_with(prediction, document_field_comparisons=True)
Expand Down