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: clip_under_threshold is off by default on dict and plain-model …
…fields

Measured on a StructuredModel with threshold 0.9 and one key of three
different: a dict and a plain-model field each score 0.6667 by default and
0.0 with clip_under_threshold=True. The parameter table gave the default as
True for every non-list field, and three paragraphs said "(the default)"
without the exception.
  • Loading branch information
sromoam committed Nov 17, 2026
commit 8150c7744fca234e9a4867b772a14061c73a5f32
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Each release links to full notes on the
- `clip_under_threshold` has no effect on `List[StructuredModel]`, so an FD
pair keeps its score
([#415](https://github.com/awslabs/stickler/issues/415)).
- `clip_under_threshold` defaults to off, not on, for dict and plain-model
fields declared in Python and for lists of them.
- `aggregate` leaves out FN and FA items beside an accepted sibling, and a
field `threshold` on `List[StructuredModel]` raises `ValueError`.
- A primitive list element row's `weighted_score` in `field_comparisons` is
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Getting-Started/thresholds-and-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Invoice(StructuredModel):
**What it gates:**

- **TP vs FD classification:** If `similarity >= threshold` (see [Meeting a Threshold](#meeting-a-threshold)), the field is a True Positive. Otherwise, it's a False Discovery.
- **Score clipping:** When `clip_under_threshold=True` (the default), scores below the threshold are zeroed out in the weighted average. A list field follows the [Score](../Advanced/classification-logic.md#list-contract) rule of the list contract instead.
- **Score clipping:** When `clip_under_threshold=True` (the default, except on dict and plain-model fields), scores below the threshold are zeroed out in the weighted average. A list field follows the [Score](../Advanced/classification-logic.md#list-contract) rule of the list contract instead.

**Default:** `0.5`

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/Guides/Evaluation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ When defining a `StructuredModel` subclass in Python, each field is declared wit
| `comparator` | `BaseComparator` | `LevenshteinComparator()` | The comparison algorithm to use. See [Comparators](../Comparators/README.md) for the full list. |
| `threshold` | `float` (0.0--1.0) | `0.5` | Minimum similarity score required for a field to be classified as a match. |
| `weight` | `float` (> 0.0) | `1.0` | Relative importance of this field when computing aggregate scores. |
| `clip_under_threshold` | `bool` | `True` | When `True`, scores below `threshold` are zeroed out before contributing to the weighted average. List fields follow the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract, with defaults that depend on the element type. |
| `clip_under_threshold` | `bool` | `True` (`False` on dict and plain-model fields and lists of them) | When `True`, scores below `threshold` are zeroed out before contributing to the weighted average. List fields follow the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract. |

### How Each Parameter Affects Scoring

Expand All @@ -74,7 +74,7 @@ overall_score = sum(field_score * weight) / sum(weights)

Fields with higher weights pull the overall score toward their individual result. At the dataset level, `BulkStructuredModelEvaluator.compute()` exposes this weight-aware aggregate as `metrics["weighted_overall_score"]` -- prefer it over `cm_f1` when weights are non-uniform, since `cm_f1` treats every field-match equally. See [Weighted Overall Score](bulk-evaluation.md#weighted-overall-score) in the bulk-evaluation guide.

**`clip_under_threshold`** -- When enabled (the default), a field that scores below its threshold contributes 0.0 to the weighted average instead of its partial similarity. This prevents low-confidence matches from inflating the overall score. A list field follows the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract instead.
**`clip_under_threshold`** -- When enabled (the default, except on dict and plain-model fields), a field that scores below its threshold contributes 0.0 to the weighted average instead of its partial similarity. This prevents low-confidence matches from inflating the overall score. A list field follows the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract instead.

### Example Model

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 @@ -36,7 +36,7 @@ A weighted average of all field scores, ranging from 0.0 to 1.0. Calculated as:
overall_score = sum(field_score * field_weight) / sum(field_weights)
```

Fields with `clip_under_threshold=True` (the default) contribute 0.0 if they score below their threshold, rather than their partial similarity. A list field follows the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract instead.
Fields with `clip_under_threshold=True` (the default, except on dict and plain-model fields declared in Python) contribute 0.0 if they score below their threshold, rather than their partial similarity. A list field follows the [Score](../../Advanced/classification-logic.md#list-contract) rule of the list contract instead.

A field absent on both sides scores `1.0` and carries its full weight: a value the model correctly left blank is a value it got right. On a schema where most fields are usually empty this makes `overall_score` behave more like accuracy than like a hit rate. See [Sparse Objects](../../Getting-Started/thresholds-and-metrics.md#sparse-objects) for which metric answers which question.

Expand Down