Evaluating Document Pre-processing Techniques for LLM-based Information Extraction
Resumo
This paper evaluates binarization, skew correction, OCR-guided region selection, and their combinations for schema-constrained document extraction with Gemini 3 Flash and Gemma 4 31B. Experiments cover 564 real Brazilian documents, 17 types, 110 fields, and manually validated ground truth, using field-level F1, normalized Levenshtein similarity, and separate artifact and LLM-side latency. Artifact-generation time is measured separately because variants can be produced offline and is therefore excluded from LLM-side latency. Skew correction achieved the highest observed aggregate mean for Gemini 3 Flash, whereas the baseline did so for Gemma 4 31B; binarization and heuristic region selection often had lower F1. Without inferential tests, these descriptive results support no universal pre-processing policy.Referências
Almeida, F. and Caminha, C. (2024). Evaluation of entry-level open-source large language models for information extraction from digitized documents. In Anais do XII Symposium on Knowledge Discovery, Mining and Learning, pages 25–32, Porto Alegre, RS, Brasil. SBC.
Amin, A. and Fischer, S. (2000). A document skew detection method using the hough transform. Pattern Analysis and Applications, 3(3):243–253.
Aquino, I., dos Santos, M. M., Dorneles, C., and Carvalho, J. T. (2024). Extracting information from brazilian legal documents with retrieval augmented generation. In Anais Estendidos do XXXIX Simpósio Brasileiro de Bancos de Dados, pages 280–287, Porto Alegre, RS, Brasil. SBC.
Canny, J. (1986). A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8(6):679–698.
Esashika, R., Figueiredo, C., and Melo, T. (2025). Structuring information from initial petitions using llms: A study in brazilian courts of justice. In Anais do XXII Encontro Nacional de Inteligência Artificial e Computacional, pages 546–557, Porto Alegre, RS, Brasil. SBC.
Kiryati, N., Eldar, Y., and Bruckstein, A. M. (1991). A probabilistic hough transform. Pattern Recognition, 24(4):303–316.
Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady, 10(8):707–710.
Li, Z., Abulaiti, A., Lu, Y., Chen, X., Zheng, J., Lin, H., Han, X., Jiang, S., Dong, B., and Sun, L. (2025). READoc: A unified benchmark for realistic document structured extraction. In Findings of the Association for Computational Linguistics: ACL 2025, pages 21889–21905, Vienna, Austria. Association for Computational Linguistics.
Loukil, F., Cadereau, S., Verjus, H., Galfre, M., Salamatian, K., Telisson, D., Kembellec, Q., and Le Van, O. (2024). Llm-centric pipeline for information extraction from invoices. In 2024 2nd International Conference on Foundation and Large Language Models (FLLM), pages 569–575.
Melo, A., Cabral, B., and Claro, D. (2024). Scaling and adapting large language models for portuguese open information extraction: A comparative study of fine-tuning and lora. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 427–441, Porto Alegre, RS, Brasil. SBC.
Nunes, G., Rolla, V., Pereira, D., Alves, V., Carreiro, A., and Baptista, M. (2025). Benchmarking table extraction: Multimodal LLMs vs traditional OCR. In Proceedings of the 1st Joint Workshop on Large Language Models and Structure Modeling (XLLM 2025), pages 8–15, Vienna, Austria. Association for Computational Linguistics.
Nunes, R., Puttlitz, L., Boll, A., Spritzer, A., Freitas, C., Balreira, D., and Tavares, A. (2024). An ensemble of llms finetuned with lora for ner in portuguese legal documents. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 127–140, Porto Alegre, RS, Brasil. SBC.
Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66.
Perot, V., Kang, K., Luisier, F., Su, G., Sun, X., Boppana, R. S., Wang, Z., Wang, Z., Mu, J., Zhang, H., Lee, C.-Y., and Hua, N. (2024). Lmdx: Language model-based document information extraction and localization.
Pires, R., Abonizio, H., Almeida, T., and Nogueira, R. (2023). Sabiá: Portuguese large language models. In Anais da XII Brazilian Conference on Intelligent Systems, pages 226–240, Porto Alegre, RS, Brasil. SBC.
Shen, J., Peiyue, Y., Ghosh, A., Mai, Y., and Dahlmeier, D. (2026). OCR or not? rethinking document information extraction in the MLLMs era with real-world large-scale datasets. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 5: Industry Track), pages 385–396, Rabat, Morocco. Association for Computational Linguistics.
Silva, M., Oliveira, G., Costa, L., and Pappa, G. (2024). Govbert-br: A bert-based language model for brazilian portuguese governmental data. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 19–32, Porto Alegre, RS, Brasil. SBC.
Smith, R. (2007). An overview of the tesseract ocr engine. In Ninth International Conference on Document Analysis and Recognition (ICDAR 2007), volume 2, pages 629–633.
Souza, F., Nogueira, R., and Lotufo, R. (2020). Bertimbau: Pretrained bert models for brazilian portuguese. In Intelligent Systems: BRACIS 2020 Proceedings, page 403–417. Springer-Verlag.
Tenckhoff, S., Koddenbrock, M., and Rodner, E. (2026). Llmstructbench: Benchmarking large language model structured data extraction.
Xu, Y., Li, M., Cui, L., Huang, S., Wei, F., and Zhou, M. (2020). Layoutlm: Pre-training of text and layout for document image understanding. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD ’20, page 1192–1200. ACM.
Zagatti, F., Lucrédio, D., and Caseli, H. (2024). Unsupervised statistical keyword extraction pipeline: Is llm all you need? In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 460–475, Porto Alegre, RS, Brasil. SBC.
Amin, A. and Fischer, S. (2000). A document skew detection method using the hough transform. Pattern Analysis and Applications, 3(3):243–253.
Aquino, I., dos Santos, M. M., Dorneles, C., and Carvalho, J. T. (2024). Extracting information from brazilian legal documents with retrieval augmented generation. In Anais Estendidos do XXXIX Simpósio Brasileiro de Bancos de Dados, pages 280–287, Porto Alegre, RS, Brasil. SBC.
Canny, J. (1986). A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8(6):679–698.
Esashika, R., Figueiredo, C., and Melo, T. (2025). Structuring information from initial petitions using llms: A study in brazilian courts of justice. In Anais do XXII Encontro Nacional de Inteligência Artificial e Computacional, pages 546–557, Porto Alegre, RS, Brasil. SBC.
Kiryati, N., Eldar, Y., and Bruckstein, A. M. (1991). A probabilistic hough transform. Pattern Recognition, 24(4):303–316.
Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady, 10(8):707–710.
Li, Z., Abulaiti, A., Lu, Y., Chen, X., Zheng, J., Lin, H., Han, X., Jiang, S., Dong, B., and Sun, L. (2025). READoc: A unified benchmark for realistic document structured extraction. In Findings of the Association for Computational Linguistics: ACL 2025, pages 21889–21905, Vienna, Austria. Association for Computational Linguistics.
Loukil, F., Cadereau, S., Verjus, H., Galfre, M., Salamatian, K., Telisson, D., Kembellec, Q., and Le Van, O. (2024). Llm-centric pipeline for information extraction from invoices. In 2024 2nd International Conference on Foundation and Large Language Models (FLLM), pages 569–575.
Melo, A., Cabral, B., and Claro, D. (2024). Scaling and adapting large language models for portuguese open information extraction: A comparative study of fine-tuning and lora. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 427–441, Porto Alegre, RS, Brasil. SBC.
Nunes, G., Rolla, V., Pereira, D., Alves, V., Carreiro, A., and Baptista, M. (2025). Benchmarking table extraction: Multimodal LLMs vs traditional OCR. In Proceedings of the 1st Joint Workshop on Large Language Models and Structure Modeling (XLLM 2025), pages 8–15, Vienna, Austria. Association for Computational Linguistics.
Nunes, R., Puttlitz, L., Boll, A., Spritzer, A., Freitas, C., Balreira, D., and Tavares, A. (2024). An ensemble of llms finetuned with lora for ner in portuguese legal documents. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 127–140, Porto Alegre, RS, Brasil. SBC.
Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66.
Perot, V., Kang, K., Luisier, F., Su, G., Sun, X., Boppana, R. S., Wang, Z., Wang, Z., Mu, J., Zhang, H., Lee, C.-Y., and Hua, N. (2024). Lmdx: Language model-based document information extraction and localization.
Pires, R., Abonizio, H., Almeida, T., and Nogueira, R. (2023). Sabiá: Portuguese large language models. In Anais da XII Brazilian Conference on Intelligent Systems, pages 226–240, Porto Alegre, RS, Brasil. SBC.
Shen, J., Peiyue, Y., Ghosh, A., Mai, Y., and Dahlmeier, D. (2026). OCR or not? rethinking document information extraction in the MLLMs era with real-world large-scale datasets. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 5: Industry Track), pages 385–396, Rabat, Morocco. Association for Computational Linguistics.
Silva, M., Oliveira, G., Costa, L., and Pappa, G. (2024). Govbert-br: A bert-based language model for brazilian portuguese governmental data. In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 19–32, Porto Alegre, RS, Brasil. SBC.
Smith, R. (2007). An overview of the tesseract ocr engine. In Ninth International Conference on Document Analysis and Recognition (ICDAR 2007), volume 2, pages 629–633.
Souza, F., Nogueira, R., and Lotufo, R. (2020). Bertimbau: Pretrained bert models for brazilian portuguese. In Intelligent Systems: BRACIS 2020 Proceedings, page 403–417. Springer-Verlag.
Tenckhoff, S., Koddenbrock, M., and Rodner, E. (2026). Llmstructbench: Benchmarking large language model structured data extraction.
Xu, Y., Li, M., Cui, L., Huang, S., Wei, F., and Zhou, M. (2020). Layoutlm: Pre-training of text and layout for document image understanding. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD ’20, page 1192–1200. ACM.
Zagatti, F., Lucrédio, D., and Caseli, H. (2024). Unsupervised statistical keyword extraction pipeline: Is llm all you need? In Anais da XXXIV Brazilian Conference on Intelligent Systems, pages 460–475, Porto Alegre, RS, Brasil. SBC.
Publicado
19/10/2026
Como Citar
ANDRADE, Matheus Leonel de; YOUSSEF, Amir; ALVES, Samuel; JAMAL, Henrique; PEREIRA, Lucas Araújo; OLIVEIRA, Sávio Salvarino Teles de; FERNANDES, Deborah Silva Alves.
Evaluating Document Pre-processing Techniques for LLM-based Information Extraction. In: ENCONTRO NACIONAL DE INTELIGÊNCIA ARTIFICIAL E COMPUTACIONAL (ENIAC), 23. , 2026, Cuiabá/MT.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 1364-1375.
ISSN 2763-9061.
DOI: https://doi.org/10.5753/eniac.2026.31087.
