Skip to content

DOC Add scorer composition diagram#2238

Open
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-scorer-composition-diagram
Open

DOC Add scorer composition diagram#2238
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-scorer-composition-diagram

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

Scorer wrappers can be stacked in several ways, but the existing documentation explains each wrapper separately and does not make the supported composition paths clear. This adds a Mermaid diagram that distinguishes runtime composition from inheritance and shows the exact accepted and resulting scorer kinds.

Solid arrows represent values passed through scorer= or scorers=. Dashed arrows represent the scorer base implemented by each result. The surrounding text calls out supported stacking, including float-scale to conversation to threshold to inversion, and rejects generic Scorer types outside the true/false and float-scale bases.

Rendered scorer composition diagram

Tests and Documentation

  • Kept doc/code/scoring/3_combining_scorers.py and its paired notebook synchronized with a strict Jupytext round-trip comparison.
  • Built the complete Jupyter Book HTML and reviewed the rendered page at documentation width.
  • Ran the relevant scorer contract tests: 56 passed.
  • Ran repository pre-commit checks during commit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e451626a-e8bd-49a8-9b71-8598fbbe4ea6
Copilot AI review requested due to automatic review settings July 21, 2026 17:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the scoring documentation by adding a Mermaid diagram that clarifies runtime composition/stacking paths for scorer wrappers (as distinct from the inheritance hierarchy), making it easier for users to understand which scorer kinds can be wrapped/combined and what kind results.

Changes:

  • Added a Mermaid flowchart explaining supported scorer-wrapper composition, including accepted input kinds and resulting scorer kinds.
  • Expanded the surrounding narrative to explicitly describe supported stacking sequences (e.g., float-scale → conversation → threshold → inversion) and invalid generic Scorer usage outside the true/false and float-scale bases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
doc/code/scoring/3_combining_scorers.py Adds a synced markdown cell containing the new Mermaid composition diagram and explanatory text for scorer stacking.
doc/code/scoring/3_combining_scorers.ipynb Updates the corresponding notebook markdown cell to match the new diagram and explanatory text.

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.

3 participants