> For the complete documentation index, see [llms.txt](https://docs.aisuru.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aisuru.com/en/agent-training/document-import/importing-text-documents.md).

# Importing text documents

AIsuru lets you import text documents and automatically transform them into knowledge for your Agent. This process lets you quickly enrich your virtual assistant's knowledge base by generating relevant question and answer pairs from your document content.

### Supported documents

**Supported formats** include: PDF (.pdf), plain text (.txt), Microsoft Word (.doc, .docx), Apple Pages (.pages), OpenDocument (.odt), Rich Text Format (.rtf), HTML (.html).

**AIsuru supports OCR technology**, but for best results we recommend uploading documents with already selectable text. OCR works best on well scanned documents with clear text but may struggle with low quality scans or complex formatting.

### Importing features from other Agents

Beyond document import, AIsuru also lets you import complete features from your other Agents. Through the **"Import from another agent"** tab you can:

* Copy [**advanced functions**](/en/advanced-features/integrations/functions/advanced-functions.md) with all their configurations
* Import [**dynamic intents**](/en/advanced-features/integrations/dynamic-intents.md) and their related **slots**
* Transfer the [**custom dictionary**](/en/agent-training/dictionary.md)

This is particularly useful when you want to replicate complex configurations across similar Agents or create backups of your implementations. For more details, see the guide on Copying dynamic intents, slots, and functions from another Agent.

### Accessing the import section

1. **Go to your Agent's management panel**
2. Select **Import / Export** in the sidebar
3. You can "Click or drag file" to this area in order to upload a document
4. Once the document is uploaded, scroll down to see a preview of the extracted text and adjust the various import settings.

You'll find two sections:

1. Import options
2. Context variables

### Import options

#### Choosing what to import

After uploading the document, you can select:

* **Import only new contents**: if questions similar to existing ones are generated, AIsuru won't import them
* **Import all contents**: imports the full document content, even if similar questions already exist

#### Content customization

You can choose, by checking the box, whether to set all contents as:

* **Non random**: questions won't be randomly suggested during user inactivity (to learn more, go to the section on [timeout](/en/agent-training/advanced/content-customization/using-timeout.md))
* **Conclusive:** the answer is not followed by any further questions (e.g."Is there anything else you want to know?")

You can also **add a link to all imported questions** (for example, a link to the original file, so the source is always accessible).

#### **Other settings**

In the import options, you can also adjust the granularity: **this setting controls how many question and answer pairs are generated per paragraph**. You can set:

* **Low:** fewer contents per paragraph, faster to process which is useful for discursive or narrative texts
* **Medium:** the recommended option, generates a moderate number of contents
* **High:** generates many contents per paragraph, takes longer but is very useful for information dense texts with many concepts

{% hint style="info" %} <mark style="color:blue;">In oder to achieve</mark> <mark style="color:blue;">best results,</mark> <mark style="color:blue;">**we recommend setting granularity to high**</mark><mark style="color:blue;">.</mark>
{% endhint %}

Next, there are **instructions for question generation**. This field is for **guiding the generative AI in how it will create questions**: it's crucial for getting relevant, high quality question and answer pairs.

In the instructions you should provide:

* a brief **context about the document**: what is it about? what is it useful for?
* a brief **context about the end user**: who are they? what kinds of questions do they ask? what language do they use?
* some **clear and concise rules and instructions** for generating the questions.

Example:

```
This document describes company policies for workplace safety.

Instructions for question generation:
- Create questions covering the main safety topics mentioned in the document;
- Include questions about specific procedures, safety equipment, and employee responsibilities;
- Generate questions that test understanding of the consequences of not following safety rules;
- Create some scenario-based questions that require applying the policies to real situations.
```

#### Source attachment title (optional):

Select this option if you want to include the original text as an attachment for each generated question and answer pair.

### Context variables

In the context variables section you can add: tags, set topics, required topics and assign a role.

#### Tag

Tags are like categories you can assign to your contents. If you set a tag during a document import, all question and answer pairs generated from that document will be tagged with those categories.

By default, a tag is added to identify your import with this way, you can always trace which contents came from which imported document.

You can remove tags by clicking the red trash icon next to each one, or click "Add" to add a new one.

#### Set topics

Add the [context to set](/en/agent-training/advanced/content-customization/context-topics-and-labels.md#set-context-and-required-context) when the user asks specific questions.

#### Required topics

Users won't have access to the question-and-answer pairs created from the document import unless they've first set a specific topic.

#### **Assigned to**

The contents extracted from the document can be assigned to a [**specific role**](/en/agent-training/advanced/content-customization/assigning-contents-to-roles.md) or to the **public**.

### Launching the import and Import history

Once you've configured all the settings, you can start the import by clicking the **Import** button at the bottom left.

After starting the import, you'll have access to a new tab in the Import / Export section: **Import history**.

From this section you can see:

* **The progress** of the import you launched
* **Past imports**

For each import, you can see:

* File title
* Start and end date of the process
* Number of questions imported
* If you click on **"Import data and configuration"** you'll also see:
  * File size
  * File name
  * Whether contents are set as non-random
  * Granularity
  * Instructions for question generation
  * Source title
  * Link handling

Importing text documents into AIsuru is an effective and fast way to grow your Agent's knowledge base.
