# Prompt Injection Detection

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

**Purpose:** The Prompt Injection Detection scanner aims to identify instances where malicious prompts or commands are injected into text inputs to manipulate the system into doing something it should not.

**Functionality:** It analyzes text inputs for signs of unexpected or unauthorized commands or instructions that could potentially compromise the security or integrity of the system.

**Implementation:** The scanner employs a combination of pattern matching, anomaly detection, and contextual analysis techniques to identify suspicious commands or prompts within text data. It may also leverage machine learning models trained on known examples of prompt injections to improve detection accuracy.

**Usage:** Prompt Injection Detection is commonly used in security-critical applications, such as command-line interfaces, chatbots, and voice assistants, to prevent unauthorized access or manipulation of systems.

To learn more about prompt injections visit:

{% embed url="<https://www.nightfall.ai/ai-security-101/prompt-injection>" %}
<https://www.nightfall.ai/ai-security-101/prompt-injection>
{% endembed %}

To learn more about temperature visit:

{% embed url="<https://deepchecks.com/glossary/llm-parameters/>" %}
<https://deepchecks.com/glossary/llm-parameters/>
{% endembed %}


---

# 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://docs.aicrisk.com/admin/agent-scanner-defaults/prompt-injection-detection.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.
