# Collections

**Collections** improve how AI Agents interact with organizational Knowledge.

By grouping related Sources into topic-based repositories, they enable more precise, context-aware retrieval and smarter Knowledge management.

## Feature overview

* **Better information retrieval:** Organize Sources into topic-based repositories so the system searches only within relevant content clusters, not the entire Knowledge base. This reduces the search space and improves speed;
* **More accurate answers**: By grouping related Sources, Collections create focused Knowledge domains that reduce noise from unrelated content;
* **Contextual understanding:** Go beyond keyword matching. The system analyzes the current Question, previous interactions, and configurable context parameters to better understand user needs. This results in more precise responses;
* **Search types:** Define how queries are processed across sources. Choose **Semantic**, **Full-text**, or **Hybrid**. The selected option applies whenever this Collection is used, ensuring consistent search behavior.

{% hint style="info" %}
Each **Collection** is an independent repository that contains Sources and Questions related to a specific topic. Search works within a selected Collection, returning results from Sources or Questions.&#x20;
{% endhint %}

## Creating a new Collection

To create a new Collection, go to the **Collections** section and select `New Collection`.&#x20;

Add the Collection **name** and the topics it covers in the **description** so the AI Agent can understand when to use it. Without this field, the AI Agent can’t activate the skill. The AI Agent only “knows” what is defined in this description, so write it clearly, precisely, and with enough detail.\
\
The **Collection description** provides enough context for the AI Agent to determine when it should be used, based on user questions or inputs. It must **also indicate** the topics covered by the Sources in the Collection. This helps the AI Agent understand the scope of the available information.

When a user input matches one of the described topics, the AI Agent can trigger the corresponding Collection, retrieve relevant content from its Sources, and generate an appropriate response.

{% hint style="info" %}
You can add up to **200 Sources** and **200 Collections**.\
Sources can be grouped into **Collections**, based on project needs.The limit is **200 Sources per project**, not per Collection.
{% endhint %}

<figure><img src="/files/zNVWE1SZYqkoEQ0WpHp4" alt=""><figcaption><p>New Collection modal</p></figcaption></figure>

### Search types

When configuring a **Collection**, select the search type that best fits the use case from the dropdown menu.&#x20;

Collections support three approaches: **Semantic**, **Full-text**, and **Hybrid**.

#### Semantic search

**Returns results based on meaning, not just exact word matches.** It interprets user intent and retrieves relevant content even when terminology differs.

Example: If a user asks, “How do I reset my password?”, Semantic search may return Sources with phrases such as “password restoration procedure” or “how to change forgotten login credentials,” because it recognizes that these concepts are related.

#### Full text search

**Matches exact words within the Sources.** It is ideal for locating specific terminology, product names, or unique identifiers.

Example: If a user searchs for “Model X500 error code 3021", Full-text search looks for Sources containing those exact terms, ensuring technical precision.

#### Hybrid search

Combines **Semantic** and **Full-text**. **This approach often delivers more relevant results, especially when one method alone is not enough.**

When **Hybrid** is selected, percentage values must be defined to determine how much each search type contributes to the final result.

**For instance:**\
For a query such as “smartphone battery draining quickly” (for example: Semantic: 60%, Full-text: 40%), **Hybrid** may:

* Use **Semantic** (60%) to interpret concepts related to battery optimization and power management;
* Use **Full-text** (40%) to ensure that specific terms such as “smartphone” and “battery” appear in the results.

{% hint style="info" %}
This combination returns results that both include the key terms and understand the underlying issue of power consumption, even if the exact phrase “draining quickly” is not present.
{% endhint %}

<figure><img src="/files/qgvBMgDZyiogU592Pevu" alt=""><figcaption><p>Set a percentage when selecting Hybrid search</p></figcaption></figure>

#### When to use each search type:

* Choose **Semantic search** when content expresses similar concepts in different ways, or when users may use terminology that differs from what appears in the Source&#x73;**;**
* Choose **Full-text search** when precise wording is critical, such as product codes, specific error messages, or technical documentation where exact terms matter;
* Choose **Hybrid search** when the Knowledge base includes both technical specifications and conceptual information, or when a balance between exact matching and intent understanding is needed.

{% hint style="info" %}
For better results, especially in **complex scenarios**, consider **Hybrid search** to combine semantic understanding with exact term matching.
{% endhint %}

### Advanced settings

Each Collection can be customized with advanced parameters to fine-tune how information is retrieved:

* **Top K:** Defines how many paragraphs the system considers when searching for information. With a lower K value, the model selects from the most likely options, resulting in more focused and relevant results and improving perceived accuracy;
* **Similarity Threshold:** Sets the minimum relevance level required for results to be considered relevant. Lower values may return broader but less predictable results. Higher values produce more precise matches;
* **Previous user inputs:** Customizes search based on earlier user messages. The default value is 0, meaning only the current message is considered. Adjust the slider to include previous messages. This helps the system understand context when a previously discussed topic is revisited. For example: if a user asks about “unlock new credit card” and then follows up with “how do I do it?”, the system understands that the follow-up refers to “unlock new credit card.”

## Training

To ensure Collections are included in the Knowledge base, run the **Training** process.

Click on the button `Training` on the top right corner. Train each Collection individually to keep the AI Agent up to date with the latest information. After making changes, run **Training** again for the affected Collections to keep the knowledge base current.

**Training** can also be triggered from the icon <img src="/files/KK0nkkumeB38Z3DsPXY4" alt="" data-size="line">  in the list or through the **Training** section.

<figure><img src="/files/D4GyDRmQmxxBzCSnyZkL" alt=""><figcaption><p>Refresh icon to train the selected collection</p></figcaption></figure>

{% hint style="info" %}
**Retrain the AI Agent whenever:** a Source is added or edited; a Question is created or updated; the Source linked to a Question is changed.
{% endhint %}

**Training PDF files may take longer than training TXT files.** In very large training sessions, such as those involving many documents or PDFs close to the 100 page limit, temporary issues may occur. Wait a few moments and try again.

### Delete Collection

When delete a Collection, all associated [Questions](/user-guide/ai-agents/knowledge/sources.md#questions) and Sources are permanently removed.

#### Deletion rules

Deletion behavior depends on where the Collection or Source is used:

* If used in **NLU Flows**, deletion is allowed;
* If linked to an **AI Agent**, the system blocks the **Delete** action.

To proceed:

1. Remove the Collection from the AI Agent.
2. After it is no longer linked, click **Delete** again.

{% hint style="info" %}
Deleting a **Collection** permanently removes all **Sources** and **Questions** it contains. **Before clicking Delete,** back up critical information or upload again the required **Sources** to another **Collection**.

**Once confirmed, the action cannot be reversed.**
{% endhint %}


---

# 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.conversational-ai.syntphony.com/user-guide/ai-agents/knowledge/collections.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.
