Conversation
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
|
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
There was a problem hiding this comment.
agent (review-pr): Two small observability/documentation suggestions and one nonblocking logging follow-up.
The shared resolver and execution/export paths look sound. I have two small changes to suggest:
-
Report the effective detection scope. With
entity_labels=None, configuring examples for a new label activates it alongside the defaults, but measurement metadata and the scope log still report only the default set. For one added label, I reproduced 66 resolved labels versus 65 reported. Please report the effective count using the existing resolution logic, preserving existing metadata field meanings if needed. -
Document the repeated prompt overhead. Each validator chunk receives the full resolved ontology, while the augmenter receives only configured examples. Please mention this alongside the examples documentation: reducing candidates per chunk does not bound example-related prompt overhead or total request cost. This overlaps Greptile’s comment.
One nonblocking follow-up: existing sync/async validation handlers and outer dependency paths log raw exception messages, which can contain sensitive response content. The new metadata-omission test doesn’t cover those paths. Please distinguish that test’s coverage from an end-to-end no-content-logging guarantee; broader sanitation can be tracked separately.
I also reviewed this against the proposed graph-native SDK design and found no architectural reason to delay the feature or add graph-specific abstractions here. The current result/evaluation behavior and run-local resolver can remain unchanged.
Validation: 251 targeted tests passed. No live provider tests were run.
| - Treat example values as potentially sensitive configuration. They are embedded in validator/augmenter prompts, included in exported detection builders, and sent to configured model providers. | ||
| - Example: use synthetic `acme_live_abc123`, never a real production credential or customer identifier. |
There was a problem hiding this comment.
What do we mean here? Is it that users should be discouraged from passing real values? Or something else? The telemetry note below makes sense to me
There was a problem hiding this comment.
Yes, since the examples are sent to model providers. More explained as a warning in the docs here.
Signed-off-by: memadi <memadi@nvidia.com>
Signed-off-by: memadi <memadi@nvidia.com>
|
Thanks for the great reviews. I believe I addressed them all. Next steps after PR approval:
|
Summary
Adds an implementation plan for issue #259, covering per-run entity-label examples for built-in and custom labels.
Detect.entity_label_examples: dict[str, list[str]]— per-run, per-label positive examples that steer GLiNER/LLM detection toward domain-specific formats (e.g. vendor-prefixed API keys) without mutating the process-globalENTITY_LABEL_EXAMPLESmapping.entity_labelsset (entity_labels=[*DEFAULT_ENTITY_LABELS, "vendor_api_key"]to keep all defaults and add one) — examples never implicitly activate a label, matching the explicit requirement in Expose per-label detection examples in the public configuration API #259.resolve_entity_ontology()/normalize_entity_label_examples()(engine/detection/entity_label_examples.py), used by bothDetect's pydantic validation and the engine's direct/distributed export callers, so the two layers can't drift.effective_entity_labels/effective_entity_label_countto run telemetry (post-exclusion default-or-explicit label set), alongside the existing pre-exclusionentity_label_count; downstream wandb reporting prefers the new field and falls back to the old one for historical records. Configured example values are never recorded in telemetry, logs, or warning text.AnonymizerResult/PreviewResult— this is detection-only, as scoped in the issue.Test plan
make test— full suite green (only a pre-existing, unrelatedAF_UNIX path too longfailure in a wandb ingress test on this machine)make format-checkmake typechecktests/config/test_anonymizer_config.py(normalization, isolation, strict-membership validation, exclusion precedence, empty-set errors),tests/engine/test_detection_workflow.pyandtests/engine/test_detection_config_serialization.py(validator/augmenter prompt content, GLiNER label propagation, cross-run isolation, export-path parity),tests/interface/test_anonymizer_interface.py, andtests/test_measurement.py/tests/tools/test_measurement_wandb_logging.py(telemetry fields, no example-value leakage, historical-record fallback)docs/concepts/detection.md,docs/concepts/choosing-a-strategy.md,docs/troubleshooting.md,docs/development/observability.md, andskills/anonymizer/SKILL.md(including itsDetect(...)template)Validation
Documentation and Artifacts
make docs-buildpasses locallymake convert-notebooks