> For the complete documentation index, see [llms.txt](https://docs.probe.splx.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.probe.splx.ai/ai-red-teaming/remediation/prompt-hardening.md).

# Prompt Hardening

Once you identify potential risks in your target using probes, the Platform allows you to harden the target's system prompt to strengthen its security.

{% hint style="success" %}
You can learn more about the importance and benefits of prompt hardening, along with use case comparisons to guardrails and our benchmark, in our blog post [**System Prompt Hardening: The Backbone of Automated AI Security**](https://splx.ai/blog/system-prompt-hardening-the-backbone-of-automated-ai-security).
{% endhint %}

## System Prompt Hardening

To begin prompt hardening, navigate to the **Prompt Hardening** page in the **Remediation** section of the main navigation bar, and click the **Harden System Prompt** button in the top-right corner.

The hardening process begins by selecting the relevant probes you want to use to harden your system prompt. You can think of these as vulnerabilities you wish to protect against. The prompt hardening tool will then use the results of your probe runs to strengthen your system prompt against the identified vulnerabilities.

<figure><img src="/files/yRfp2fdOuwxoM6aw0XMl" alt=""><figcaption><p>Figure 1: Selecting Relevant Probes</p></figcaption></figure>

The table displays the probes, their categories, the last probe run on the target, and the percentage of failed test cases. This percentage serves as an indicator of where your target is most vulnerable and where there is the greatest opportunity for improvement through hardening. Once all relevant probes are selected (at least one is required), click **Continue**.

In the next step, simply provide your target's current system prompt and click **Generate hardened system prompt**, which will initiate the new prompt hardening process.

<figure><img src="/files/1Ld8NQdFrK4zgH32rpYp" alt=""><figcaption><p>Figure 2: Current System Prompt Input</p></figcaption></figure>

{% hint style="info" %}
Depending on the number of selected probes and the length of the system prompt, prompt hardening may take a few minutes. Feel free to continue using other features of the app while the hardening process runs in the background, it will not be interrupted.
{% endhint %}

## Hardened System Prompt

The latest prompt hardening will be displayed on the **Prompt Hardening** page. The header provides information about the generation date and time, the probes selected for hardening, the progress of the hardening, and the remediation status.&#x20;

{% hint style="info" %}
Once applied to your system prompt, you can flag the prompt hardening as **Applied.**

**This action is not reversible.**
{% endhint %}

Below, there are three sections:&#x20;

1. **Current System prompt** - displaying the system prompt before hardening.
2. **Generated system prompt** - showing the generated hardened system prompt with options to:
   1. Highlight the differences,
   2. Expand the prompt for better readability,
   3. Copy the system prompt.
3. **Actions** - lists all prompt hardening actions performed on your system prompt by our tool.
   1. Example: Stressing that competitor companies should neither be mentioned nor recommended.

<figure><img src="/files/zP38URg2HYHfMm9LaSUf" alt=""><figcaption><p>Figure 3: Latest Prompt Hardening</p></figcaption></figure>

## Prompt Hardening History

The second tab on the prompt hardening page is **History**, which features a table displaying all previous prompt hardenings. The table includes information such as the generation date and time, selected probes, progress (in progress, generated, ...), and status (applied, not applied, ...).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.probe.splx.ai/ai-red-teaming/remediation/prompt-hardening.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
