Skip to content

Commit addad9d

Browse files
committed
feat(docs): add score threshold section to handle false positives
fix
1 parent da45676 commit addad9d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/user_guides/community/presidio.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,34 @@ rails:
9494
- ...
9595
```
9696

97+
## Score Threshold
98+
99+
To avoid false positives when detecting sensitive data entities, you can adjust the `score_threshold` parameter. This threshold defines the minimum confidence value required for a detected entity to be returned. By setting a higher `score_threshold`, you can reduce false positives by requiring a higher confidence level for detected entities. The default value for this parameter is 0.2.
100+
101+
The `score_threshold` parameter can be configured for any of the above sources (input, output and retrieval) to filter out sensitive data entities with a score above the defined threshold. Below is an example configuration that adjusts the `score_threshold` for a specific case:
102+
103+
```yaml
104+
105+
rails:
106+
config:
107+
sensitive_data_detection:
108+
input:
109+
score_threshold: 0.6
110+
entities:
111+
- PERSON
112+
- EMAIL_ADDRESS
113+
- ...
114+
output:
115+
score_threshold: 0.6
116+
entities:
117+
- PERSON
118+
- EMAIL_ADDRESS
119+
- ...
120+
121+
```
122+
123+
For additional guidance on handling undetected PII entities and minimizing false negatives, refer to the [Presidio FAQ](https://microsoft.github.io/presidio/faq/#what-can-i-do-if-presidio-does-not-detect-some-of-the-pii-entities-in-my-data-false-negatives).
124+
97125
## Custom Recognizers
98126

99127
If you have custom entities that you want to detect, you can define custom *recognizers*.

0 commit comments

Comments
 (0)