Unstract has introduced a specialized architecture based on six agents to solve one of the most difficult tasks in Document AI — accurate data extraction from unstructured PDF tables.

image

What Happened

Instead of using a single general-purpose LLM agent, Unstract implemented a pipeline where tasks are divided among specialized roles. The system performs table detection, prompt generation, and, crucially, automatic Python script generation (Codegen) for the final mapping of data into a target JSON schema.

Context

Traditional approaches using monolithic LLM queries often face hallucinations, high token costs, and context length limitations when working with complex documents. The problem of "crooked" tables in PDFs has long been the Achilles' heel of RAG systems.

Why It Matters for the Industry

This approach marks a shift from simple LLM queries to full-fledged Agentic Workflows. For the industry, this means the ability to create scalable and reliable ETL tools where AI acts not just as a chatbot, but as a planner and coder integrated with classical software.

Why It Matters for Users

For developers and businesses, this is a practical example of how dividing roles between small and large models, combined with code generation, makes working with AI more predictable, cheaper, and suitable for industrial exploitation.

What Is Not Yet Known / Limitations

There are potential legal and security risks associated with executing automatically generated code in production environments.

Sources

Author

Look at AI, Editorial Team