Docling

Document conversion and extraction service used by AI ingestion workflows.

Agentic Friendly

Component Category

Document AI inference

Component Description

Docling converts uploaded documents into structured content for retrieval workflows. BullSequana AI deploys Docling through the BSQAI API chart and uses Redis-backed RQ workers so conversion state is shared across backend replicas.

Standalone PNG, JPEG, and WebP uploads bypass Docling and use a tenant-selected vision model to generate searchable descriptions. Documents still use Docling; optional descriptions of pictures extracted from PDF, Word, PowerPoint, and Excel files run through the selected model connection, separately from Docling's own vision features.

Why It Is Used

In BullSequana AI, Docling provides one conversion path for text, layout, tables, OCR, and other document structure needed by downstream embedding, retrieval, and extraction workflows.

Learn More

Developer Guidance

Applications use the BSQAI API upload flow at POST /v1/files/upload-stream instead of calling Docling directly. The backend applies validation, bounded polling, Temporal heartbeats, batching, storage, and tenant-scoped authorization around conversion.

GPU acceleration

Docling runs in CPU mode by default. An environment override selects the CUDA image and adds NVIDIA GPU resources. See Enable GPU for AI components.

Models and storage

The docling-serve CPU and CUDA images include the models Docling loads. Docling needs no model-cache volume and no ReadWriteMany storage class.

Docling pods use ephemeral storage only:

WorkloadEphemeral storage requestEphemeral storage limit
API pods1 GiB5 GiB
Conversion workers2 GiB10 GiB

Worker scaling

Docling runs API pods and RQ conversion workers that share one job queue. A HorizontalPodAutoscaler scales the conversion workers between 1 and 4 on an average CPU use of 1500m per pod. The autoscaler needs metrics-server; without it, Docling keeps the minimum number of workers, which still convert documents one at a time.

Platform engineers set the worker scaling in the [docling_scaling] table of the llm-backend component:

KeyDefaultEffect
worker_autoscalingtrueScales conversion workers with the autoscaler
worker_min_replicas1Minimum number of conversion workers
worker_max_replicas4Maximum number of conversion workers
worker_target_cpu1500mAverage CPU use per worker that the autoscaler targets
worker_replicas2Fixed number of conversion workers, used only when worker_autoscaling = false

The optional GPU worker pool keeps a fixed count set by gpu_worker_replicas.

Chunker tokenizers

Docling chunks documents with the tokenizer of the active embedding model. Each Docling pod starts with the tokenizers of the catalog embedding models and of common open embedding models, including BAAI/bge-m3, the Qwen3-Embedding models, intfloat/multilingual-e5-large, and nomic-ai/nomic-embed-text-v1.5.

Docling fetches any other tokenizer from the BSQAI API, never from the internet. The BSQAI API serves the tokenizer of an embedding model deployed on the platform from object storage, or forwards the request to its configured Hugging Face endpoint, which can be a mirror. See Hugging Face mirror and offline mode.

If the tokenizer still cannot be loaded, the BSQAI API does not fail the document. It chunks the document with the default tokenizer, sentence-transformers/all-MiniLM-L6-v2, at 80% of the tenant's maximum tokens per chunk, and chunks it hierarchically if that also fails. Chunk sizes are then approximate. Tenant administrators see which tokenizer is used in the document processing settings.

A reindex after a change of the tenant's chunk size or chunking type sends a document to Docling again, one file at a time, unless it already has text chunks for the new size and type, and a file with its own values through the API keeps them. Plan for that load on a large library. A model or overlap change sends to Docling only files whose figures and tables were never extracted or failed to extract, when the tenant extracts them.

Interacts With

  • BSQAI API, for document ingestion, extraction, and status operations, and as the only source of chunker tokenizers Docling does not include.
  • Temporal, for durable document-processing workflows and heartbeats.
  • Redis, for shared conversion job state and worker queues.
  • Milvus, for embedded document chunks used in retrieval.
  • Rook-Ceph or external S3-compatible storage, for source documents and artifacts.

On this page