> 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/setup/behavior.md).

# Behavior

Configure how Sagent responds, asks questions, and makes recommendations.

The **Behavior** section defines how Sagent conducts product-discovery conversations. These settings balance speed, precision, and a brand-aligned response style.

Use this section to control follow-up questions, recommendations, responses, and decision guidance.

### Recommendation thresholds

These settings affect the question-and-recommendation stage of shopper conversations.

* **Maximum Matches** sets when Sagent asks another question. Shoppers see a clarifying question when too many products remain. Start with `5`.
* **Maximum Questions** caps questions before Sagent moves toward recommendations. Start with `5`, then test results.
* **Minimum Details** requires shopper input before recommendations appear. Start with `3`.

Balance precision with speed. Lower limits can show recommendations sooner. Higher limits can gather more detail first.

#### How thresholds work together

Sagent counts a detail only when it maps a shopper response to a product-property value. Small talk and responses without a mapped value do not count.

Sagent applies the thresholds in this order:

1. It continues asking while mapped details are below **Minimum Details**.
2. After reaching **Minimum Details**, it recommends products when matches are at or below **Maximum Matches**.
3. **Maximum Questions** always stops further questions. Sagent recommends from the remaining matches, even when matches exceed **Maximum Matches**.

These rules work the same in every locale, Guided Flow, and Product Flow.

#### Example catalog scenario

Assume a catalog has 12 running shoes. Set **Maximum Matches** to `5`, **Minimum Details** to `3`, and **Maximum Questions** to `5`.

| Shopper input                | Mapped details | Matching products | Sagent behavior                                                  |
| ---------------------------- | -------------- | ----------------- | ---------------------------------------------------------------- |
| “I need shoes for running.”  | 1              | 12                | Ask a question. The minimum is not met.                          |
| “I run on roads.”            | 2              | 4                 | Ask a question. Four matches remain, but the minimum is not met. |
| “I prefer extra cushioning.” | 3              | 3                 | Recommend the three matching products.                           |

If the shopper reaches five questions with eight matches remaining, Sagent stops asking and recommends from those eight products.

### Tune recommendation thresholds

Start with the default values. Change one threshold at a time, then test the same set of shopper journeys.

Use [Dashboard](/how-to-guides/sagent/analytics/dashboard.md) to review completion trends. Use [Ask Analytics](/how-to-guides/sagent/analytics/ask-analytics.md) to investigate recommendation relevance and no-result conversations. Use [Conversations](/how-to-guides/sagent/monitoring/conversations.md) to inspect the underlying sessions.

Use these signals to guide changes:

* Lower **Minimum Details** or **Maximum Questions** when completion drops after extra questions.
* Lower **Maximum Matches** when recommendations are too broad or less relevant.
* Review no-result conversations before raising thresholds. The issue may be product data or guidance.

Keep a change only when completion and recommendation relevance improve without increasing no-result conversations.

### Tone and answer length

These settings affect every AI-generated shopper reply. This includes questions, explanations, and recommendation summaries.

Set **Tone of voice** and answer length to match your brand. Start with **Friendly** tone and **Default** answer length.

Use concise answers for fast product discovery. Use longer answers when product trade-offs need explanation. These settings do not change static copy in **Content**.

### Guidance prompts

Guidance prompts affect generated replies when their instructions apply. They can shape questions, explanations, and recommendation language.

Use **Guidance Prompts** for behaviour not covered by standard settings. State the action, relevant context, and limits. Keep each prompt focused.

Test every prompt in preview mode. Do not use prompts to replace product data or static content.

### Visitor context

Visitor context is information already available about a shopper. It helps Sagent tailor its approach without changing the full conversation flow.

It does not appear as a separate shopper message. Sagent uses it for relevant generated questions and responses. If you click **Manage Properties** you will be brought to the **Visitor Properties** section.

For visitor properties setup, see [Set Custom Visitor Properties with the Pageview API](/technical-documentation/setting-custom-visitor-properties-with-pageview-api.md).

Add context only when it is available for affected shoppers. Make each instruction work when that context is unavailable. Keep context concise and relevant to product discovery.

### Prompt Check

**Prompt Check** reviews custom guidance for conflicts and overlap. It does not appear to shoppers or change Sagent automatically.

Run **Prompt Check** after adding or editing guidance or visitor context. Resolve its findings before previewing affected journeys and publishing.

### Guardrails

Guardrails are automatic checks Sagent runs on every shopper message before responding. They're part of Sagent's base safety layer and apply to every container the same way. Guardrails aren't configurable per container: you can't add, remove, or retrain them as this is managed by the Crobox team.

When a message trips a guardrail, one of two things happens, depending on its severity:

* **The conversation continues.** The message is logged and flagged for review, but Sagent still answers, with extra safety guidance for that turn, so the reply stays on safe ground.
* **The message is blocked.** Sagent doesn't answer it and shows a safe, pre-set reply instead. Sagent replaces it with the Blocked Response Message set in Content. The session stays open, and the shopper can carry on from their next message.

{% hint style="info" %}
A blocked message doesn't end the session. Only the triggering message is affected, the shopper can keep chatting.
{% endhint %}

Every guardrail trigger is logged, whether or not it changes the conversation. Use the **Guardrail trigger** flag in Monitoring to track how often guardrails fire and spot unusual patterns.

### Frequently asked questions

<details>

<summary>How many questions should Sagent ask?</summary>

Start with three to five questions. Adjust **Maximum Questions** after testing whether recommendations are specific enough.

</details>

<details>

<summary>When should I add a Guidance Prompt?</summary>

Add one when standard settings cannot express an important conversational rule. Keep prompts focused on one clear behaviour.

</details>

<details>

<summary>Does Visitor Context appear in the conversation?</summary>

No. Sagent uses it to tailor relevant generated messages.

</details>

<details>

<summary>Does Prompt Check change my configuration?</summary>

No. Review and resolve its findings yourself.

</details>

<details>

<summary>Can I customize which guardrails apply?</summary>

You can set the Blocked Response Message in Content, which is shown for blocked messages unless a guardrail category has its own message. You can't change what triggers a block.

</details>

<details>

<summary>Does a blocked message end the conversation?</summary>

No. The session stays active. Only the message that triggered the guardrail is blocked and replaced.

</details>

<details>

<summary>Where can I see when guardrails fire?</summary>

Use the **Guardrail trigger** flag in **Monitoring → Overview**.

</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.crobox.com/how-to-guides/sagent/setup/behavior.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
