> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Assigning reference classes

> Assign reference classes to training pages manually, by source folder, or by classifying part of the batch first in FlexiLayout Studio.

Assign a reference class to each page (using the **Set Reference class** command in the shortcut menu), or assign the classes automatically using the source folder. We recommend adding the **Unknown Documents** class for documents that cannot be classified.

A reference class is a class assigned to a document as a result of manual classification. Both a section of a document and a document variant can be a reference class.

## Assign reference classes based on source folders

If source files were sorted into different folders in the file system prior to being loaded into FlexiLayout Studio, you can create and assign reference classes that correspond to the appropriate folders in the storage system. To do this:

* Use the **Add Images from Folder** command.
* After loading the files, assign classes to them using the **Set Reference Class by Source Folder** command.

## Assign reference classes based on a part of the images

To process a large batch of unsorted images, assign reference classes to some of the images and use them to classify the rest:

1. Assign reference classes to some of the images (the **Set Reference Class** command in the shortcut menu).
2. Train the classifier using the manually assigned images with recall priority. For more information, see [Trade-off between precision and recall](/flexi-capture/fls/classify-recall-prec).
3. Classify the rest of the batch and sort the results according to class (the **Classification Results** column).
4. Check the classification results. Use the **Set Classification Result Class as Reference** command for documents that have had their class identified correctly. Manually assign reference classes to the rest.
