# Feedback-Based Document Reprocessing

### Overview&#x20;

Docspire's feedback-based reprocessing feature allows you to improve document extraction results by providing natural language instructions. When a document's initial extraction doesn't meet your expectations, you can guide the system to better understand how to extract and format data from your specific documents.&#x20;

This feature is particularly useful for documents with unique layouts, industry-specific terminology, or custom formatting requirements. Your feedback helps the AI learn to handle similar documents more accurately in the future.&#x20;

#### When to Use Feedback-Based Reprocessing&#x20;

Consider using this feature when:&#x20;

* The document type was incorrectly detected&#x20;
* Specific fields were missing or extracted incorrectly&#x20;
* Data formatting doesn't match your requirements (dates, numbers, currencies)&#x20;
* The AI confused similar-looking fields&#x20;
* The AI confused the table alignment (values were placed under incorrect column headers due to skewed layout)&#x20;
* You need to extract additional fields not captured initially&#x20;

### How to Access Reprocessing&#x20;

1. Navigate to **Main > Document Queue** in the left sidebar.&#x20;
2. Locate the document you want to reprocess in the Document Processing Queue.&#x20;
3. Click the **Reprocess** button in the Actions column. This button appears for documents with Success or In Review status.&#x20;
4. The **Reprocess Document** dialog will open.

<figure><img src="https://3990462849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fgjpo1gyiI3QKDSNO9maQ%2Fuploads%2FDyUeDHpMQwBFs8ER6e90%2Fimage.png?alt=media&#x26;token=f98fcee5-6c93-46d0-8681-cb741aee2216" alt=""><figcaption></figcaption></figure>

#### The Reprocess Document Dialog&#x20;

The dialog contains two key elements:&#x20;

**Document Type** – A dropdown menu to change the document classification if it was incorrectly detected. Available types include: Bank Statement, Credit Report, ID, Invoice, Mortgage Application, Pay Slip, Purchase Order, and Receipt. Leave empty to allow auto-detection.&#x20;

{% hint style="info" %}
*Note: Set “Other” category when reprocessing your document to check if results have improved.*&#x20;
{% endhint %}

**Feedback** – A text field (up to 500 characters) where you can provide natural language instructions to improve the extraction results.&#x20;

### Writing Effective Feedback&#x20;

Good feedback doesn't need to be complicated. Simple, clear instructions work best. Here are easy patterns you can follow:&#x20;

#### Pattern 1: Tell It Where to Look&#x20;

When a field is missed or wrong, point to its location.&#x20;

**Template:** *"\[Field name] is in the \[location]."*&#x20;

**Examples:**&#x20;

* *"Invoice number is in the top-right corner."*&#x20;
* *"Total amount is in the last row of the table."*&#x20;

<figure><img src="https://3990462849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fgjpo1gyiI3QKDSNO9maQ%2Fuploads%2FClP3Ku8EAnEUGyvb8UTJ%2Fimage.png?alt=media&#x26;token=9c3abb32-ca74-461f-bd20-45974662fea2" alt=""><figcaption></figcaption></figure>

#### Pattern 2: Clarify Which Column to Use&#x20;

When data comes from the wrong column, specify the correct one.&#x20;

**Template:** *"\[Field name] is under the \[column name] column."*&#x20;

**Examples:**&#x20;

* *"Unit price is under the 'Rate' column."*&#x20;
* *"Weight is under the 'Net Wt (KG)' column."*&#x20;

#### Pattern 3: Specify the Format You Need&#x20;

When data formatting is wrong, state what you want.&#x20;

**Template:** *"Format \[field] as \[desired format]."*&#x20;

**Examples:**&#x20;

* *"Format dates as YYYY-MM-DD."*&#x20;
* *"Format amounts as numbers without currency symbols."*&#x20;

#### Pattern 4: Fix Data Quality Issues&#x20;

When extracted data has quality problems, describe the fix.&#x20;

**Template:** *"\[Action] from \[field/values]."*&#x20;

**Examples:**&#x20;

* *"Remove extra spaces from all field values."*&#x20;
* *"Trim leading zeros from account numbers."*&#x20;

#### Pattern 5: Combine Instructions When Needed&#x20;

You can combine multiple simple instructions in one feedback.&#x20;

**Example:**&#x20;

*"Quantity is in whole numbers. Price is under 'Unit Cost' column. Remove currency symbols from amounts."*&#x20;

### Real-World Feedback Examples&#x20;

Here are practical examples showing how simple feedback solves common extraction issues:&#x20;

#### Invoice: Wrong Total Extracted&#x20;

**Problem:** System extracted the subtotal instead of the final amount due.&#x20;

**Feedback:** *"Total is the final 'Amount Due' at the bottom, not the subtotal."*&#x20;

#### Shipping Document: Incorrect Weight Values&#x20;

**Problem:** Weight values are being pulled from the wrong column.&#x20;

**Feedback:** *"Net weight is under 'N.W. (KG)' column. Gross weight is under 'G.W. (KG)' column."*&#x20;

#### Purchase Order: Quantity Format Issues&#x20;

**Problem:** Quantities are showing decimal values when they should be whole numbers.&#x20;

**Feedback:** *"Quantity should be whole numbers only. Unit of measure is in the 'UOM' column."*&#x20;

#### Any Document: Extra Spaces in Text&#x20;

**Problem:** Extracted text has unnecessary spaces between words or at the start/end.&#x20;

**Feedback:** *"Remove extra spaces from all text values."*&#x20;

#### Bank Statement: Date Format Wrong&#x20;

**Problem:** Dates show as "12/Jan/2025" but need to be in standard format.&#x20;

**Feedback:** *"Format all dates as DD-MM-YYYY."*&#x20;

#### Receipt: Tax Amount Missing&#x20;

**Problem:** The tax/VAT amount was not extracted.&#x20;

**Feedback:** *"Tax amount is on the line labeled 'VAT' or 'Tax' above the total."*&#x20;

#### ID Document: Name Fields Combined&#x20;

**Problem:** First and last name extracted as one field.&#x20;

**Feedback:** *"First name and last name are separate fields. Last name is labeled 'Surname'."*&#x20;

#### Invoice: Line Items Merged Together&#x20;

**Problem:** Multiple line items are combined into one entry.&#x20;

**Feedback:** *"Each row in the items table is a separate line item. Extract them individually."*&#x20;

#### Any Document: Unwanted Currency Symbols&#x20;

**Problem:** Amounts include $ or other currency symbols when you need plain numbers.&#x20;

**Feedback:** *"Return all amounts as numbers without currency symbols or commas."*&#x20;

#### Pay Slip: Wrong Period Amounts&#x20;

**Problem:** Year-to-date values extracted instead of current pay period.&#x20;

**Feedback:** *"Use values from 'Current Period' column only, not 'YTD' column."*&#x20;

#### Multi-Page Document: Duplicate Values&#x20;

**Problem:** Same data extracted multiple times from different pages.&#x20;

**Feedback:** *"Use summary totals from the last page only. Ignore page subtotals."*&#x20;

#### Invoice: Wrong Company Extracted as Vendor&#x20;

**Problem:** The buyer's company name was extracted instead of the seller/vendor.&#x20;

**Feedback:** *"Vendor name is in the 'From' or 'Sold By' section at the top, not the 'Bill To' section."*&#x20;

### Quick Reference: Common Feedback Phrases&#x20;

Copy and adapt these ready-to-use phrases:&#x20;

* *"\[Field] is in the \[top/bottom/left/right] section."*&#x20;
* *"\[Field] is under the '\[Column Name]' column."*&#x20;
* *"Format \[field] as \[format]."*&#x20;
* *"Remove \[currency symbols/extra spaces/commas] from \[field]."*&#x20;
* *"\[Field] should be \[whole numbers/decimals/text only]."*&#x20;
* *"Extract each \[row/item/entry] separately."*&#x20;
* *"Use values from '\[Section/Column]' only."*&#x20;
* *"Ignore \[YTD/subtotals/header rows]."*&#x20;

### Troubleshooting&#x20;

| **Issue**                               | **Solution**                                                                                                                             |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Reprocessing doesn't improve results    | Try being more specific about field locations and exact labels. Include the document section where the data appears.                     |
| Wrong document type detected repeatedly | Manually select the correct document type from the dropdown before reprocessing. Add feedback mentioning the document type.              |
| Feedback character limit reached        | Focus on the most critical corrections. Use abbreviated but clear instructions. Consider reprocessing multiple times for complex issues. |
| Dates still in wrong format             | Specify both the source format and desired format. Example: "Convert dates from MM/DD/YYYY to YYYY-MM-DD format."                        |
| Numbers include unwanted characters     | Explicitly state: "Format amounts as plain numbers without currency symbols, commas, or percentage signs."                               |

### Related Features&#x20;

* **Document Queue** – Monitor and manage all documents in your processing pipeline.&#x20;
* **Document Tracking** – View detailed processing history and status for each document.&#x20;
* **Human Review** – Manually review and correct extraction results for documents requiring attention.&#x20;
* **Validation Rules** – Set up automated rules to validate extracted data against business requirements.&#x20;
