Skip to content

docs(calibration): the 1% label count holds per question type - #25

Merged
rkinas merged 1 commit into
rkinas:mainfrom
agentGreg:docs/calibration-labels-per-type
Oct 20, 2026
Merged

rkinas merged 1 commit into
rkinas:mainfrom
agentGreg:docs/calibration-labels-per-type

Conversation

@agentGreg

@agentGreg agentGreg commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CALIBRATION.md, API.md and the basal-calibrate docstring say the 1% target needs 299 accepted FIT decisions without
an error, "so in practice about 1,000 items or more". The thresholds are certified per type
(thresholds[r].per_type), so the 299 are counted per type. Reading "1,000 items" as a total, a user with 1,000
items split over noul, choice and score expects 1% and gets none. This came up in #19 (point 3).

Change

Docs only:

  • CALIBRATION.md, "How many items": the 299 hold for each type on its own, the counts with one and two errors (473,
    628; one-sided 95% Clopper-Pearson, from calibrate.cp_upper), that a very confident error is accepted at every
    threshold below it, and one external data point: on 1,254 Polish business decisions (FIT: 462 noul, 371
    choice) no type of five basal-2.0 / basal-omni models certified 1%; the lowest bound of any type was 1.2%, and for
    the basal-omni models a few errors at 0.997-0.999 set that floor.
  • API.md and the module docstring: "per question type" / "of the type".

Verification

~/basal-dev-env/bin/python -c "from basal.calibrate import cp_upper; \
  print([next(n for n in range(50, 3000) if cp_upper(e, n) <= 0.01) for e in (0, 1, 2)])"
# [299, 473, 628]

Refs #19

Summary by Sourcery

Clarify that 1% calibration targets require sufficient error-free evidence independently for each question type.

Enhancements:

  • Clarify that 1% calibration evidence thresholds are calculated independently for each question type, including the required sample counts and the impact of errors.

Documentation:

  • Update calibration and API documentation plus the calibration module docstring to explain per-question-type 1% certification requirements and provide supporting calibration guidance and data.

The 299 error-free accepted FIT decisions of the 1% target are counted per type, since the thresholds are certified
per type. CALIBRATION.md says so, gives the counts with one and two errors (473, 628), and notes an external set of
1,254 decisions (FIT: 462 noul, 371 choice) where no type certified 1% (lowest bound 1.2%).
@sourcery-ai

sourcery-ai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Documentation-only changes correct the 1% calibration guidance by making the per-question-type counting rule explicit, adding supporting statistical thresholds and an external example, and aligning the API and module documentation.

File-Level Changes

Change Details Files
Clarify that 1% calibration sample-size requirements are evaluated independently for each question type.
  • State that 299 error-free accepted FIT decisions are required per type, not pooled across types.
  • Add one- and two-error thresholds of 473 and 628 decisions, respectively.
  • Explain that high-confidence errors count at lower thresholds and document an external 1,254-decision calibration result.
  • Update API guidance and the calibration module docstring to say “per question type” and “of the type.”
docs/CALIBRATION.md
docs/API.md
basal/calibrate.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@rkinas
rkinas merged commit 4523a9b into rkinas:main Oct 20, 2026
1 check passed
@rkinas

rkinas commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Thanks! Merged for basal 2.3.1. We re-derived the counts from calibrate.cp_upper ([299, 473, 628] at 1%), and the per-type wording removes a real trap. You are credited in the 2.3.1 release notes.

rkinas added a commit that referenced this pull request Oct 20, 2026
rkinas added a commit that referenced this pull request Oct 21, 2026
…) into 2.3.1

# Conflicts:
#	docs/WHATS_NEW.md
rkinas added a commit that referenced this pull request Nov 2, 2026
The short README drops its sections for 2.4.1 back to 2.0 and its previous-releases text. What they had and
WHATS_NEW.md did not moves here: the 2.4.1 H100 start-up numbers, the 2.3.x community credits for #18, #21, #24
and #25, the precise 2.3 eager baselines, the 2.2 calibration summary and example, the release-note links for
2.1 to 2.3, and basal-1.5 / basal-1.0 under 'Previous releases'.
@agentGreg
agentGreg deleted the docs/calibration-labels-per-type branch November 16, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants