RAG, or Retrieval-Augmented Generation, has received widespread acceptance when it comes to reducing model hallucinations and enhancing the domain-specific knowledge base of large language models (LLMs). Corroborating information produced by an LLM with external data sources has helped keep the model outputs fresh and authentic. However, recent findings in a RAG system have underscored the problems with RAG-based LLMs, such as the inclusion of bias in a RAG system.
Bias in LLMs has been a topic of discussion for some time, but an overhead on that, due to the usage of RAGs, warrants some attention. This article explores the fairness in AI, different fairness risks introduced by RAG, why this happens, what can be done to mitigate it, and propositions for the future.
RAG is an AI technique that enhances a large language model by integrating external sources. It allows a model to have a fact-check or proofread mechanism over the information it produces. RAG-powered AI models are seen as more credible and updated, as citing external sources adds accountability to data. This also prevents the model from producing dated information. The core functionality of a RAG system depends on external datasets, their quality, and the level of censorship they’ve been exposed to. A RAG system can embed bias if it references an external dataset that developers haven’t sanitized of bias and stereotypes.
Artificial intelligence (AI) is advancing rapidly, bringing several critical ethical considerations to the forefront that developers must address to ensure its responsible development and deployment. This development has drawn attention to the often-overlooked concept of ethical AI in RAG systems and algorithmic fairness.
AI fairness has been under a lot of scrutiny since the advent of AI-powered chatbots. For instance, Google’s Gemini product was criticized for overcompensating racial biases by over-representing AI-generated images of people of color, and attempting to address historical racial disparities that resulted in an unintended over-correction of the model. Furthermore, attempts at mitigating conspicuous biases such as religion and gender have been extensive, whereas lesser-known biases go under the radar. Researchers have made efforts to reduce the inherent bias in AI, but they haven’t given much attention to the bias that adds up at other stages of processing.
RAG, in essence, uses external sources to fact-check information produced by the LLM. This process usually adds more valuable and up-to-date information. But if external sources provide biased information to RAG, it could further reinforce outputs that would otherwise be considered unethical. Retrieving knowledge from external sources can inadvertently introduce undesired biased information, leading to discriminatory outputs from LLMs.
Bias in RAG stems from users’ lack of fairness awareness and the absence of protocols for sanitizing biased information. The common conception of RAG mitigating misinformation leads to oversight of the bias it produces. People use external data sources as they are without checking for bias issues. A low level of fairness awareness leads to some level of bias being present, even in censored datasets.
Recent research examines RAG’s fairness risks from three levels of user awareness regarding fairness and reveals the impact of pre-retrieval and post-retrieval enhancement methods. The tests found that RAG can undermine fairness without requiring fine-tuning or retraining, and adversaries can exploit RAG to introduce biases at a low cost with a very low chance of detection. It concluded that current alignment methods are insufficient for ensuring fairness in RAG-based LLMs.
Several strategies can address fairness risks in retrieval-augmented generation (RAG) based large language models (LLMs):
The Latest research explored the possibility of mitigating bias in RAG by controlling the embedder. An embedder refers to a model or algorithm that converts textual data into numerical representations, known as embeddings. These embeddings capture the semantic meaning of the text, and RAG systems use them to fetch relevant information from a knowledge base before generating responses. Considering this relationship, the research revealed that reverse biasing the embedder can de-bias the overall RAG system.
Furthermore, they found that optimal embedder on one corpus is still optimal for variations in the corpus bias. In the end, researchers concluded that most de-biasing efforts focus on the retrieval process of a RAG system, which is insufficient, as previously discussed.
RAG-based LLMs offer a significant advantage over traditional AI-based LLMs and make up for a lot of their downsides. But it ain’t a panacea as apparent from the fairness risks it introduces. While RAG helps mitigate hallucinations and enhances domain-specific accuracy, it can also inadvertently amplify biases present in external datasets. Even carefully curating data cannot fully ensure fairness alignment, highlighting the need for more robust mitigation strategies. RAG needs better safeguard mechanisms against fairness degradation, with summarization and bias-aware retrieval playing key roles in mitigating risks.