---
title: <POST> ConfigureApp API
slug: lesspostgreater-configureapp-api
docTags: 
createdAt: 2025-01-28T09:41:37.001Z
---

:::hint{type="info"}
The payload below defines the configurable policy that a user can apply to validate the corresponding prompt/ response.&#x20;
To apply the policy:

- **Copy and replace the appropriate policy** object in the `request JSON payload` as shown below.
- Select the correct policy configuration schema based on execution Mode `"block"` or `"audit"` also depending on the environment where the container is deployed `"cpu"` or `"gpu"`&#x20;
- **"Audit Mode**"works **with out LLM Orchestration** and "**Block Mode"** works **with LLM Orchestration** .

Note: This policy is fully customizable and can be modified to reflect the desired behavior of your application or integration.
:::



:::CodeblockTabs
Audit-CPU

```json
{
  "config_language": "en",
  "config_llm": "", 
  "image_analysis_type": "", 
  "input_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "high",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0.80
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Prompt Injection / Jailbreaks": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Token Limit": {
      "value": "4096"
    },
    "Input Rate Limiter": {
      "value": "10"
    },
    "Invisible Text": {
      "enabled": false
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0.85
    },
    "No LLM Output": {
      "enabled": false
    },
    "Malicious URL Detection": {
      "enabled": false
    },
    "URL Reachability": {
      "enabled": false
    },
    "Sentiment": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    }
  },
  "output_config": {}
}
```

Audit-GPU

```json
{
  "config_language": "en",
  "config_llm": "", 
  "image_analysis_type": "", 
  "input_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "high",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0.80
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Prompt Injection / Jailbreaks": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Token Limit": {
      "value": "4096"
    },
    "Input Rate Limiter": {
      "value": "10"
    },
    "Invisible Text": {
      "enabled": false
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0.85
    },
    "No LLM Output": {
      "enabled": false
    },
    "Malicious URL Detection": {
      "enabled": false
    },
    "URL Reachability": {
      "enabled": false
    },
    "Sentiment": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Contextual Groundedness": {"enabled": true},
    "Answer Relevance": {"enabled": true}
  },
  "output_config": {}
}
```

Block-CPU

```json
{
  "config_language": "en",
  "config_llm": "Mistral", 
  "image_analysis_type": "", 
  "input_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "high",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0.80
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Prompt Injection / Jailbreaks": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Token Limit": {
      "value": "4096"
    },
    "Input Rate Limiter": {
      "value": "10"
    },
    "Invisible Text": {
      "enabled": false
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0.85
    }
  },
  "output_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Blocked List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "No LLM Output": {
      "enabled": false
    },
    "Malicious URL Detection": {
      "enabled": false
    },
    "URL Reachability": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "High",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Sentiment": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    }
  }
}
```

Block-GPU

```json
{
  "config_language": "en",
  "config_llm": "Mistral", 
  "image_analysis_type": "", 
  "input_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "high",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0.80
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Prompt Injection / Jailbreaks": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Token Limit": {
      "value": "4096"
    },
    "Input Rate Limiter": {
      "value": "10"
    },
    "Invisible Text": {
      "enabled": false
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "low",
      "custom_threshold": 0.85
    }
  },
  "output_config": {
    "JSON": {
      "enabled": false
    },
    "Block Competitor": {
      "comparison": "contains",
      "value": ""
    },
    "Block Substring": {
      "comparison": "contains",
      "value": ""
    },
    "Allowed List": {
      "comparison": "contains",
      "value": ""
    },
    "Blocked List": {
      "comparison": "contains",
      "value": ""
    },
    "Regex": {
      "value": ""
    },
    "URL Detection": {
      "enabled": false
    },
    "Code Detection": {
      "enabled": false
    },
    "No LLM Output": {
      "enabled": false
    },
    "Malicious URL Detection": {
      "enabled": false
    },
    "URL Reachability": {
      "enabled": false
    },
    "Ban Topic": {
      "value": "",
      "threshold": "High",
      "custom_threshold": 0
    },
    "BCI Detection": {
      "enabled": false,
      "custom_model_available": false,
      "mode": "default",
      "threshold": "High",
      "custom_threshold": 0
    },
    "Toxicity": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Generic Harm": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Sentiment": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "PII Detection": {
      "enabled": false,
      "redaction": false
    },
    "Special PII Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Secrets": {
      "enabled": false
    },
    "Not Safe For Work": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Gender Sensitive": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },
    "Medical Safety Detection": {
      "enabled": false,
      "threshold": "High",
      "custom_threshold": 0
    },,
    "Contextual Groundedness": {"enabled": true},
    "Answer Relevance": {"enabled": true}
    
  }
}
```
:::

:::hint{type="info"}
#

# 🛡️ Confidence Thresholds in Guardian :

Guardian uses a confidence thresholds to decide when to flag a user query / model response as potentially unsafe/risk. These thresholds control how cautious or relaxed the system is when making that decision.You can choose between four modes: **High**, **Medium**, **Low**(default), and **Custom&#x20;**— each offering a different balance between precision and coverage.&#x20;

### 🔵 ***High Threshold:***

In this mode, **Guardian will only flag&#x20;**&#x77;hen it is **very confident&#x20;**&#x74;hat a user query / response **violates a defined boundary**.This results in a **low false positive rate&#x20;**— meaning very few things will be flagged incorrectly. However, it may miss some actual violation that don’t meet the high confidence level. This setting is ideal when you want to avoid unnecessary disruptions or over-flagging, especially in low-risk.&#x20;

### 🟡 ***Medium Threshold:***

With the **medium threshold**, Guardian takes a **balanced approach**. It flags content when it's **reasonably confident** that there may be a **potential policy issue or risk**. You may see a **moderate false positive rate**, but it also reduces the chances of missing real violations. This is a good default choice for most general-purpose use cases where you want a balance between accuracy and coverage.&#x20;

### 🔴 ***Low Threshold :***

The **low threshold&#x20;**&#x73;etting is the **most sensitive**. Guardian will flag responses even if it has only a **moderate level of confidence** that something **might violate policy**. This ensures that almost no actual issues go undetected, but it also increases the **false positive rate** — meaning more content might be flagged unnecessarily. It’s best suited for high-sensitivity environments where **missing a potential violation is riskier than flagging extra content**.&#x20;

### ⚙️ ***Custom Threshold:***

If your use case requires more precise control, you can set a **custom threshold&#x20;**&#x62;etween 0 and 1. Lower values make Guardian more aggressive in flagging (higher sensitivity), while higher values make it more conservative (flagging less frequently). This mode is ideal when you have specific business rules, risk tolerance levels, or workflows that need fine-tuning.&#x20;

By adjusting the confidence threshold, you’re effectively choosing how cautious Guardian should be — whether it should only flag highly certain violations or proactively surface anything that might require attention.&#x20;
:::



:::ApiMethodV2
```json
{
  "name": "configureApp API",
  "method": "POST",
  "url": "{guardian_url}/configureApp",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "WAlGLJZwnH0SxzEstoB_5",
        "language": "curl",
        "code": "curl --location --globoff '{guardian_url}/configureApp/{app_name}' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '<<Enter Payload Data>>'",
        "customLabel": ""
      },
      {
        "id": "KoINKM-as8FbUfKLQhh9Z",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"{guardian_url}/configureApp/{app_name}\"\n\n# please copy the request payload according to given mode and device type\npayload = {# <<Enter Payload Data>>}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=json.dumps(payload))\n\nprint(response.text)\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "KoINKM-as8FbUfKLQhh9Z"
  },
  "results": {
    "languages": [
      {
        "id": "PcsA3MK1cJSGUnwvSbN63",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"status\": true,\n  \"error_message\": \"\",\n  \"validation_status\": {\"input\": {}, \"output\": {}}\n}"
      },
      {
        "id": "5SnpzE5I-TlGzeN3a8gLZ",
        "language": "400",
        "code": "{\n  \"status\": true,\n  \"error_message\": \"Invalid configuration: Input features cannot be assigned or updated as output features, and vice versa.\",\n  \"validation_status\": {\"input\": {features with the output tagging wrongly getting update}, \"output\": {features with the input tagging wrongly getting update}}\n}",
        "customLabel": ""
      },
      {
        "id": "F4x1fjQ36O_LgucDXy2SK",
        "language": "500",
        "code": "{\n  \"status\": false,\n  \"error_message\": \"Internal Server Error\",\n  \"validation_status\": {\"input\": {}, \"output\": {}}\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "F4x1fjQ36O_LgucDXy2SK"
  },
  "request": {
    "pathParameters": [
      {
        "name": "app_name",
        "kind": "required",
        "type": "string",
        "description": "Specifies the application endpoint for updating the configuration. Possible values: app1, app2, app3, app4\n",
        "children": []
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false
}
```
:::

## Request Body Definitions

The table below provides a **detailed breakdown** of all fields included in the API request body. It describes each field's **purpose, type, and possible values** to help you configure the API effectively with examples.



| **Field**               | **Type** | **Description**                                                                                                                                                                                                                                                                                      |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `config_language`<br /> | String   | Specifies the languages that the system supports for user interaction. Can be English (default value) or English & Korean both.<br /><br />by default `"en"`, possible values `"en,ko"`                                                                                                              |
| `config_llm`<br />      | String   | Defines the configured Language Model (LLM) to be used. <br />* supported LLMs for **app1/aap2/app3** are : `"OpenAI"`,` "Mistral"`, `"Gemini"`,` "ChatGPT"`
* supported LLMs for **app4&#x20;**: `"Claude"`                                                                                         |
| `image_analysis_type `  | String   | Supported Image Analysis types like OCR or Content Moderation.<br />* Not required for <font color="#f40606">`app1/aap2/app3`</font> , provide empty string e.g: `""`
* required only for **app4&#x20;**&#x63;onfiguration update. possible values are : `"ocr"`, `"image_content_moderation"`<br /> |

| **Theme**                                   | **Policy**                      | **Description**                                                                              | **Key**                  | **Type**     | **Possible Values**                                                                                                   |
| ------------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------ | ------------ | --------------------------------------------------------------------------------------------------------------------- |
| Additional Checks                           | `JSON`                          | Ensures correctness and validates JSON format                                                | enabled                  | Boolean      | true / false                                                                                                          |
| Content Access Control                      | `Block Competitor`              | Blocks mentions of competitors                                                               | value                    | String       |  comma-separated string                                                                                               |
|                                             |                                 |                                                                                              | comparison               | String       | "exact\_match" / "contains"                                                                                           |
| Content Access Control                      | `Block Substring`               | Blocks specific strings of text                                                              | value                    | String       | comma-separated string                                                                                                |
|                                             |                                 |                                                                                              | comparison               | String       | "exact\_match" / "contains"                                                                                           |
| Content Access Control                      | `Ban Topic`                     | Blocks entire topics of discussion                                                           | value                    | String       | comma-separated string                                                                                                |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Content Access Control                      | `Allowed List`                  | Permits only approved content                                                                | value                    | String       | comma-separated string                                                                                                |
|                                             |                                 |                                                                                              | comparison               | String       | "exact\_match" / "contains"                                                                                           |
| Content Access Control                      | `Blocked List`                  | Prevents output of certain block listed content                                              | value                    | String       | comma-separated string                                                                                                |
|                                             |                                 |                                                                                              | comparison               | String       | "exact\_match" / "contains"                                                                                           |
| Content Analysis                            | `Regex`                         | Uses patterns to match text/alphanumeric for filtering                                       | value                    | String       | single regex pattern                                                                                                  |
| Content Safety                              | `URL Detection`                 | Identifies URLs in prompt                                                                    | enabled                  | Boolean      | true/false                                                                                                            |
| Security Measures                           | `Code Detection`                | Identifies programming code in text (C, C++, HTML, Bash, JAVA, JavaScript, Python, C#, JSON) | enabled                  | Boolean      | true/false                                                                                                            |
| Content Safety                              | `Toxicity`                      | Filters toxic and harmful language in input or in prompt's response                          | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Content Safety                              | `Generic Harm`                  | Blocks swear words and vulgar language (supports English language)                           | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float<br />  | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Privacy Protection                          | `PII Detection`                 | Detects personal identifiable information (e.g., Full name, email address, phone number)     | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | redaction                | Boolean      | true/false                                                                                                            |
| Content Validation                          | `No LLM Ouput`                  | Underlying LLM refuses to provide an answer                                                  | enabled                  | Boolean      | true/false                                                                                                            |
| Content Validation                          | `Contextual Groundedness`       | Checks if the response aligns with the provided Context                                      | enabled                  | Boolean      | true/false                                                                                                            |
| Content Validation                          | `Answer Relevance`              | Checks the relevance between the provided query and response                                 | enabled                  | Boolean      | true/false                                                                                                            |
| Security Measures                           | `Special PII Detection`         | Detects specialized personal information                                                     | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Content Safety                              | `Sentiment`                     | Analyzes the sentiment of AI responses (positive, negative, or neutral)                      | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Security Measures                           | `Prompt Injection / Jailbreaks` | Detects attempts to manipulate the AI                                                        | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Security Measures                           | `Secrets`                       | Detects and redacts sensitive information (AWS Secrets, Git Secrets, DB Secrets)             | enabled                  | Boolean      | true/false                                                                                                            |
| Security Measures                           | `Malicious URL Detection`       | Scans for harmful URLs in output                                                             | enabled                  | Boolean      | true/false                                                                                                            |
| Additional Checks                           | `URL Reachability`              | Checks if URLs in output are accessible                                                      | enabled                  | Boolean      | true/false                                                                                                            |
| Content Safety                              | `Not Safe For Work`             | Filters sexually explicit or inappropriate material                                          | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Content Safety<br /><br /><br />            | `Medical Safety Detection`      | Detects Medically Unsafe information<br />                                                   | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Content Safety<br /><br /><br />            | `Gender Sensitive`              | Identifies Gender discrimination, bias, and stereotype<br />                                 | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |
| Security Integrity Checks<br /><br /><br /> | `Invisible Text`                | Identifies hidden text within inputs<br />                                                   | enabled                  | Boolean      | true/false                                                                                                            |
| Usage Management<br />                      | `Input Rate Limiter`            | Limits the rate of input to the system<br />                                                 | value                    | Integer      | Integer                                                                                                               |
| Usage Management<br />                      | `Token Limit`                   | Sets limits on token usage in requests<br />                                                 | value                    | Integer      | Integer (max 4096)                                                                                                    |
| Privacy Protection<br /><br /><br />        | `BCI Detection`                 | Detects business confidential information<br /><br /><br />                                  | enabled                  | Boolean      | true/false                                                                                                            |
|                                             |                                 |                                                                                              | custom\_model\_available | Boolean      | by default false, once custom model will upload then can set as true                                                  |
|                                             |                                 |                                                                                              | mode                     | String       | "default" / "custom"                                                                                                  |
|                                             |                                 |                                                                                              | threshold                | String       | "Low" / "Medium" / "High" / "Custom"                                                                                  |
|                                             |                                 |                                                                                              | custom\_threshold        | Float        | If threshold is set to "custom", provide a custom\_threshold value in the range of Float (0.0 to 1.0), default is 0.0 |



::::hint{type="info"}
# 🧠 Hallucination Detection:

- Hallucination detection can be checked by enabling the policies like: **Contextual Groundedness** and **Answer Relevance** . These checks enable precise validation of model responses against a supplied context or prompt, prompt or model's response, helping ensure factual consistency and response integrity.
- This capability is available **only on GPU-enabled environments**.

### &#x20;    Feature Overview:

- **Contextual Groundedness Check**
  &#x20;Verifies that the model’s response is logically and semantically grounded in the provided context (context and response are required fields for audit mode and only context is required field for block mode). It identifies instances where the response introduces unsupported or fabricated information.
- **Answer Relevance Check**
  &#x20;Assesses whether the response meaningfully answers the original user query (response is required fields for audit mode and in block mode response will be taken care by querying the respective llm)and stays within the scope of the provided question.

## ⚙️ *How to Use:*

To activate hallucination checks, structure your payload using the following tags:

***1. Formatting for Context:***

:::BlockQuote
`<ais_guardian_reqcontext_ais>`
\[Insert source context here]
**\</ais\_guardian\_reqcontext\_ais>**
:::

***2. Formatting for LLM/Model response:***

:::BlockQuote
**\<ais\_guardian\_response\_ais>**
\[Insert LLM/Model response here]
**\</ais\_guardian\_response\_ais>**
:::

***3. Formatting for Prompt:***

🚫 Do **not&#x20;**&#x69;nclude any tags in the prompt. Only the **context** and **response&#x20;**&#x6D;ust be tagged.&#x20;

## 📘 ***Examples:***

<font color="#3240af">***Audit Mode:***</font>****

:::BlockQuote
"""Where was Albert Einstein born, and what is he known for?

`<ais_guardian_reqcontext_ais>`
Albert Einstein was born in Ulm, Germany in 1879. He developed the theory of relativity, one of the two pillars of modern physics.
`</ais_guardian_reqcontext_ais>  <ais_guardian_response_ais>`
Albert Einstein was born in Vienna in 1881 and is best known for his work on quantum mechanics.
`</ais_guardian_response_ais`"""**&#xA;**
:::

<font color="#3240af">***Block Mode:***</font>

In Block Mode, only the **context** tag is required.&#x20;

:::BlockQuote
"""Where was Albert Einstein born, and what is he known for?

`<ais_guardian_reqcontext_ais>`
Albert Einstein was born in Ulm, Germany in 1879. He developed the theory of relativity, one of the two pillars of modern physics.
`</ais_guardian_reqcontext_ais>`"""
:::
::::

