Skip to content

Evaluating In-Context Learning and Retrieval Strategies for Devanagari Post-OCR Correction

Sep 2026 · 0 citations · 29 references
Computer Science

TL;DR

CharBM25 is established as an effective, GPU-free retrieval strategy that matches or exceeds dense retrieval at negligible computational cost, and combining it with a general-purpose LLM of 12B+ parameters delivers reliable, training-free Devanagari post-OCR correction without task-specific fine-tuning.

Abstract

In-context learning using Large Language Models (LLMs) offers a compelling path to training-free post-OCR correction, yet its effectiveness for Devanagari script remains entirely unexplored. We present the first systematic evaluation of LLMs (3B-32B) for post-OCR correction in Hindi and Marathi, comparing three in-context example retrieval strategies: domain-random selection, dense semantic retrieval, and our proposed CharBM25, which retrieves examples by character n-gram BM25 similarity over OCR inputs to target shared error patterns with the test sentence. Across a 20,000-sentence benchmark spanning five news domains, retrieval strategy is the decisive factor in correction quality: CharBM25 outperforms domain-random selection by 2.8-4.0pp absolute WER on Hindi and 2.9-3.8pp on Marathi, using character trigrams, which consistently outperform bigrams and unigrams. Scale dominates performance: Gemma-3-27B achieves WER reductions of 55.0% for Hindi and 33.3% for Marathi under CharBM25-5. Few-shot gains are capacity-gated: models below 8B do not reliably improve over the OCR baseline, and on Marathi the smallest models (3B) degrade more sentences than they improve. Marathi is persistently harder to correct than Hindi across all scales, reflecting its greater morphological complexity. These findings establish CharBM25 as an effective, GPU-free retrieval strategy that matches or exceeds dense retrieval at negligible computational cost, and show that combining it with a general-purpose LLM of 12B+ parameters delivers reliable, training-free Devanagari post-OCR correction without task-specific fine-tuning. Dataset: https://huggingface.co/datasets/AbhishekBhandari/Devanagari-OCR-ICL-Benchmark

View source

Similar papers

Open access Sep 2026

Evaluation of Gen-AI (LLM) Results on Prompts in the Batak Language

While Large Language Models (LLMs) demonstrate remarkable NLP capabilities, their performance on low-resource regional languages like Toba Batak remains underexplored. This study presents a rigorous empirical evaluation of four LLMs—ChatGPT, Gemini, Perplexity, and the domain-adapted Toba-LLM—on prompts written in the...

Ade Siahaan, Angelina Nadeak, Jeremy Samosir et al. · 0 citations
Book Open access Aug 2026

Cost-Aware Human-LLM Collaboration for Post-OCR Corrections in Swiss Historical Newspapers

A regression-guided routing approach that prioritizes segments by predicted CER improvement, paired with a safeguard layer that detects harmful LLM corrections and routes uncertain segments to human review, and substantially outperforms standard confidence-based approaches is introduced.

Stergios Konstantinidis, Hayman Lotfy, Michalis Vlachos · 0 citations

Related blog posts

MIT News · Artificial Intelligence Jun 3, 2026

MIT researchers teach AI models to interpret charts

The new ChartNet training dataset could improve the accuracy of vision-language models that help analyze business trends or interpret scientific figures.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.