---
updatedAt: 2025-11-12T22:27:49.000Z
agentTools:
  projectIndex: https://support.docsumo.com/llms.txt
---

# Custom Table Column Extraction Using Prompts

## Overview

Docsumo allows users to set up **Custom Table Column Extraction** using **Custom Processing and AI-Powered Prompts**. This feature enables users to define how tables should be extracted and structured using LLM prompts, reducing manual effort and ensuring accurate data extraction.

## Feature Highlights

* **AI-Powered Table Extraction:** Use natural language prompts to define table structure and extract specific data fields.
* **Customizable Column Mapping:** Specify the required column names for AI-based extraction.
* **Post-Processing Logic:** Apply additional transformations using custom processing rules.

## How to Use Custom Table Extraction

### Step 1: Access Custom Processing

1. Navigate to the **Custom Processing** section for a table line item column in your edit field setup.

   <Image align="center" className="border" border={true} src="https://files.readme.io/8684cd720fbf97286ae35ce6b15b435905d0e5d6d6c12b86bd91bae416207147-image.png" />

<br />

### Step 2: Define the AI Extraction Logic

1. Use the `AI_EXTRACT_TABLE` function to define the table structure.
2. Provide a prompt describing the extraction logic and the required columns.

#### Syntax:

```plaintext
AI_EXTRACT_TABLE(prompt, *cols)
```

#### Example:

To categorize transactions based on description, debit, and credit fields, use:

<Image align="center" className="border" border={true} src="https://files.readme.io/b1057ea624b5faaa000f924aa3cfbc2f2bb882b681af234862ba8172b2dfe15a-image.png" />

```plaintext
AI_EXTRACT_TABLE("categorize transaction based on description debit and credit", "description:debit:credit")
```

<br />

### Step 4: Save & Apply

* Click **Save & Extract** to finalize the setup.
* The AI model will now apply these rules automatically when processing documents.

<br />

## FAQs

### 1. What if the AI does not extract the table correctly?

* Users can modify the prompt to refine the extraction logic.

### 2. Can I add additional columns later?

* Yes, users can update the column list by editing the `AI_EXTRACT_TABLE` function.

### 3. Does this feature support all document types?

* Custom table extraction is available for **table line item columns** only.  [Click here to learn more about setting key value field prompts](https://support.docsumo.com/docs/key-value-field-extraction-using-llm-prompts)

If you need further assistance, contact our support team at **<success@docsumo.com>**.