HeadlinesBriefing favicon HeadlinesBriefing.com

Agentic RAG Parsing: Dispatcher Controls Methods

Towards Data Science •
×

Before Full Agentic RAG: Know How You Decide, and the Parsing Methods You Pick From argues that for enterprise RAG, letting the model decide is dangerous. Instead, build a dispatcher that reads each PDF's nature and picks the method that fits: fitz, Docling, PaddleOCR, EasyOCR, MinerU or Surya, then folds the outputs into one enriched corpus. Every decision is explicit and logged.

The loop has four stages: Nature, Plan, Execute, Synthesize. Nature reads six deterministic flags (is_scanned, has_native_outline, has_sommaire, is_composite, has_rich_figures, has_tables_signal). Plan returns a hard-coded ordered list of methods. Execute runs each adapter. Synthesize merges DataFrames with a heuristic. No LLM at the dispatcher layer.

The article closes the parsing brick of the Enterprise Document Intelligence series. It composes methods built one at a time: fitz for text, Azure Document Intelligence and Docling for tables, a vision LLM for charts, EasyOCR for scanned pages, image captioning, and two ways to recover a table of contents. The runnable notebook processes the Attention is All You Need paper (1706.03762v7) with parse_pdf_agentic(), returning a 15-row toc_df and 1048-row line_df.

Calling this 'agentic' is a stretch—true agentic parsing would add an LLM that re-plans based on output. This is rule-based routing plus LLM leaves, enough for production. Volume 3 will add the real agent on top.