Balancing Reasoning and Hardware Constraints in RAG Pipelines for Ukrainian Multi-Domain Document Understanding
Organizations: National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute” Educational and Scientific Institute for Applied System Analysis (IASA) Department of Artificial Intelligence
Abstract
This paper describes the system submitted to the UNLP 2026 Shared Task on Multi-Domain Document Understanding. The challenge required extracting precise answers, document IDs, and page numbers from a diverse corpus of Ukrainian PDF documents within a strict 9-hour offline Kaggle execution limit. During evaluation on the hidden private test set, optical character recognition (OCR) of scanned documents emerged as a severe bottleneck, consuming 5-7 hours of the total time budget due to sequential single-threaded execution. This overhead strictly limited the remaining time for Large Language Model (LLM) inference to approximately two hours for 500 questions. To guarantee pipeline completion without timeouts, we developed a resource-efficient Hybrid Retrieval-Augmented Generation (RAG) pipeline utilizing BM25, BGE-M3, and Cross-Encoder reranking. Rather than deploying parameter-heavy reasoning models (e.g., DeepSeek R1) which consistently timed out, we utilized a 4-bit quantized LapaLLM 12B model via llama.cpp on dual NVIDIA T4 GPUs. Prioritizing pipeline stability over multi-step reasoning, our system achieved a Private Score of 0.8095, placing 10th out of 15 active teams.
Figures & tables
| Configuration | Public | Private | Status |
|---|---|---|---|
| MamayLM 7B (Top-5) | 0.6918 | 0.7374 | Completed |
| LapaLLM 12B Base (Top-5) | 0.7741 | 0.7990 | Completed |
| LapaLLM 12B Exp. (Top-7) | 0.7831 | 0.8095 | Completed |
| LapaLLM 12B Self-Consistency | Timeout | Timeout | Failed |
| DeepSeek R1 Distill 14B | Timeout | Timeout | Failed |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Component / Parameter | Value |
|---|---|
| Chunking & Parsing | |
| Chunk Word Count | 250 words |
| Chunk Overlap | 50 words |
| PDF Parsing Engine | pymupdf4llm (Markdown) |
| OCR Fallback | Tesseract (Single-threaded) |
| Hybrid Retrieval | |
Document QA
Document question answering uses AI to answer questions from text, tables, images, and structured content in documents.
See all 93 papers