How elDoc GenAI Platform for Document Intelligence Leverages Docling for Enterprise AI and RAG

An architectural perspective on document understanding, structure-aware chunking, AI-powered knowledge retrieval and self-hosted document intelligence.

Enterprise document intelligence extends far beyond Optical Character Recognition (OCR). Modern Generative AI (GenAI) applications require mechanisms for understanding document structure, preserving semantic relationships, retrieving relevant information and transforming unstructured content into actionable business data.

The elDoc GenAI Platform for Document Intelligence addresses these challenges through an integrated architecture combining document preprocessing, OCR, document understanding, Intelligent Document Processing (IDP), AI-powered knowledge retrieval and operational document processing.

Rather than developing every underlying technology independently, elDoc leverages established open-source projects where they provide specialized capabilities that complement its existing infrastructure.

One such technology is Docling, an open-source document processing toolkit integrated into elDoc’s knowledge ingestion architecture to support document conversion, structure-aware chunking and Retrieval-Augmented Generation (RAG).

This article explores why elDoc adopted Docling, how it fits into the platform’s technical architecture, and how document understanding complements broader enterprise document intelligence capabilities.

An architectural perspective on document understanding, structure-aware chunking, AI-powered knowledge retrieval and self-hosted document intelligence.

Enterprise document intelligence extends far beyond Optical Character Recognition (OCR). Modern Generative AI (GenAI) applications require mechanisms for understanding document structure, preserving semantic relationships, retrieving relevant information and transforming unstructured content into actionable business data.

The elDoc GenAI Platform for Document Intelligence addresses these challenges through an integrated architecture combining document preprocessing, OCR, document understanding, Intelligent Document Processing (IDP), AI-powered knowledge retrieval and operational document processing.

Rather than developing every underlying technology independently, elDoc leverages established open-source projects where they provide specialized capabilities that complement its existing infrastructure.

One such technology is Docling, an open-source document processing toolkit integrated into elDoc’s knowledge ingestion architecture to support document conversion, structure-aware chunking and Retrieval-Augmented Generation (RAG).

This article explores why elDoc adopted Docling, how it fits into the platform’s technical architecture, and how document understanding complements broader enterprise document intelligence capabilities.

1. The challenge of preparing enterprise documents for Generative AI

Enterprise information rarely exists in a consistent, machine-readable format.

Organizations accumulate information across a wide range of document types and formats, including:

  • Scanned PDFs and image-based documents.
  • Digitally generated PDFs.
  • Microsoft Office documents.
  • Spreadsheets containing structured tables.
  • Presentations.
  • Markdown and text-based files.
  • Technical documentation and business reports.
  • Contracts, invoices and other operational documents.

Each format introduces different challenges related to content extraction, layout interpretation and preservation of contextual relationships.

Traditional text extraction approaches can make document content machine-readable, but they do not necessarily preserve the relationships that make the information meaningful.

For example, extracting text from a financial report without preserving its table structure may separate monetary values from their corresponding reporting periods. Similarly, extracting paragraphs without their associated headings can remove important contextual information.

For GenAI applications, these limitations become particularly relevant during knowledge ingestion and retrieval.

The challenge is therefore not simply to extract text, but to prepare document content in a representation that preserves sufficient structural and semantic context for downstream AI applications.

2. Docling as a document understanding component

Docling addresses document conversion and understanding through a unified representation of document content across different file formats.

Rather than treating documents as unstructured sequences of characters, Docling provides mechanisms for representing:

  • Document hierarchy and headings.
  • Paragraphs and reading order.
  • Tables and their internal structure.
  • Lists and nested content.
  • Images and other document elements.
  • Relationships between extracted content and its original document representation.

This unified representation allows downstream applications to work with document content through a consistent interface, reducing the need to develop format-specific processing logic.

For enterprise AI platforms such as elDoc, this is particularly valuable because knowledge ingestion must accommodate heterogeneous document collections.

 

 

3. Why conventional token-based chunking was insufficient

During the development of elDoc’s AI-powered knowledge retrieval functionality, one of the initial architectural challenges was determining how document content should be divided before embedding and indexing.

The initial implementation relied on conventional token-based chunking.

Token-based chunking divides extracted text into segments primarily according to token-count boundaries. Although this approach is relatively straightforward and can be applied across different types of textual content, it does not inherently account for document structure.

This creates several potential limitations:

  • Headings may become separated from their associated paragraphs.
  • Paragraphs may be divided in the middle of a meaningful explanation.
  • Table headers may become separated from corresponding values.
  • Related document elements may be distributed across independent chunks.
  • Retrieved content may lack the context necessary for accurate interpretation.

Consider a purchase order containing a table with product descriptions, quantities and unit prices.

If a chunk boundary separates the column headers from the corresponding rows, the resulting chunk may contain recognizable values without sufficient information to interpret what those values represent.

This becomes particularly problematic in Retrieval-Augmented Generation, where retrieved chunks are supplied to an AI model as contextual information.

The quality of document preparation therefore influences the quality of the information available during retrieval and subsequent answer generation.

Token-based chunking vs. structure-aware chunking

Processing characteristic Token-based chunking Structure-aware chunking
Chunk boundaries Primarily determined by token count Informed by document structure and token constraints
Heading context May become separated Can be preserved as contextual information
Paragraph integrity May be interrupted Document elements inform segmentation
Table context May become fragmented Structural relationships can inform chunk preparation
Document hierarchy Not inherently considered Incorporated into document representation
Suitability for structured documents Depends on additional processing Designed to leverage document structure

 

These considerations motivated elDoc to evaluate existing open-source technologies capable of supporting document-aware knowledge ingestion.

4. Why elDoc selected Docling

Rather than developing and maintaining a proprietary document conversion and chunking infrastructure, elDoc evaluated several existing open-source approaches.

The evaluation included technologies such as Unstructured, LlamaIndex and Chonkie, alongside the possibility of developing an internal solution.

The objective was not simply to identify a document parsing library, but to select a technology that could be integrated into elDoc’s existing enterprise document processing architecture.

The key architectural requirements included:

Technical requirement Architectural objective
Broad document format support Process heterogeneous enterprise document collections
Unified document representation Reduce format-specific processing requirements
Structure-aware chunking Preserve meaningful document context
Existing OCR result reuse Avoid redundant recognition operations
API-based integration Enable independent service communication
Independent deployment Maintain separation between architectural components
Java integration Facilitate integration with elDoc’s application infrastructure
Offline operation Support restricted-connectivity environments
Air-gapped deployment Preserve enterprise data isolation requirements

 

Docling satisfied these architectural requirements and provided an integration path through Docling Serve and its official Java integration.

Its adoption allowed elDoc’s engineering team to focus on higher-level application capabilities rather than independently recreating document conversion and structure-aware chunking infrastructure.

This approach also establishes a clear separation of responsibilities between document preprocessing, document understanding, knowledge indexing and AI-powered retrieval.

5. How Docling fits into the elDoc GenAI architecture

An important architectural principle is that Docling does not replace elDoc’s existing document preprocessing or OCR infrastructure.

elDoc already provides document preprocessing capabilities designed to prepare scanned documents for downstream processing.

These capabilities include:

  • Document orientation correction.
  • Image deskewing.
  • Optical Character Recognition.
  • Generation of searchable PDFs.
  • Preservation of recognized text positions relative to the original document content.

When scanned documents are processed by elDoc, recognized text is incorporated into a searchable PDF while maintaining its positional relationship with the original document.

Repeating OCR during knowledge ingestion would therefore introduce an unnecessary processing stage.

Instead, elDoc reuses the results of its existing preprocessing pipeline and delegates document conversion and structure-aware chunking to Docling.

Architectural processing flow

The integration distinguishes between scanned documents requiring preprocessing and digital documents that can be submitted directly for document conversion.

Scanned document processing:

Scanned document → elDoc preprocessing → Orientation correction and deskewing → OCR → Searchable PDF → Docling Serve

Digital document processing:

Digital document → Docling Serve

Both processing paths subsequently converge into a common knowledge ingestion pipeline:

Docling document conversion → Unified document representation → HybridChunker → Embedding model → Qdrant vector indexing → AI-powered retrieval → elDoc AI Assistant (Agentic RAG)

Docling document conversion → Unified document representation → HybridChunker → Embedding model → Qdrant vector indexing → AI-powered retrieval → elDoc AI Assistant

 

Architectural component responsibilities

Component Responsibility
elDoc document preprocessing Prepare scanned documents and correct image orientation
elDoc OCR infrastructure Recognize text and generate searchable PDFs
Docling Serve Provide independently deployed document processing services
Docling document conversion Transform documents into a unified representation
HybridChunker Generate structure-aware chunks
Embedding model Transform document chunks into vector representations
Qdrant Store and retrieve vectorized document content
elDoc AI Assistant Enable user interaction with organizational knowledge

This architecture allows each component to focus on its specialized functionality while contributing to a broader enterprise document intelligence workflow.

6. Independent service deployment using Docling Serve

Within the elDoc GenAI Platform, Docling is deployed as an independent service using Docling Serve.

The integration is implemented through an API-based communication model rather than embedding document conversion directly into elDoc’s application processing logic.

Documents are submitted to Docling Serve for conversion and chunking.

In elDoc’s knowledge ingestion configuration:

  • OCR within Docling is disabled.
  • Vision-language processing within Docling is disabled.
  • Previously recognized documents are submitted as searchable PDFs.
  • Text-based digital documents can be submitted in their original formats.
  • Docling is responsible for document conversion and structure-aware chunking.

Disabling OCR and vision-language processing is a deliberate architectural configuration specific to elDoc’s ingestion pipeline. It does not represent a limitation of Docling itself.

The objective is to avoid duplicating processing capabilities already provided by elDoc.

Independent service deployment also creates an architectural boundary between document understanding and the surrounding application infrastructure, allowing the document conversion component to be maintained separately.

7. Structure-aware knowledge ingestion using HybridChunker

Following document conversion, elDoc leverages Docling’s HybridChunker to prepare document content for embedding and retrieval.

Unlike conventional chunking approaches that operate exclusively on extracted text, HybridChunker leverages the document representation while accounting for token-based constraints.

This allows chunk preparation to consider document elements and their structural context.

The resulting chunks become the input for elDoc’s embedding pipeline.

From an architectural perspective, this establishes a sequence of distinct transformations:

Processing stage Result
Original document Source enterprise information
Document preprocessing Recognition-ready or searchable document
Docling conversion Unified document representation
HybridChunker Structure-aware content chunks
Embedding generation Vector representations
Vector indexing Searchable knowledge infrastructure
AI retrieval Relevant contextual information
AI response generation Document-based answers

 

The objective is to make document information available to AI applications in a form that retains meaningful context while remaining suitable for embedding and retrieval.

8. Qdrant integration and Retrieval-Augmented Generation

Once document chunks have been generated, they are incorporated into elDoc’s embedding and indexing pipeline.

The embedding model transforms document chunks into vector representations, which are subsequently stored and indexed using Qdrant.

When a user submits a question through the elDoc AI Assistant (RAG), relevant document information can be retrieved and supplied as contextual input to the Generative AI model.

This approach is commonly referred to as Retrieval-Augmented Generation (RAG).

The integration enables users to interact with organizational documents through natural-language questions, such as:

  • What payment terms are specified in this supplier agreement?
  • Which products were purchased under a particular purchase order?
  • What obligations are described in this contract?
  • What information is available regarding a particular business process?
  • What are the relevant conditions described in the organization’s technical documentation?

Rather than relying exclusively on information encoded within the AI model, the retrieval infrastructure makes relevant organizational document content available during answer generation.

 

Docling contributes to this architecture by preparing the document representation and structure-aware chunks that form the foundation of the knowledge ingestion pipeline.

9. Supporting self-hosted and air-gapped enterprise AI

Data privacy, infrastructure control and restricted network connectivity are important considerations when implementing enterprise Generative AI solutions.

Organizations may operate in environments where confidential documents cannot be transferred to external document processing services or where internet connectivity is restricted.

These requirements are particularly relevant when processing:

  • Financial documentation.
  • Confidential business contracts.
  • Internal operational procedures.
  • Intellectual property.
  • Sensitive organizational records.
  • Restricted technical documentation.

elDoc is designed to support self-hosted and air-gapped deployment scenarios.

Consequently, technologies integrated into its document intelligence architecture must preserve the possibility of operating within an organization’s controlled infrastructure.

Docling’s ability to operate independently in offline environments was therefore an important factor in its selection.

Within an appropriately configured local deployment, document preprocessing, document conversion, chunking, embedding generation, vector indexing and AI inference can operate without requiring external document processing services.

A fully air-gapped configuration requires all necessary models, software dependencies and processing components to be available within the isolated environment.

This architectural approach allows organizations to retain control over where documents are processed, where knowledge representations are stored and how AI applications interact with organizational information.

10. Document understanding and Intelligent Document Processing within elDoc

While Docling supports an important part of elDoc’s knowledge ingestion architecture, enterprise document intelligence encompasses additional processing objectives.

Making document content accessible for AI-powered retrieval is different from extracting specific business information for operational use.

Consider an organization receiving invoices from hundreds of suppliers.

From a knowledge retrieval perspective, the organization may want to ask questions about invoice content, payment terms or purchased products.

From an Intelligent Document Processing perspective, the organization may instead need to automatically extract a consistent set of business fields:

  • Invoice number.
  • Invoice date.
  • Supplier name.
  • Purchase order reference.
  • Payment terms.
  • Total amount.
  • Purchased products and services.

These fields must be identified regardless of differences in document layout, terminology, language or original presentation.

Modern document understanding toolkits, including Docling, provide structured extraction capabilities that can contribute to building such solutions.

An end-to-end AI Document Processing application extends this functionality into an operational processing lifecycle incorporating document separation, classification, configurable extraction requirements, confidence assessment, human validation and structured business data export.

Within the elDoc ecosystem, document understanding and Intelligent Document Processing therefore address complementary requirements.

Capability Document understanding and knowledge retrieval Intelligent Document Processing
Primary objective Make document information accessible to AI applications Capture relevant business information
Processing focus Document content and structural context Business fields and logical records
Document representation Unified document structure Business-specific extraction schema
AI interaction Natural-language questions and contextual retrieval Automated classification and extraction
Quality control Retrieval and contextual relevance Confidence assessment and business data validation
Typical output Retrieved document information and AI-generated answers Structured, reviewable business records
Operational purpose Knowledge discovery Business process automation

 

Both approaches contribute to enterprise document intelligence, but they address different application requirements.

 

11. Commercial elDoc and elDoc IDP OSS: Clarifying the architecture

The elDoc GenAI Platform for Document Intelligence incorporates multiple document processing and AI capabilities.

Docling is integrated into the commercial elDoc platform as part of its optional AI-powered knowledge ingestion and retrieval functionality.

Separately, elDoc has released the core functionality of its Intelligent Document Processing module as an independent open-source application — elDoc IDP OSS.

elDoc IDP OSS provides a ready-to-use, self-hosted application for:

  • Document preprocessing and OCR.
  • Automatic logical document separation.
  • AI-powered document classification.
  • Automatic business data extraction.
  • Configurable field-level and table extraction.
  • AI-assisted recognition form configuration.
  • Human-in-the-loop validation.
  • Structured business data export to CSV.

Docling is not a dependency of the standalone elDoc IDP OSS application.

 

Let's get in touch

Start with Open Source. Scale with Enterprise Support

Get your questions answered or schedule a demo to see our solution in action — just drop us a message