Embedding Retrofitting: Data Engineering for better RAG
Anantha Sharma
TL;DR
This paper tackles the problem that embedding retrofitting's effectiveness hinges on the quality of the underlying knowledge graph, which is highly sensitive to text preprocessing artifacts. It introduces a data engineering pipeline (artifact removal, text normalization, filtered graph construction, and quality validation) to reduce spurious co-occurrences, demonstrating that on noisy corpora, unclean graphs derail retrofitting, while properly preprocessed graphs enable significant gains, especially for EWMA retrofitting. Through experiments on HR-1 and ZeroG, the authors show that after preprocessing, EWMA retrofitting yields statistically significant improvements (up to +6.2% with notable gains in quantitative questions), while other methods may underperform due to high variance from noise. The study further contrasts retrofitting with fine-tuning, arguing that data shaping provides a more transparent, low-cost, and deployment-friendly path to improved retrieval, and it establishes practical preprocessing quality thresholds to diagnose failures before deployment. Overall, the work highlights that data quality can dominate algorithmic sophistication in retrofitting, offering actionable guidance for enterprise RAG systems and outlining future directions for broader artifact handling and automated quality assessment.
Abstract
Embedding retrofitting adjusts pre-trained word vectors using knowledge graph constraints to improve domain-specific retrieval. However, the effectiveness of retrofitting depends critically on knowledge graph quality, which in turn depends on text preprocessing. This paper presents a data engineering framework that addresses data quality degradation from annotation artifacts in real-world corpora. The analysis shows that hashtag annotations inflate knowledge graph density, leading to creating spurious edges that corrupt the retrofitting objective. On noisy graphs, all retrofitting techniques produce statistically significant degradation ($-3.5\%$ to $-5.2\%$, $p<0.05$). After preprocessing, \acrshort{ewma} retrofitting achieves $+6.2\%$ improvement ($p=0.0348$) with benefits concentrated in quantitative synthesis questions ($+33.8\%$ average). The gap between clean and noisy preprocessing (10\%+ swing) exceeds the gap between algorithms (3\%), establishing preprocessing quality as the primary determinant of retrofitting success.
