NVIDIA / NeMo-Guardrails

NeMo Guardrails is an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.
Other
4.21k stars 400 forks source link

feat: add score threshold to AnalyzerEngine #845

Open Pouyanpi opened 2 weeks ago

Pouyanpi commented 2 weeks ago

Description

Currently the AnalyzerEngine uses default_score_threshold of 0. This PR adds score_threshold to SensitiveDataDetectionOptions so that the user can set it in the config.yml. The default value is set to 0.2 but it requires further experimentation.

Example configuration:

rails:
  config:
    sensitive_data_detection:
      input:
        score_threshold: 0.4
        entities:
          - PHONE_NUMBER
          - EMAIL_ADDRESS
          - IN_PAN
          - IN_AADHAAR

      output:
        entities:
          - PHONE_NUMBER
          - EMAIL_ADDRESS
          - IN_PAN
          - IN_AADHAAR

Related Issue(s)

Checklist