Skip to content

docs: update notebooks for release - #218

Merged
lipikaramaswamy merged 2 commits into
mainfrom
lipikaramaswamy/docs/update-notebooks-for-release
Jul 13, 2026
Merged

docs: update notebooks for release#218
lipikaramaswamy merged 2 commits into
mainfrom
lipikaramaswamy/docs/update-notebooks-for-release

Conversation

@lipikaramaswamy

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue required: this is a docs update for release.

Plan Document

No plan required: this is a docs update for release.

Summary

This PR updates notebooks and notebook_source in the docs preparing for the next release. Includes runs from .evaluate() and updated instructions.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • CI, release, or contributor workflow update

Contributor Checklist

  • PR title follows Conventional Commits, for example fix: handle empty entity list
  • Related issue is linked, or a maintainer-owned no-issue reason is documented above
  • For non-trivial changes, a plan document is linked above, or the no-plan reason is documented above
  • Public API impact checked; skills/anonymizer/SKILL.md updated if needed
  • No real PII added to tests, docs, notebooks, fixtures, or artifacts
  • No API keys, service tokens, private keys, credentials, or real endpoint secrets added

Validation

  • Commands run: make check, make convert-notebooks, make docs-build, make docs-serve
  • Skipped checks or known failures: make check fails ty

Documentation and Artifacts

  • Docs updated, or not needed
  • If docs changed: make docs-build passes locally
  • If tutorial sources changed: notebooks regenerated with make convert-notebooks
  • If e2e, benchmark, or model-provider behavior changed: relevant validation is listed above

Clarify rewrite evaluation guidance and keep notebook licensing metadata out of rendered tutorial content.
@lipikaramaswamy
lipikaramaswamy requested a review from a team as a code owner July 13, 2026 17:56
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR refreshes the release tutorial notebooks and their source files. The main changes are:

  • Moved notebook SPDX notices into the first markdown cell.
  • Updated entity inspection docs to use the public final_entities output.
  • Added clearer privacy warnings for Annotate and rewrite leakage.
  • Made rewrite risk and repair settings explicit in the biography and legal tutorials.
  • Regenerated the committed .ipynb notebooks with new outputs.

Confidence Score: 5/5

This looks safe to merge after a small license-header cleanup.

  • The changed notebook code matches the current public API.
  • The rewrite settings used in the docs are valid.
  • The remaining concern is limited to how stricter license scanners read the notebook source headers.

docs/notebook_source/*.py

Important Files Changed

Filename Overview
docs/notebook_source/02_inspecting_detected_entities.py Uses the public final_entities column for entity counts and keeps trace access for internal grouping details.
docs/notebook_source/04_rewriting_biographies.py Clarifies rewrite and evaluation behavior and makes default repair settings explicit.
docs/notebook_source/05_rewriting_legal_documents.py Adds legal-specific rewrite guidance and stricter risk tolerance settings.
docs/notebook_source/01_your_first_anonymization.py Moves the SPDX notice into markdown content without changing tutorial execution.
docs/notebook_source/03_choosing_a_replacement_strategy.py Moves the SPDX notice into markdown content and makes small markdown formatting updates.
docs/notebooks/01_your_first_anonymization.ipynb Regenerated notebook output for the first anonymization tutorial.
docs/notebooks/02_inspecting_detected_entities.ipynb Regenerated notebook output for the entity inspection tutorial.
docs/notebooks/03_choosing_a_replacement_strategy.ipynb Regenerated notebook output for the replacement strategy tutorial.
docs/notebooks/04_rewriting_biographies.ipynb Regenerated notebook output for the biography rewrite tutorial.
docs/notebooks/05_rewriting_legal_documents.ipynb Regenerated notebook output for the legal rewrite tutorial.

Reviews (1): Last reviewed commit: "docs: polish release notebooks" | Re-trigger Greptile

Comment thread docs/notebook_source/01_your_first_anonymization.py

@memadi-nv memadi-nv 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.

LGTM.

Nit: The PR description says make check fails on ty, but the current CI Type Check is passing. Could you update the Validation section to reflect the current status, or mention whether that was only a local/environment issue?

@lipikaramaswamy
lipikaramaswamy merged commit bf934f7 into main Jul 13, 2026
14 checks passed
@lipikaramaswamy
lipikaramaswamy deleted the lipikaramaswamy/docs/update-notebooks-for-release branch July 13, 2026 18:12
#
# - Records where automated metrics exceed thresholds are flagged for manual review.
# - The repair loop stops after `max_repair_iterations`; records that still need
# repair remain flagged for human review but are not pipeline failures.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

agent (review-pr): Repair and human-review flags use different thresholds

This is not always true. _needs_repair uses repair_threshold, while needs_human_review is calculated separately from the final leakage, utility, and high-sensitivity-leak metrics. With risk_tolerance="minimal", for example, leakage mass 0.8 still needs repair because it exceeds 0.6, but it is not flagged solely for leakage because the review threshold is 1.0.

Suggested wording:

“The repair loop stops after max_repair_iterations. Afterward, needs_human_review is computed separately from the final leakage, utility, and high-sensitivity-leak metrics.”

Comment thread docs/notebook_source/04_rewriting_biographies.py
@@ -145,6 +155,8 @@
# ## 🚩 Filter by review flag
#
# - Records where automated metrics exceed thresholds are flagged for manual review.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

agent (review-pr): The threshold direction differs by metric

“Exceed” is accurate for leakage, but utility triggers review when it falls below its threshold. Could we say:

“Records that cross the configured leakage or utility thresholds are flagged for manual review.”

The same wording appears in notebook 05.

# Call `evaluate()` to run LLM-as-judge scoring on the rewrite result — detection validity and three quality rubrics (privacy, quality, style).
# Evaluation makes additional LLM calls per record. For larger datasets, evaluate
# a preview first; this tutorial evaluates all 25 rows to demonstrate the complete workflow.
# This holistic judge is independent of pipeline leakage scoring, so their assessments may differ.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

agent (review-pr): Clarify what may disagree

“Their” has no clear plural antecedent here. I suggest:

“The holistic privacy rubric and pipeline leakage metric are independent, so they may disagree.”

The same sentence appears in notebook 05.

@binaryaaron binaryaaron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

agent (review-pr): Correct the review-flag guarantee before merging

The refreshed notebooks are synchronized and the validation checks pass. Before merging, please correct the statement that every record still needing repair remains flagged for human review; the implementation uses separate repair and review thresholds. Please also restore file-level SPDX headers in all five .py notebook sources. The remaining comments tighten threshold wording and avoid an unqualified privacy guarantee.

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