-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add excluded labels for entities in Anonymizer #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
memadi-nv
wants to merge
31
commits into
main
Choose a base branch
from
memadi/feature/add-entity-deny-list
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
04d34e4
feat(config): add entity_label_denylist to Detect config
memadi-nv 5428589
feat(engine): thread entity_label_denylist through detection pipeline
memadi-nv 287e67e
test(engine): verify entity_label_denylist respected in export detect…
memadi-nv e2cd4f0
feat(engine): warn when entity_label_denylist empties the detection l…
memadi-nv 594ccbc
feat(evaluate): propagate entity_label_denylist through evaluation pi…
memadi-nv 2933a18
feat(evaluate): exclude denied labels from coverage judge prompt and …
memadi-nv baf0ac4
update docstring
memadi-nv 06db3ce
update docs accroding to deny entity list
memadi-nv 78a5782
add entity_label_denylist to telemetry
memadi-nv 7d46c3d
add test for entity_label_denylist to telemetry
memadi-nv 29cb7f7
nit-CI test pass
memadi-nv 1a6b5a6
address greptile feedback
memadi-nv 007dc6d
address greptile feedbacl
memadi-nv a387706
Update src/anonymizer/engine/detection/detection_workflow.py
memadi-nv 53e69fd
nit
memadi-nv af0b507
Attach NVSkills validation signatures
svc-nvskills-signing e27bf57
address feedback
memadi-nv 6ef4589
address feedback
memadi-nv 15715bf
ci: temporarily exclude generated skill artifacts
memadi-nv dc23ebc
nit
memadi-nv 91ed207
normalize excluded labels in workflow filters
memadi-nv ca63978
Attach NVSkills validation signatures
svc-nvskills-signing 3614fe6
merge main
memadi-nv fe5aee9
add filter after entity validator
memadi-nv baafb80
fix: handle JSON-string COL_LATENT_ENTITIES payload in exclusion filter
memadi-nv a16c9b3
refactor: extract shared label normalization helper
memadi-nv 52975e8
feat(config): raise when excluded_entity_labels fully overlaps entity…
memadi-nv adc15a1
docs: document excluded_entity_labels overlap raise in remaining spots
memadi-nv bf1cfbf
docs: say "at config time" instead of "at construction time"
memadi-nv f3cffb5
Attach NVSkills validation signatures
svc-nvskills-signing 7bd3864
feat(config): also guard entity_labels=None against full-default excl…
memadi-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,5 @@ CHANGELOG.md | |
| .cursor/ | ||
| .claude/ | ||
| .agent/ | ||
| skills/anonymizer/BENCHMARK.md | ||
| skills/anonymizer/skill-card.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,85 +1,125 @@ | ||
| <!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> | ||
| <!-- SPDX-License-Identifier: Apache-2.0 --> | ||
| # Skill Benchmark: anonymizer | ||
|
|
||
| # Evaluation Report | ||
| > ⚠️ **Overall verdict: INCOMPLETE — Required evidence is missing** | ||
|
|
||
| Evaluation report for the `anonymizer` skill before publication through | ||
| NVSkills-Eval. | ||
| One or more required evaluation tiers did not complete, so this benchmark is not publication-complete. | ||
|
|
||
| This benchmark file records the publication-ready evaluation plan and task | ||
| composition for NeMo Anonymizer. The external NVSkills-Eval run has not been | ||
| executed in this local workspace, so this branch intentionally reports no | ||
| Anonymizer scores. | ||
|
|
||
| ## Evaluation Summary | ||
| ## Evaluation Metadata | ||
|
|
||
| - Skill: `anonymizer` | ||
| - Evaluation date: pending external `/nvskills-ci` run | ||
| - NVSkills-Eval profile: external | ||
| - Environment: external NVSkills-Eval runner | ||
| - Dataset: 6 evaluation tasks | ||
| - Attempts per task: recorded by external NVSkills-Eval after execution | ||
| - Pass threshold: recorded by external NVSkills-Eval after execution | ||
| - Overall verdict: pending external NVSkills-Eval run | ||
|
|
||
| ## Agents Used | ||
|
|
||
| Agent-level measured results are pending the external NVSkills-Eval run. | ||
|
|
||
| ## Metrics Used | ||
|
|
||
| Reported benchmark dimensions: | ||
|
|
||
| - Security: checks whether skill-assisted execution avoids unsafe behavior such | ||
| as secret leakage, destructive commands, or unauthorized access. | ||
| - Correctness: checks whether the agent follows the expected workflow and | ||
| produces the correct final output. | ||
| - Discoverability: checks whether the agent loads the skill when relevant and | ||
| avoids using it when irrelevant. | ||
| - Effectiveness: checks whether the agent performs measurably better with the | ||
| skill than without it. | ||
| - Efficiency: checks whether the agent uses fewer tokens and avoids redundant | ||
| work. | ||
|
|
||
| Underlying evaluation signals will be recorded from the external | ||
| NVSkills-Eval output after execution. | ||
|
|
||
| ## Test Tasks | ||
|
|
||
| The benchmark dataset contains 6 evaluation tasks: | ||
|
|
||
| - Positive tasks: 4 tasks where the skill is expected to activate. | ||
| - Negative tasks: 2 tasks where no skill is expected. | ||
| - Unlabeled tasks: 0 tasks where positive/negative intent cannot be inferred. | ||
|
|
||
| Entries with `should_trigger: true` and `expected_skill: "anonymizer"` are | ||
| positive skill-activation cases. Entries with `should_trigger: false` and | ||
| `expected_skill: null` are negative activation cases. | ||
|
|
||
| ## Results | ||
|
|
||
| External NVSkills-Eval execution is pending. No copied or locally inferred | ||
| Anonymizer results are reported here. | ||
|
|
||
| | Dimension | Tasks | Result | | ||
| |---|---:|---| | ||
| | Security | 6 | Pending external NVSkills-Eval run | | ||
| | Correctness | 6 | Pending external NVSkills-Eval run | | ||
| | Discoverability | 6 | Pending external NVSkills-Eval run | | ||
| | Effectiveness | 6 | Pending external NVSkills-Eval run | | ||
| | Efficiency | 6 | Pending external NVSkills-Eval run | | ||
|
|
||
| ## Tier 1: Static Validation Summary | ||
|
|
||
| Local static validation is covered by this branch's validation evidence. The | ||
| external NVSkills-Eval Tier 1 result is pending the `/nvskills-ci` run. | ||
| - Evaluation date: 2026-09-10 | ||
| - Evaluator version: `1.5.6` | ||
| - Agents: Claude Code (`aws/anthropic/bedrock-claude-opus-4-8`), Codex (`openai/openai/gpt-5.5`) | ||
| - Tasks: 6 evaluation tasks (4 positive, 2 negative) | ||
| - Dataset digest: `sha256:c2c13b2d794c6117dac0402f1261bd2d80972085c5e716426bedff6b3d59b8ae` (skill-evaluator-dataset-snapshot/1) | ||
| - Attempts per task: 3 | ||
| - Environment: `k8s-sandbox` | ||
| - Tier 2 evidence: required for publication | ||
| - Tier 3 evidence: required for publication | ||
|
|
||
| Each task attempt ran in its own isolated sandbox pod. | ||
|
|
||
| ## What This Report Answers | ||
|
|
||
| The three-tier evaluation checks whether the skill: | ||
|
|
||
| - is safe to use; | ||
| - produces correct answers; | ||
| - is discovered and activated when needed; | ||
| - helps the agent complete the user's goal and expected workflow; and | ||
| - avoids wasted skill and tool usage. | ||
|
|
||
| ## Results at a Glance | ||
|
|
||
| | Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) | | ||
| |---|---:|---:| | ||
| | Overall | 89.8% — baseline ran, but no comparable score was available; uplift unavailable | 89.0% — baseline ran, but no comparable score was available; uplift unavailable | | ||
| | Security | 95.0% → 100.0% (+5.0 points) | 100.0% → 83.3% (-16.7 points) | | ||
| | Correctness | 46.0% → 86.7% (+40.7 points) | 75.0% → 100.0% (+25.0 points) | | ||
| | Discoverability | 97.5% — baseline ran, but no comparable score was available; uplift unavailable | 93.8% — baseline ran, but no comparable score was available; uplift unavailable | | ||
| | Effectiveness | 37.6% → 80.3% (+42.7 points) | 51.3% → 87.8% (+36.5 points) | | ||
| | Efficiency | 84.3% — baseline ran, but no comparable score was available; uplift unavailable | 79.8% — baseline ran, but no comparable score was available; uplift unavailable | | ||
|
|
||
| **How to read this table:** baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points. | ||
|
|
||
| Example: `47.0% → 92.0% (+45.0 points)` means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline. | ||
|
|
||
| A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it. | ||
|
|
||
| ## Token Usage | ||
|
|
||
| Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions. | ||
|
|
||
| | Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage | | ||
| |---|---|---:|---:|---:|---:|---| | ||
| | claude-code | All cases | 1,699,362 | 2,863,530 | N/A | N/A | skill 6/6; base 10/10 | | ||
| | claude-code | anonymizer-negative-general-privacy-explainer | 30,472 | 30,464 | +8 | +0.03% | skill 1/1; base 1/1 | | ||
| | claude-code | anonymizer-negative-repository-source-development | 261,745 | 150,049 | +111,696 | +74.44% | skill 1/1; base 1/1 | | ||
| | claude-code | anonymizer-positive-failed-records-first | 185,130 | 431,085 | N/A | N/A | skill 1/1; base 3/3 | | ||
| | claude-code | anonymizer-positive-hash-cross-record-consistency | 456,894 | 31,819 | +425,075 | +1335.92% | skill 1/1; base 1/1 | | ||
| | claude-code | anonymizer-positive-mode-choice | 361,402 | 32,805 | +328,597 | +1001.67% | skill 1/1; base 1/1 | | ||
| | claude-code | anonymizer-positive-self-hosted-gliner | 403,719 | 2,187,308 | N/A | N/A | skill 1/1; base 3/3 | | ||
| | codex | All cases | 1,045,950 | 846,940 | N/A | N/A | skill 6/6; base 8/8 | | ||
| | codex | anonymizer-negative-general-privacy-explainer | 13,778 | 13,555 | +223 | +1.65% | skill 1/1; base 1/1 | | ||
| | codex | anonymizer-negative-repository-source-development | 853,740 | 578,858 | +274,882 | +47.49% | skill 1/1; base 1/1 | | ||
| | codex | anonymizer-positive-failed-records-first | 66,683 | 151,908 | N/A | N/A | skill 1/1; base 3/3 | | ||
| | codex | anonymizer-positive-hash-cross-record-consistency | 29,917 | 24,789 | +5,128 | +20.69% | skill 1/1; base 1/1 | | ||
| | codex | anonymizer-positive-mode-choice | 34,490 | 25,537 | +8,953 | +35.06% | skill 1/1; base 1/1 | | ||
| | codex | anonymizer-positive-self-hosted-gliner | 47,342 | 52,293 | -4,951 | -9.47% | skill 1/1; base 1/1 | | ||
| | ALL AGENTS | Dataset aggregate | 2,745,312 | 3,710,470 | N/A | N/A | skill 12/12; base 18/18 | | ||
|
|
||
| Prompt tokens include cached reads, so total tokens are `prompt + completion` (cached is not added twice). The Efficiency score uses `(prompt - cached) + completion`. N/A means the relevant trajectory counters were not available; coverage is never estimated. | ||
|
|
||
| ## Tier Status | ||
|
|
||
| | Tier | Purpose | Status | Evidence | | ||
| |---|---|---|---| | ||
| | Tier 1 | Static validation | **PASSED WITH OBSERVATIONS** | 1 validator(s); 2 finding(s) | | ||
| | Tier 2 | Semantic deduplication | **NOT RUN** | No result was recorded | | ||
| | Tier 3 | Live agent evaluation | **PASS** | 2 agent(s); 6 task(s) | | ||
|
|
||
| ## Findings and Observations | ||
|
|
||
| <details> | ||
| <summary>Show detailed findings and successful checks</summary> | ||
|
|
||
| - **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (`skills/anonymizer/SKILL.md`) | ||
| - **MEDIUM** SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (`skills/anonymizer/SKILL.md`) | ||
|
|
||
| </details> | ||
|
|
||
| ## Scoring Methodology | ||
|
|
||
| <details> | ||
| <summary>Show dimension definitions, source signals, and thresholds</summary> | ||
|
|
||
| | Dimension | Question | Scored signals | | ||
| |---|---|---| | ||
| | Security | Is it safe to use? | `security` (100%) | | ||
| | Correctness | Is the answer correct? | `accuracy` (100%) | | ||
| | Discoverability | Was the right skill loaded when needed? | `skill_execution` (100%) | | ||
| | Effectiveness | Did the skill help complete the task? | `goal_accuracy` (50%) + `behavior_check` (50%) | | ||
| | Efficiency | Did it avoid wasted tool calls and token usage? | `skill_efficiency` (50%) + `token_efficiency` (50%) | | ||
|
|
||
| - Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%. | ||
| - Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL. | ||
| - Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate. | ||
| - The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold. | ||
| - Effectiveness is the equal-weight mean of goal completion (`goal_accuracy`) and expected workflow adherence (`behavior_check`). | ||
| - Efficiency is 50% tool-call productivity (the backward-compatible `skill_efficiency` wire id) and 50% `token_efficiency`. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial. | ||
|
|
||
| Signals present in this run: | ||
|
|
||
| ## Tier 2: Deduplication Summary | ||
| - `security` (Security): unsafe operations, secret leakage, and unauthorized access. | ||
| - `skill_execution` (Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed. | ||
| - `skill_efficiency` (Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability). | ||
| - `accuracy` (Accuracy): final-answer correctness against the reference answer. | ||
| - `goal_accuracy` (Goal Accuracy): whether the user's goal was achieved. | ||
| - `behavior_check` (Behavior Check): whether the expected workflow behavior was followed. | ||
| - `token_efficiency` (Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency). | ||
|
|
||
| External NVSkills-Eval deduplication results are pending. | ||
| </details> | ||
|
|
||
| ## Publication Recommendation | ||
| ## Freshness | ||
|
|
||
| Proceed to external NVSkills-Eval and signing. Publication should depend on the | ||
| external evaluation and signing results rather than this local preparation | ||
| branch alone. | ||
| Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small mismatch: this says a partial overlap always logs a warning, but the validator only warns when
entity_labelsis explicitly set. Partial exclusions fromDEFAULT_ENTITY_LABELSare accepted without a warning, which is also the common use case. Could we clarify that distinction here and in the matching warning indocs/concepts/choosing-a-strategy.md?