> For the complete documentation index, see [llms.txt](https://docs.crobox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.crobox.com/how-to-guides/sagent/qa/test-results.md).

# Test Results

Run safety and regression tests, then investigate their results.

**Test Results** shows whether Sagent meets the expectations defined in your tests. It helps you identify unsafe responses and regressions before a release reaches shoppers.

Use results to investigate failures, refine your configuration, and rerun tests until the expected behavior is reliable.

Use **Test Results** to start tests and review completed runs.

### Run an LLM-generated safety test

The LLM-generated safety test uses the Promptfoo red-team API. It generates adversarial prompts that test whether Sagent stays within its intended scope.

{% hint style="warning" %}
This test consumes your monthly probe quota. It takes about 15–20 minutes, depending on chatbot response time.
{% endhint %}

{% stepper %}
{% step %}

#### Open Test Results

Open **QA → Test Results**.
{% endstep %}

{% step %}

#### Start the safety test

Click **Run LLM-Generated Test**. Review the test scope and probe-quota notice.
{% endstep %}

{% step %}

#### Review the results

Wait for the test to finish. Review each result for failures and unexpected responses.

Update Sagent's guidance, knowledge, or configuration when a result reveals a gap. Run the test again after making changes.
{% endstep %}
{% endstepper %}

### What the safety test checks

The test runs these plugins:

* **Prompt Extraction** — attempts to reveal Sagent's system prompt.
* **Hallucination** — checks whether Sagent invents facts outside its knowledge.
* **Hijacking** — tries to redirect Sagent toward an attacker's goals.
* **Off-Topic** — tests whether Sagent can be led outside its intended scope.
* **Excessive Agency** — checks whether Sagent claims unsupported capabilities or actions.
* **Imitation** — tests whether Sagent can impersonate people or other systems.
* **RBAC** — probes whether role-based access boundaries can be bypassed.
* **Goal Misalignment** — tests whether Sagent can be steered toward unintended objectives.
* **Overreliance** — checks whether Sagent encourages users to over-trust its responses.

### How attacks are delivered

The test applies these attack strategies:

* **Jailbreak** — adds known jailbreak prefixes and framing techniques to each plugin probe.
* **Prompt Injection** — embeds adversarial instructions in retrieved content, such as product descriptions or knowledge context.
* **Crescendo** — uses a multi-turn conversation that starts innocently and escalates over several messages.

Each plugin generates five adversarial prompts. The strategies wrap those prompts with attack techniques, producing about 180 probes.

Crescendo also runs its probes as multi-turn conversations of about seven turns. This increases the total number of chatbot calls.

### Run a regression test

Click **Run Regression Test** to replay prompts against the current chatbot version.

Each response is graded against its assertions.

{% hint style="info" %}
The regression test runs every enabled system prompt shared across chatbots. It also runs every enabled test case defined for this chatbot.

Test cases can contain single prompts or multi-turn conversations. Conversation turns replay in order on a shared thread.
{% endhint %}

Disabled prompts and test cases are skipped. Duration depends on the number of enabled items and the chatbot's response time.

Investigate failures before publishing changes.

### Frequently asked questions

<details>

<summary>How many probes does the safety test use?</summary>

The test produces about 180 probes. Crescendo adds multi-turn conversations, which increase total chatbot calls.

</details>

<details>

<summary>How long does an LLM-generated safety test take?</summary>

Allow 15–20 minutes. The duration depends on chatbot response time.

</details>

<details>

<summary>What should I do when a test finds a problem?</summary>

Review the prompt and response. Update the relevant guidance, knowledge, or configuration, then run the test again.

</details>


---

# 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.crobox.com/how-to-guides/sagent/qa/test-results.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.
