Breaking the Bias: Gender Fairness in LLMs Using Prompt Engineering and In-Context Learning
HSS, IIT BHU, India, Satyam Dwivedi, Sanjukta T. Ghosh, Shivam Dwivedi · Rupkatha Journal on Interdisciplinary Studies in Humanities · 2023
Large Language Models (LLMs) have been identified as carriers of societal biases, particularly in gender representation. This study introduces an innovative approach employing prompt engineering and in-context learning to rectify these biases in LLMs. Through our methodology, we effectively guide LLMs to generate more equitable content, emphasizing nuanced prompts and in-context feedback. Experimental results on openly available LLMs such as BARD, ChatGPT, and LLAMA2-Chat indicate a significant reduction in gender bias, particularly in traditionally problematic areas such as ‘Literature’. Our findings underscore the potential of prompt engineering and in-context learning as powerful tools in the quest for unbiased AI language models.