Introduction
AI has revolutionized document processing by automating the extraction of information from PDFs, scanned images, handwritten forms, and more. With tools like Unstract, businesses can process thousands of documents with minimal manual effort. However, even the most advanced AI systems sometimes need a human touch.
This is where the concept of Human in the Loop (HITL) becomes essential. In AI workflows, HITL refers to the process where humans are actively involved in validating or correcting the outputs generated by AI systems. Especially in AI document processing, where accuracy and compliance are critical, HITL ensures that the final data is trustworthy and reliable.
What is Human in the Loop (HITL)?

Human-in-the-Loop (HITL) is a system design approach where human judgment is integrated into an automated process—usually powered by AI. Instead of fully relying on machines, HITL workflows combine the speed of automation with the accuracy and reasoning of human reviewers.
In simple terms, HITL means that humans can review, correct, or approve the results generated by AI before those results are finalized or used. This concept is widely used in areas where:
- Precision is important
- Mistakes can be costly
- Machine confidence may vary
In AI document processing, HITL allows humans to step in whenever the AI encounters low-confidence fields or complex documents.
Why HITL is Essential for AI-Based Workflows
While AI is excellent at handling repetitive tasks at scale, it has limitations—especially when processing:
- Handwritten data
- Low-quality scans
- Poorly formatted documents
- New or unseen document layouts
Here’s why Human-in-the-Loop AI is critical in such workflows:
1. Quality Control and Oversight
AI models are trained on past data and can sometimes misinterpret unusual or ambiguous inputs. HITL allows humans to verify such outputs, ensuring data quality remains high.
2. Low Confidence Interventions
AI tools like Unstract can flag low-confidence extractions—such as unclear text or missing fields. When this happens, a human reviewer can validate the results or input missing values manually.
3. Learning and Feedback Loop
With HITL in place, human corrections can be used to retrain or fine-tune AI models, making them smarter over time. This continuous feedback loop improves AI accuracy.
4. Business Decision Support
Certain document workflows—like loan approvals or insurance claims—require human judgment. Even if data is extracted automatically, final approval often needs a person to review the information.
Relevance in Document Processing Automation
In document processing, HITL adds value at key stages like:
- Reviewing extracted values from complex documents
- Verifying critical fields such as name, date of birth, financial figures, and ID numbers
- Approving or rejecting AI-extracted content before saving it to a database
Let’s take an example: imagine an AI is processing a loan application. It extracts the applicant’s SSN, income, and contact details. However, if the document is blurry or has handwritten notes, the AI may not be confident. With HITL, a human can quickly validate or correct those fields.
This approach ensures that:
- No critical mistakes go unnoticed
- AI output is more reliable and auditable
- Manual work is minimized but quality is maintained
Why HITL Matters in AI Document Workflows
1. Handling Edge Cases Where AI Confidence is Low
Not every document follows a neat template. Scanned documents may be tilted, handwritten, or partially illegible. In such cases, the AI might assign a low confidence score to the extracted data. HITL enables human reviewers to handle these exceptions—ensuring nothing is missed or wrongly interpreted.
2. Ensuring Compliance, Accuracy, and Accountability
In industries like finance, healthcare, insurance, and legal, compliance with data accuracy standards is crucial. HITL workflows add an extra layer of protection by letting humans approve extracted values before they’re saved or shared. This reduces the risk of:
- Legal issues due to incorrect data
- Financial losses from misprocessed records
- Reputational damage
3. Enhancing User Control in Automated Pipelines
With HITL features in platforms like Unstract, users can define:
- Which fields should always be reviewed
- Confidence thresholds to trigger manual checks
- Approval workflows and reviewer roles
This gives businesses full control over automation—ensuring it complements human expertise rather than replacing it.
Benefits of HITL in Document Processing
Incorporating Human-in-the-Loop (HITL) into document processing workflows offers a range of strategic advantages. As businesses scale their automation with AI, having the ability to bring human reviewers into the loop at critical moments ensures both quality and control.
- Improved Accuracy Through Manual Validation
Even the best AI models may misread low-resolution scans, misinterpret handwritten fields, or extract incomplete information from complex tables. With HITL in place:
- Reviewers can correct or confirm extracted values.
- Critical fields—such as names, account numbers, or financial amounts—are manually verified when needed.
- Errors are caught before they enter the system, protecting data integrity and compliance.
This results in near-zero tolerance for critical extraction mistakes, especially in industries like finance, insurance, and legal services.
- Real-Time Decision-Making Where Automation Falls Short
Not all business rules can be hardcoded. Some decisions—such as whether a scanned signature is valid or if a document meets policy standards—still require human reasoning.
HITL enables:
- Reviewers to make judgment-based approvals where AI lacks confidence.
- Human control over edge cases, exceptions, or documents that deviate from standard formats.
- Fast intervention without halting or delaying the automation pipeline.
This makes AI automation more flexible and reliable in real-world scenarios.
- Continuous Feedback Loop for Model Improvement
Each time a human review or corrects AI output, the system gains a valuable insight:
- This feedback can be logged and used to retrain AI models.
- Over time, the system learns from mistakes and gets better at predicting outcomes.
- Businesses see improved AI accuracy and reduced HITL dependency.
In essence, HITL acts as both a safety net and a teacher for the AI—ensuring better performance with every iteration.
Together, these benefits make human-in-the-loop AI a powerful enhancement to automated document processing—balancing the speed of machines with the judgment of humans.
HITL in Unstract
Unstract offers a built-in Human-in-the-Loop (HITL) workflow that allows users to manually validate AI-extracted data before it reaches the final database. This section walks through how to set up a Prompt Studio project using loan documents, which will later be used with HITL controls enabled in the ETL pipeline.
Step 1: Setting Up Core Components in Unstract
Before setting up a document processing workflow, you first need to configure the essential components of Unstract. These modules enable the system to extract, understand, and process unstructured PDFs accurately.
Follow these steps:
1. Configure Key AI Modules Under SETTINGS
- LLM Configuration (e.g., OpenAI):
SETTINGS → LLMs → + New LLM Profile
Select a provider like OpenAI and paste your API Key. - Add Embedding Provider:
SETTINGS → Embedding → + New Embedding Profile
Choose a model (e.g., OpenAI embeddings) and configure your API details. - Connect a Vector Database:
SETTINGS → Vector DBs → + New Vector DB Profile
Select a supported vector DB like Pinecone or Weaviate and enter connection credentials. - Add OCR Tool (LLMWhisperer):
SETTINGS → Text Extractor → + New Text Extractor
Select LLMWhisperer—Unstract’s OCR tool that extracts data from scanned PDFs with layout preservation.
Step 2: Creating a Prompt Studio Project with Loan Documents
The Prompt Studio enables users to define specific extraction rules using natural language prompts.
Steps to Build the Prompt Project:
- Navigate to the Prompt Studio.
- Click “New Project” and name it something relevant, such as hitl_loan_doc.
- Upload Universal Loan Application PDFs using the Manage Documents option.
Define Extraction Prompts:
Here are a few prompt examples used to extract important fields:
Field Name | Prompt Instruction |
name | What is the name of the borrower (First, Middle, Last, Suffix)? |
ssn | What is the Social Security Number (or Individual Taxpayer Identification Number)? |
credit_type | Is the borrower applying for individual or joint credit? |
What is the borrower’s email address? | |
current_address | What is the borrower’s current address? |
income_details | What is the borrower’s monthly income? |
Output Format: Make sure each prompt is configured to return structured JSON. This ensures the data can be validated or routed into a database cleanly.

Step 3: Exporting the Prompt Project as a Tool
Once your prompts are working as expected and generating accurate JSON outputs:
- Open the hitl_loan_doc project in Prompt Studio.
- Click the Export as Tool icon (top right corner).
- This converts your project into a reusable extraction component, which can be dragged into ETL workflows.
This tool will later be used to build a Human-in-the-Loop-enabled ETL pipeline, where humans can review and approve extracted data before it’s stored in a database like NeonDB.
ETL Pipeline Configuration in Unstract (with Human-in-the-Loop)
With your Prompt Studio project ready and exported as a tool, it’s time to build the full ETL (Extract, Transform, Load) pipeline using Unstract’s Human-in-the-Loop (HITL) capabilities. This pipeline ensures AI-powered document processing is accurate, traceable, and optionally validated by humans before inserting data into a database like NeonDB (Postgres).
This section guides you through connecting the input and output sources and configuring HITL controls.
1. Creating a New Workflow
Start by creating a fresh workflow:
- Go to the Build → Workflows section.
- Click + New Workflow.
- Enter a relevant Name (e.g., Loan Document HITL Workflow).
- Add a Description to explain the purpose, such as “Review loan application documents before sending to NeonDB with Human-in-the-Loop review enabled.”

2. Adding the Extraction Tool
- In the Tools section (right panel), locate your previously exported Prompt Studio project (e.g., pdf_to_database).
- Drag and drop the tool into the workflow area on the left.

Click the tool block and verify the tool settings, check the Enable Highlights (it is required for HITL).

3. Configure Input Source: Dropbox (PDF Documents)
To set up Dropbox as your input file system:
- Click the gear icon next to the File System input block.
- Choose Dropbox from the list.
- Add your Dropbox Access Token.
- Select the folder containing your loan documents: unstract_hitl_workflow.
- Choose file type: PDF.
- Click Test Connection → then Submit and Save.

📌 Refer to the Dropbox Connector Guide for more info.
4. Configure Output Destination: NeonDB (Postgres)
NeonDB provides a free, cloud-based Postgres environment that’s perfect for real-time AI document extraction workflows.
Steps to Connect NeonDB:
- Go to https://console.neon.tech/.
- Create a new Postgres database.
Click Connect Your Database and copy the Connection String.

Now back in Unstract:
- Click the gear icon on the Database output block.
- Select Postgres as the database type.
- Paste the NeonDB Connection String.
- Define:
- Table Name: loan_doc_hitl_data
- Column Name: data (type: JSON or variant)
- Click Test Connection → then Submit and Save.

5. Enable Human-in-the-Loop (HITL) Review Controls
Unstract’s HITL settings let you define how and when documents should be reviewed by humans.
- Click the Human-in-the-Loop (HITL) tab next to the database settings.
In the Rules tab, configure:
- Percentage of Files for Manual Review:
Specify what percentage of documents go through manual validation.
Example: Setting this to 50% ensures that 1 out of every 2 documents is reviewed by a human reviewer before reaching the database. - Rule Logic:
Choose between AND / OR logic for combining multiple conditions. - Add Specific Rules:
Create conditional rules based on the extracted prompt fields.
Example: For the field name, set a rule like: “Name starts with Joseph.”
Any document satisfying this rule will be routed for HITL review.

In the Settings tab, configure:
- After Approval, Send Result To:
- Options:
- Destination DB – Sends approved data to NeonDB.
- Queue – Sends approved data into a queue for further processing.
- Choose Destination DB to complete the end-to-end automation pipeline.
- Options:

6. Run the ETL Workflow
With all configurations complete:
- Click Run Workflow to begin the process.
- The workflow will:
- Scan your configured Dropbox folder (unstract_hitl_workflow) for loan application PDFs.
- Extract structured JSON data using your Prompt Studio tool.
- Route data through the Human-in-the-Loop AI review system, depending on the set rules.
- Push the validated or auto-approved data into your NeonDB Postgres table (loan_doc_hitl_data).
You can now manage this pipeline from the ETL Pipelines dashboard and monitor all executions, including pending and reviewed documents.
This powerful combination of AI document processing and Human-in-the-Loop validation ensures maximum accuracy, control, and scalability—making Unstract ideal for high-stakes data workflows like loan processing, healthcare compliance, insurance claims, and more.
Use this HITL setup to confidently extract data from complex documents and store it safely and accurately in your Postgres database via NeonDB.
Running the Workflow with Human-in-the-Loop (HITL)
Once your ETL pipeline is configured with Human-in-the-Loop (HITL) review enabled, it’s time to execute the full AI document processing workflow in Unstract.
1. Launching the ETL Pipeline
- Navigate to Workflows in Unstract.
- Click ETL Pipelines section directly.
- Click on + New ETL Pipeline to initiate a new run using your configured HITL-enabled workflow.

2. Assigning Review Roles & Permissions

To enable seamless document validation, Unstract provides role-based access control for users:
- Unstract Admin: Full control over all aspects, including HITL review management.
- Unstract User: Can participate in workflows but does not have access to the review dashboard.
- Unstract Reviewer: Can only review documents flagged for HITL.
- Unstract Supervisor: Can review and approve documents after the initial review phase.
Each reviewer or supervisor plays a critical role in improving AI-based document processing accuracy by ensuring that low-confidence or rule-triggered extractions are validated manually.

3. Monitoring the Review Flow
All HITL-flagged documents are automatically routed to the Human Quality Review (HQR) dashboard:
- Select your project from the dashboard.
- Click Fetch Next to view the next pending document.
- Use Queue Details to track the status and flow of documents within the review process.
This interface provides a real-time overview of how documents move through the human-in-the-loop AI workflow, enabling supervisors to maintain accuracy and throughput.
Review Page Walkthrough in Unstract
The Review Dashboard is central to the HITL experience in Unstract, empowering human reviewers to validate, correct, and approve AI-extracted data before it reaches the final destination.

1. Reviewing and Validating Extracted Data
- Click on a field once to highlight the corresponding area in the PDF preview.
- Double-click a field to edit the extracted content if needed (e.g., correcting a name, date, or SSN).

This real-time editing capability bridges the gap between AI prediction and human validation—ensuring maximum precision for every record.
2. Completing the Review Process
Once all necessary fields are verified:
- Click Finish Review to move the document into the Approval Queue.

- A designated Approver (Supervisor) will then review the document again, with full editing capability if further changes are required.

This two-step review-approve structure builds accountability and trust into the AI HITL workflow, especially for critical use cases like loan application processing, insurance claims, and financial compliance.
3. What Happens After Approval?
Depending on your ETL workflow configuration, approved documents can:
- Be automatically pushed to NeonDB (Postgres), completing the structured data ingestion flow.
- Or, if configured as “Send to Queue”, be retrieved via API using the following endpoint:
curl --location 'https://us-central.unstract.com/mr/api/<organization_id>/approved/result/<class_id>/' \
--header 'Authorization: Bearer <your_api_key>'
You can find:
Your organization ID in the ETL pipeline endpoint settings.

The API Key from the API key management section.

The class ID via the Download and Sync Manager under your profile.

By integrating human-in-the-loop AI workflows with powerful review controls, Unstract ensures that every document processed—no matter how complex—is validated and enriched with human judgment where needed. This is crucial for industries that demand accuracy, compliance, and auditability in AI document extraction.
Whether you’re processing sensitive financial forms or large volumes of insurance documents, HITL in Unstract guarantees both automation speed and human-level precision.
Conclusion: Bridging AI Automation with Human Judgment Through HITL
In the evolving world of AI document processing, automation alone cannot guarantee flawless outcomes—especially when dealing with critical business documents like loan applications, insurance claims, or regulatory filings. This is where the Human-in-the-Loop (HITL) approach becomes invaluable.
Why HITL Bridges the Gap Between AI and Human Judgment
The HITL AI model introduces a safety net—allowing human reviewers to step in precisely when AI predictions are uncertain, complex, or fall below a defined confidence threshold. This human-in-the-loop approach ensures:
- Greater accuracy, as humans validate or correct low-confidence fields.
- Contextual understanding, especially for edge cases that AI alone may misinterpret.
- Continuous feedback, which helps improve the model over time.
By combining the speed of AI with the insight of human judgment, HITL brings balance to intelligent automation pipelines.
How Unstract’s HITL Feature Enables Transparent, Reliable AI Workflows
Unstract’s implementation of HITL in document automation is more than a fallback mechanism—it’s a central pillar of trust, transparency, and control. Here’s how:
- Built-in Review Controls: Rules-based manual review routing based on confidence scores or prompt keys.
- Role-Based Access: Assign reviewers, supervisors, and admins for structured document review and approval.
- Flexible Workflow Routing: Send reviewed outputs to NeonDB, queues, or fetch via secure API endpoints.
This makes Unstract one of the few platforms where AI-powered document workflows are not just fast but also auditable and trustworthy.
As AI adoption scales across industries, platforms like Unstract—backed by robust human-in-the-loop AI features—will lead the way in bridging automation with accountability. Whether you’re processing hundreds or millions of documents, HITL ensures every piece of data is reviewed, trusted, and production-ready.
Ready to bring HITL to your AI document processing workflows?
Try Unstract with HITL today and combine the best of AI and human intelligence.
Unstract is a no-code platform to eliminate manual processes involving unstructured data using the power of LLMs. The entire process discussed above can be set up without writing a single line of code. And that’s only the beginning. The extraction you set up can be deployed in one click as an API or ETL pipeline.
With API deployments you can expose an API to which you send a PDF or an image and get back structured data in JSON format. Or with an ETL deployment, you can just put files into a Google Drive, Amazon S3 bucket or choose from a variety of sources and the platform will run extractions and store the extracted data into a database or a warehouse like Snowflake automatically. Unstract is an Open Source software and is available at https://github.com/Zipstack/unstract.
If you want to quickly try it out, signup for our free trial. More information here.