# Extend a Nightfall Detector

You can customize a Nightfall detector to meet your organization's requirements. Once you customize a Nightfall detector, it is considered to be a custom detector. The Nigytfall detector that you used and customized, continues to exist as is.&#x20;

Nightfall provides you with two customization options. Context rules and Exclusion rules. You must use at least one of these two rules to customize a Nightfall detector. The procedure to use Context rules and Exclusion rules is the same as in the case of Regular Expression Detector. You can learn how to configure Context rules and Exclusion rules from the[Create Regular Expression Detector](/detection_platform/custom_detectors/regexp_detector.md#understanding-context-rules-and-exclusion-rules) document.&#x20;

To extend a Nightfall Detector:

1. Navigate to the Detectors section from the left pane.
2. Click **+ Custom Detector** and select **Extend a Nightfall detector**.
3. Select the Nightfall detector that you wish to customize.&#x20;
4. Enter a name for the customized detector in the **Name** field.&#x20;
5. (Optional) Enter a description for the detector in the **Description** field.&#x20;
6. Click **Next**.

<figure><img src="/files/odRYKIZwwdCjonhKiC76" alt=""><figcaption></figcaption></figure>

7. Click **+ Add Context Rule** to configure the context rule.
8. Click **Save** to save the rule.
9. Click **Next**.&#x20;
10. Click **+ Add Token Rule** to configure token rules.&#x20;
11. Click **Save** to save the rule.
12. Click **Next**.&#x20;

{% hint style="info" %}
It is mandatory to either define the Context rule or the Token rule.&#x20;
{% endhint %}

13. Review the configurations and click **Add**.

<figure><img src="/files/UWark75e09wp3PNjmES2" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.nightfall.ai/detection_platform/custom_detectors/extend_nightfall_detector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
