# AI Server. Add Chunks

The block adds chunks to the knowledge base on the Sherpa AI Server. An embedding will be obtained for each chunk[^1].

<table data-header-hidden><thead><tr><th width="297.88330078125" valign="top"></th><th width="322.4500732421875" valign="top"></th></tr></thead><tbody><tr><td valign="top">File GUID/File Path</td><td valign="top"><p>[Text] The GUID of the file or the path to the file to which this chunk will be added. If no value is specified, the chunk will be added to the default file. The file path must include the file name and file extension.</p><p>For example, <code>"Folder 1\Subfolder 2\Subfolder 3\Document.docx"</code>.</p></td></tr><tr><td valign="top">Chunk Text</td><td valign="top">[Text] The text of the chunk.</td></tr><tr><td valign="top">Metadata</td><td valign="top">[Dictionary] Optionally specify a dictionary with metadata for this chunk.</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] The maximum wait time for a response in seconds.</td></tr><tr><td valign="top">File GUID</td><td valign="top">[Text] Returns the GUID of the current file.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>

[^1]: An embedding is a vector (a set of numbers) that characterizes the meaning associated with the provided input text. Words or sentences with similar meanings will have embeddings with minimal cosine distance. Embeddings can also be used to search for the most semantically similar words, strings, or paragraphs in document databases.


---

# 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.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/mashinnoe-obuchenie-machine-learning/ai-server.-dobavit-chanki-addchunksaiserver.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.
