Agentic-Doc: A Python Library from LandingAI for Extracting Structured Data from Complex Documents 73

小编 ·

Agentic-Doc: A Python Library from LandingAI for Extracting Structured Data from Complex Documents

agentic-doc is a Python library from LandingAI designed to extract structured data from complex documents, including PDFs, images, and URLs. It wraps the relevant APIs for easy use. It can handle very long documents (hundreds of pages or more) and automatically deals with network issues, such as retrying failed requests, managing concurrent tasks, and respecting rate limits. It also comes with visual debugging tools to help users understand and optimize the data extraction process. The library simplifies API usage and automatically splits large files into chunks.

Agentic-Doc: A Python Library from LandingAI for Extracting Structured Data from Complex Documents

Introduction to Agentic-Doc

agentic-doc is a Python library launched by Landingai, specifically designed for extracting structured data from complex documents (including PDFs, images, and URLs). This library wraps the relevant APIs to make them easy for users to operate. It can handle very long documents (over a hundred pages) and automatically deal with network issues, such as retrying failed requests, managing concurrent tasks, and respecting rate limits. In addition, it comes with visual debugging tools to help users better understand and optimize the data extraction process. This library simplifies API usage, automatically splits large files into chunks for parallel processing, merges the results, and includes error handling and batch processing capabilities, allowing users to handle document data more conveniently.

Agentic-Doc:A Python library launched by LandingAI for extracting structured data from complex documents.webp

Agentic-Doc Core Features

  • Complex Document Processing: Extract data from complex document layouts, including tables, images, and dynamic page layouts.

  • Long Document Support: Process PDF documents of more than 100 pages in one go.

  • Automated Handling: Automatically handles concurrency, timeout, and rate limit issues.

  • Helper Tools: Provides tools such as bounding box snippets and a visual debugger.

  • Structured Output: Outputs data in hierarchical JSON and Markdown formats.

  • Batch Processing: Supports batch processing of multiple documents, with parallel processing to improve efficiency.

  • Error Handling: Automatically retries common HTTP errors (such as 408, 429, 502, 503, 504).

Agentic-Doc Technical Features

  • Python-Based: Supports Python 3.9 to 3.12.

  • API Key Management: Set the API key via environment variables or a .env file.

  • Automatic Splitting and Merging: Automatically splits large files and processes them in parallel, then merges the results.

  • REST API Wrapper: Simplifies REST API calls, providing automatic handling of large files and parallel processing of multiple documents.

Agentic-Doc Use Cases

  • Document Digitization: Convert paper documents or scans into structured data.

  • Data Extraction: Extract key information from large volumes of complex documents.

  • Table and Chart Parsing: Automatically recognize and extract data from tables and charts.

  • Industry Applications: Suitable for industries such as finance, logistics, healthcare, insurance, and law for analyzing and processing complex documents.

Agentic-Doc Use Cases.jpg

Agentic-Doc Installation and Usage

  1. Installation: Install via pip install agentic-doc.

  2. Configuration: Set the API key as an environment variable.

  3. Supported File Types: Supports PDF, single image, or URL.

  4. Basic Usage: Provides simple function calls to parse documents and return structured data.

Agentic-Doc Advantages

  • Efficient Processing: Reduces manual intervention and increases the level of automation in document processing.

  • High-Precision Extraction: Provides more accurate extraction results, suitable for complex document layouts.

  • Automation Features: Automatically handles large files and batch documents.

Project Links

GitHub:https://github.com/landing-ai/agentic-doc

Official Website:https://landing.ai/agentic-document-extraction