PCA-RAG: Principal Component Analysis for Efficient Retrieval-Augmented Generation
Arman Khaledian, Amirreza Ghadiridehkordi, Nariman Khaledian
TL;DR
High-dimensional embeddings used in Retrieval-Augmented Generation (RAG) pose storage and latency challenges in finance-focused tasks. The authors apply PCA to compress embeddings from $3{,}072$ to $110$ dimensions, achieving up to $60\\times$ speedups in retrieval and approximately $28.6\\times$ index-size reduction, with only moderate declines in correlation to human similarity judgments. Across multiple distance and similarity metrics, the compressed space preserves substantial semantic alignment while enabling real-time, scalable knowledge-grounded responses in Newswitch. The work demonstrates the practicality of classical dimensionality reduction for scaling RAG in finance and highlights a tunable trade-off between retrieval fidelity and resource efficiency applicable to high-volume, time-sensitive domains.
Abstract
Retrieval-Augmented Generation (RAG) has emerged as a powerful paradigm for grounding large language models in external knowledge sources, improving the precision of agents responses. However, high-dimensional language model embeddings, often in the range of hundreds to thousands of dimensions, can present scalability challenges in terms of storage and latency, especially when processing massive financial text corpora. This paper investigates the use of Principal Component Analysis (PCA) to reduce embedding dimensionality, thereby mitigating computational bottlenecks without incurring large accuracy losses. We experiment with a real-world dataset and compare different similarity and distance metrics under both full-dimensional and PCA-compressed embeddings. Our results show that reducing vectors from 3,072 to 110 dimensions provides a sizeable (up to $60\times$) speedup in retrieval operations and a $\sim 28.6\times$ reduction in index size, with only moderate declines in correlation metrics relative to human-annotated similarity scores. These findings demonstrate that PCA-based compression offers a viable balance between retrieval fidelity and resource efficiency, essential for real-time systems such as Zanista AI's \textit{Newswitch} platform. Ultimately, our study underscores the practicality of leveraging classical dimensionality reduction techniques to scale RAG architectures for knowledge-intensive applications in finance and trading, where speed, memory efficiency, and accuracy must jointly be optimized.
