> 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/data/knowledge.md).

# Knowledge

Add shared knowledge sources and test how Sagent retrieves them.

The **Knowledge** section gives Sagent information beyond the product catalog. Use it for shared details that help Sagent answer questions accurately and consistently.

Knowledge is shared across Sagents in the container. Test retrieval with realistic shopper questions before syncing changes.

{% hint style="info" %}
Knowledge is shared by every Sagent in the container. Changes affect all of them.
{% endhint %}

### Add knowledge sources

Use knowledge sources for information that is not available in product data. Examples include fitting advice, store notes, and guide articles.

#### Source types

Choose the source type that matches the content you need Sagent to use:

* **Written text** is for guidance you enter and maintain directly.
* **Web page or article** fetches one URL. Review the extracted text before saving.
* **Blog or category page** is for content from a blog or category page.

For web sources, enter the **Article URL** and click **Fetch**. Confirm the extracted content contains only accurate, current material.

#### Source title, timing, and scope

The **Title** identifies the source to Sagent. It also becomes the link text when Sagent cites the source.

Set **When to use** to control when Sagent can retrieve the source. Use **When relevant** for information that should appear only when it matches the shopper's question.

Set **Where it applies** to choose the shopper channel. Select **Web**, **In store**, or both. A source set to **Everywhere** is available in both channels.

{% stepper %}
{% step %}

#### Open Sources

Open **Data → Knowledge → Sources**.
{% endstep %}

{% step %}

#### Add a source

Click **Add source**. Add the knowledge that Sagent should use when it is relevant to a shopper conversation.
{% endstep %}

{% step %}

#### Sync your changes

Click **Sync** after adding or updating sources. This makes the latest knowledge available to Sagent.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Keep sources focused and current. Remove outdated guidance so Sagent does not use it in conversations.
{% endhint %}

### How knowledge appears in conversations

Sagent searches eligible sources for each shopper message. It retrieves matching passages and uses them to inform its generated answer.

Retrieved knowledge does not appear as a separate message. Shoppers see it through Sagent's answer and, when cited, through the source title as a link.

Sagent retrieves a source only when its timing, channel, and relevance conditions match. It does not replace product data, product comparisons, or configured static content.

### Test retrieval

Use **Test retrieval** to check what knowledge Sagent finds for a shopper question. This tests retrieval without starting a conversation.

{% stepper %}
{% step %}

#### Enter a shopper question

Open **Test retrieval**. Enter a question a shopper might ask.
{% endstep %}

{% step %}

#### Add known context

Use **Known so far** to add details already established in a conversation. For example, add a shopper's activity or preference.

Leave it empty when testing a new conversation.
{% endstep %}

{% step %}

#### Set retrieval conditions

Select the **Channel** and **Locale** you want to test.

Use **Threshold** to control how closely a source must match. A lower value is stricter. Use **Context budget** to limit how many characters Sagent can retrieve.

Match the test channel to the shopper journey. Test each supported locale with questions written in that locale.
{% endstep %}

{% step %}

#### Run and review

Click **Run**. Confirm the retrieved knowledge is relevant to the question and context.

Adjust the source content or retrieval conditions when the results are missing or irrelevant.
{% endstep %}
{% endstepper %}

### Retrieval thresholds and limits

**Threshold** controls the relevance required before Sagent retrieves a source. A lower threshold is stricter. Increase it only when relevant sources are missing.

**Context budget** limits the retrieved text available for Sagent's answer. A larger budget can include more detail. It can also include less focused material.

Start with the default retrieval conditions. Test short, specific, and ambiguous shopper questions before changing either setting.

### Frequently asked questions

<details>

<summary>Do Knowledge changes affect every Sagent?</summary>

Yes. Knowledge is shared by every Sagent in the container. Review changes carefully before syncing.

</details>

<details>

<summary>What should I add as a knowledge source?</summary>

Add information that helps Sagent answer shopper questions. This can include fitting advice, store notes, or guide articles.

</details>

<details>

<summary>What does Known so far do in Test retrieval?</summary>

It adds conversation context to the test. Use it to reproduce retrieval during a conversation that has already collected shopper details.

</details>

<details>

<summary>Why did a source not appear in a conversation?</summary>

Check its timing, channel, extracted content, and retrieval threshold. Then test the same question, locale, and channel.

</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/data/knowledge.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.
