> For the complete documentation index, see [llms.txt](https://docs.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenioo.com/ai/large-language-models/resources/advanced.md).

# Advanced

In this page you can manually edit the RAG Settings for the Resources of your AI.

<figure><img src="/files/8cq2WOFLw7VnuLEQ2gDw" alt=""><figcaption></figcaption></figure>

#### **Resource uploading parameters**

#### **Chunk Size**

When you upload a resource, its content is split into chunks.

{% hint style="warning" %}
If you upload a resource with the **No Split** chunking strategy, the whole file is treated as one chunk. This can fail if that chunk exceeds the input length limit of **8000** tokens.
{% endhint %}

* **Max value**: 200 – 8000 tokens
* Defines the maximum size of a single chunk of text.

#### **Chunk Overlap**

Chunk overlap means that consecutive text chunks share some of the same content, so important information that sits at the boundary between chunks is not lost.

* **Range:** 0% – 25% of the chunk size
* Controls how much of the end of one chunk overlaps with the beginning of the next. Increase above 0% if you want content continuity, up to a maximum of 25%.

{% hint style="info" %}
Chunk 1: "The company was founded in 2010 by **John Smith.**"\
Chunk 2: "**John Smith.** It expanded to Europe in 2015."

\
In this case, "John Smith." is the chunk overlap between the first and the second chunk
{% endhint %}

{% hint style="warning" %}
With a chunk size of 1000 and 25% overlap, each chunk still contains a total of 1000 tokens of which 250 tokens are the repeated ones the adjacent chunk.
{% endhint %}

#### **Improving retrieval of resources for the AI reply**

**Limit** defines how many candidate chunks are retrieved.&#x20;

**Score Threshold** removes candidates whose relevance score is below a minimum value.

#### **Limit**

* **Minimum:** 100 chunks
* Specifies the number of chunks the AI will consider when generating an answer.

#### **Score Threshold**

**Score Threshold** is the minimum relevance score a chunk must have to be included in the results.

* **Range:** 0.3 – 0.9
* After the system fetches the chunks ( up to the **Limit** ), each chunk is assigned a similarity score based on how closely it matches the query.
* Lower values (e.g., 0.3) allow more chunks to be considered, while higher values (e.g., 0.9) are stricter, only selecting highly relevant chunks.


---

# 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.xenioo.com/ai/large-language-models/resources/advanced.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.
