DocClaw: A Unified Agentic System for Intelligent Document Processing
DocClaw is a unified agentic system that reframes diverse intelligent document processing tasks as a shared iterative interaction process between an agent and a document, leveraging a structured document state and reusable tools to achieve competitive performance across OCR, DocQA, and KIE benchmarks.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Every day, we are surrounded by documents that hold the world's knowledge: annual reports, medical records, legal contracts, and handwritten notes. For a computer to understand these pages, it must do more than simply read the words; it must see how the text is arranged, recognize charts and tables, and piece together information that is scattered across different sections. This challenge, known as intelligent document processing, has long been treated as a collection of separate jobs. One program might be designed to turn a picture of a page into text, while a different program is needed to find a specific answer within that text, and yet another to pull out key numbers like dates or prices. These tools work in isolation, unable to share what they learn from one task to help with the next, forcing a rigid, step-by-step approach that often misses the bigger picture.
Researchers have now introduced a new system called DocClaw that changes how computers interact with documents. Instead of treating each task as a separate problem, DocClaw acts like a single, intelligent assistant that can read, search, and reason through a document in a continuous loop. When given a question or a request, this system does not just guess an answer; it actively explores the document, using a set of specialized tools to find the right information, check its work, and refine its understanding until it is confident in the result. By keeping a running record of what it has already discovered, the system can reuse that knowledge for future questions, making it faster and more accurate over time.
The core of this new approach is a shift from static prediction to active interaction. In traditional methods, a computer looks at a document once and produces an output, with no way to go back and correct a mistake or look deeper if the first attempt was unclear. DocClaw, however, treats the document as a partner in a conversation. When a user asks a question, the system first decides on a strategy based on what is being asked. If the goal is to simply read the text, it focuses on recognizing letters and layout. If the goal is to find a specific fact, it plans a search. If the goal is to extract a value like a revenue number, it prepares to cross-check its findings. This strategy is guided by what the researchers call "document skills," which are essentially instructions that tell the system how to behave for different types of tasks.
Once the strategy is set, the system begins its work by building a structured memory of the document. It breaks the page down into manageable parts, noting where text, images, and tables are located. As it uses its tools to read specific sections or analyze a chart, it saves those findings in a persistent memory bank. This is a crucial difference from older systems: the knowledge gained from reading one part of a report is not discarded after the task is done. Instead, it is stored so that if a later question requires information from that same section, the system already knows where to look and what it found. This allows the system to avoid repeating work and to build a deeper understanding of the document as it answers more questions.
The system operates in a cycle of planning, acting, and updating. It looks at the current state of its knowledge, decides what tool to use next—such as zooming in on a blurry section, cropping a table for better clarity, or searching for a keyword—and then executes that action. The result of that action is immediately added to its memory. If the system finds a number that seems inconsistent, it can use its tools to verify it against the original image or run a second check. This process continues until the system has gathered enough evidence to answer the question with confidence. Only then does it stop and provide the final answer, discarding the temporary notes for that specific question while keeping the permanent knowledge of the document for future use.
To test this approach, the researchers evaluated DocClaw on three very different types of tasks: reading text from images, answering questions about long documents, and extracting specific data points like financial figures. They compared the system against both general-purpose artificial intelligence models and specialized tools designed for single tasks. The results showed that DocClaw performed as well as, or better than, the specialized tools across the board. In tests involving the recognition of complex text, formulas, and tables, the system achieved high accuracy scores, often outperforming dedicated software. When asked to answer questions based on long reports, it was able to locate the correct information and provide grounded answers more reliably than standard models. Similarly, when tasked with pulling out key information, it successfully combined visual reading with text recognition to reduce errors.
A closer look at how the system works revealed why it was so effective. The researchers found that the ability to refine its own work was a major factor. When the system encountered difficult-to-read text, it frequently used a "zoom" tool to get a closer look, which significantly improved its ability to recognize small symbols and numbers. In tasks requiring the extraction of specific data, the system's habit of double-checking its findings against the original image corrected a large portion of the mistakes that other models made. Furthermore, the system's memory proved essential for efficiency. When asked a series of questions about the same document, the time it took to answer each subsequent question dropped noticeably. This happened because the system did not need to re-scan the entire document for every new query; it could simply recall what it had already learned and focus only on the new information needed.
The study demonstrates that treating document processing as a unified, interactive process is a powerful way to handle the complexity of real-world documents. By allowing a single system to switch between reading, searching, and verifying based on the needs of the moment, DocClaw overcomes the limitations of rigid, single-purpose tools. It shows that when a computer is given the ability to remember what it has seen and to plan its next move carefully, it can understand documents with a level of flexibility and accuracy that was previously difficult to achieve. This approach does not just automate a task; it creates a more intelligent way for machines to engage with the vast amount of written information that shapes our world.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.