Abstract:
With the increasing reliance on Large Language Models (LLMs) for academic research,
students are often exposed to biased or unfair information without realizing it. This presents a
critical problem as educational content generated by LLMs may unintentionally reflect
stereotypes or discriminatory narratives. Students risk basing their research and learning on
inaccurate or unfair data without proper bias detection and mitigation mechanisms.
FairBoTT was developed as a fairness-enhanced chatbot to address this issue by detecting
and mitigating bias in real-time conversations. The bias detection model was built using a
fine-tuned BERT-based binary classifier supported by a secondary validation layer using
Toxic-BERT for handling ambiguous cases. Bias type identification was further enhanced
using rule-based keyword mapping with spaCy, while a context-aware downgrading
mechanism ensured that fairness-promoting content was not misclassified. For mitigation,
FairBoTT integrated Google’s Gemini LLM API to rewrite biased content in a neutral and
non-offensive manner. The solution was developed using a modular Spring Boot architecture
combined with Python-based machine learning models.
The bias detection model achieved an accuracy of approximately 70% in detecting biased
inputs, with a precision of 0.7580, recall of 0.8211, and an F1-score of 0.7883. The system
successfully detected and mitigated bias in real time, providing transparent feedback and
allowing users to proceed, rewrite, or mitigate content as needed. This ensures FairBoTT is a
practical solution for reducing bias in LLM-powered educational tools, supporting students in
accessing fair and reliable information.