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

# Text Generation Models

This feature allows you to automatically extract and summarize information from documents and output the results into a structured table.&#x20;

The AI model analyzes each document in the dataset and generate a structured row in a table based on your custom-defined fields and instructions. These fields can represent content summaries, metadata of interest, and more.

For each instruction:

* You define what the AI should extract or summarize
* You configure a set of fields, each with:
  * Field Name
  * Field Type
  * Field Description (used as guidance to the model)
  * Whether the field is a list of values or a single value

The AI model uses your instructions and field descriptions as prompts to generate values for each document.

### How to Use

#### 1. **Create an Instruction**

Each instruction represents a task description for table generation. Example:

> *Summarize each document for identifying key topics and legal issues discussed.*

You can also set a priority for this instruction to control execution order if multiple instructions are defined.

#### 2. **Define Fields**

For each instruction, define fields that should be populated in the output table.

Each field includes:

| Field           | Description                                                                        |
| --------------- | ---------------------------------------------------------------------------------- |
| **Field Name**  | The label for the output column (e.g., "Summary")                                  |
| **Field Type**  | Set to `Text`  by default                                                          |
| **Description** | A natural language instruction describing what value should be extracted/generated |
| **Is List**     | Whether the value should be a list (e.g., multiple values)                         |

### Output

Once configured, the system will:

1. Go through every document in the dataset.
2. Use the field descriptions as natural language prompts to generate content for each field.
3. Output the result as a structured table, with one row per document and columns for each defined field.

### Notes & Best Practices

* Use clear, descriptive language in field descriptions – this acts as the prompt for the model.
* Use "Is List" for fields like recipients to ensure multiple values are correctly extracted.
* Use multiple fields to break up different aspects of the summary (e.g., "Summary" vs. "Legal Issue" vs. "Entities")
* Limit the total number of fields to be fewer than 50 per model.
* Currently the model is limited to generate 4K tokens (\~2.8K words) per model.&#x20;
