Skip to content

Commit

Permalink
feat(data-security): 添加Presidio分析器与SkyFlow隐私库内容
Browse files Browse the repository at this point in the history
新增了Presidio分析器的介绍,包括其如何检测PII(个人身份信息)实体,以及相关的配置示例。同时,添加了SkyFlow LLM Privacy Vault的图像和链接,以展示另一种数据隐私保护解决方案。
  • Loading branch information
phodal committed Aug 1, 2024
1 parent 0a7bdd2 commit 5e61dcd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/agent-data-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,55 @@ Presidio(源自拉丁语praesidium ‘保护、卫戍’)致力于确保敏

![](images/presidio-analyze-anonymize.png)

![](images/presidio-ner-flow.png)

Presidio 分析器是一个基于Python的服务,用于检测文本中的 PII(个人身份信息)实体。

在分析过程中,它运行一组不同的 PII 识别器,每个识别器负责使用不同的机制检测一个或多个PII实体。

Presidio 分析器提供了一组预定义的识别器,但也可以轻松扩展为其他类型的自定义识别器。预定义和自定义识别器利用正则表达式、命名实体识别以及其他类型的逻辑来检测非结构化文本中的PII。

```yaml
nlp_engine_name: transformers
models:
- lang_code: en
model_name:
spacy: en_core_web_sm
transformers: StanfordAIMI/stanford-deidentifier-base

ner_model_configuration:
labels_to_ignore:
- O
aggregation_strategy: simple # "simple", "first", "average", "max"
stride: 16
alignment_mode: strict # "strict", "contract", "expand"
model_to_presidio_entity_mapping:
PER: PERSON
LOC: LOCATION
ORG: ORGANIZATION
AGE: AGE
ID: ID
EMAIL: EMAIL
PATIENT: PERSON
STAFF: PERSON
HOSP: ORGANIZATION
PATORG: ORGANIZATION
DATE: DATE_TIME
PHONE: PHONE_NUMBER
HCW: PERSON
HOSPITAL: ORGANIZATION

low_confidence_score_multiplier: 0.4
low_score_entity_names:
- ID
```
### SkyFlow
https://www.skyflow.com/product/llm-privacy-vault
![](images/skyflow-llm-privacy-vault.png)
### Protect AI [LLM Guard](https://llm-guard.com/)
Supported scanners
Expand Down
Binary file added src/images/presidio-ner-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/skyflow-llm-privacy-vault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e61dcd

Please sign in to comment.