Operationalizing Document AI: A Microservice Architecture for OCR and LLM Pipelines in Production

Yao Fehlis, Benjamin Bengfort, Zhangzhang Si, Vahid Eyorokon, Prema Roman, Patrick Deziel, Devon Slonaker, Steve Veldman, Ben Johnson, Joyce Rigelo, Michael Wharton, Steve Kramer

arXiv:2605.18818 · 2026-05-20 공개 · arXiv · PDF

llm ocr pipeline-optimization gpu-inference asynchronous-processing horizontal-scaling production-deployment structured-field-extraction

Abstract

Academic research tends to focus on new models for document understanding creating a wide gap in the literature between model definition and running models at production scale. To close that gap, we present a microservice architecture that encapsulates pipelines of multiple models for classification, optical character recognition (OCR), and large language model structured field extraction as well as our experience running this pipeline on thousands of multi-page documents per hour. We describe our primary design decisions, including a hybrid classification, separation of GPU-bound inference from CPU-bound orchestration, use of asynchronous processing for the many IO-bound operations in the pipeline, and an independent, horizontal scaling strategy. Using batch profiling, we identified two surprising qualitative findings that shape production deployments: OCR, not language-model parsing, dominates end-to-end latency, and the system saturates at a concurrency determined by shared GPU-inference capacity rather than worker count. Our goal is to provide practitioners with concrete architectural patterns for building document understanding systems that work beyond the benchmark; effectively operationalizing models in production.

한국어 요약

한 줄 요약

**[Document AI / 프로덕션 아키텍처]** 분류·OCR·LLM 구조화 추출 파이프라인을 시간당 수천 다페이지 문서로 운영하는 마이크로서비스 아키텍처와 그 운영 경험을 보고.

핵심 기여도

핵심 아이디어

"벤치마크의 모델 성능"과 "프로덕션 운영의 병목"은 다른 차원이며, 분류·OCR·LLM 추출이라는 이질적 컴포넌트를 결합한 시스템은 GPU 공유 추론 용량과 OCR 비용이 사실상의 디자인 제약이 된다.

기술적 접근법

주요 결과

의의 및 한계

**의의**: 학술 모델과 production 시스템 사이의 운영 격차를 메우는 구체적 아키텍처 청사진을 제시. **한계**: 특정 워크로드(다페이지 문서, 분류+OCR+LLM 파이프라인) 기반 경험치이며, 다른 도메인(예: 영상·실시간 스트림)에서의 결론 일반화는 후속 검증 필요.

실용적 활용