Skip to the content.

Biases in LLM and How to Fix Them

Uncovered and meticulously analyzed three distinct biases present in LLM, employing advanced Python techniques and data analysis methodologies, all within AI4ALL’s cutting-edge AI4ALL Ignite accelerator.

Problem Statement

Given the substantial daily output of responses, the identification and mitigation of LLM’s biases become critical, safeguarding both the multitude of users and the far-reaching consequences they may influence.

Key Results

  1. Recorded over 1,000 unique prompts and their responses generated by LLM
  2. Identified three biases in LLM’s responses
    • When prompted about this world event
    • When prompted about this field of science
    • When prompted about this political party

Methodologies

To accomplish this, we utilized the OpenAI API to interact with LLM, and we designed a custom Python script to generate diverse prompts and collect corresponding responses. The data was then processed and analyzed using pandas, enabling us to detect patterns and biases in the AI model’s outputs. Engineered a Python script to generate over 1,000 prompts and elicit their responses from LLM, utilizing pandas to collect the data. When prompted for solutions to this specific relevant crisis, nearly 80% of LLM’s responses promoted a certain worldview.

Data Sources

Kaggle Dataset: LLM_data

Technologies Used

Authors

This project was completed in collaboration with: