Culture Guardian

Period2025 Fall CategoryData Links GitHub

Overview

A chatbot that helps people talk with friends from other cultures.
It filters biased questions and answers with etiquette knowledge for each country.
Built as the capstone design project for my Data Science major.

A classifier trained on 3,858 Korean questions reads each question’s intent first,
and RAG answers from 28,195 etiquette passages across 277 countries and regions.

Skills

  • Python, PyTorch, Hugging Face Transformers
  • LangChain, OpenAI, Chroma
  • Pandas, NumPy, Scikit-learn, Gradio

Intent classifier

Classifying the intent of a question

Problem

Questions about other cultures can carry stereotypes or offensive framing without meaning to.
A chatbot that simply answers them ends up reinforcing the bias.

Solution

I built a classifier that sorts questions into curiosity or information request, insult or provocation, and bias.
klue/roberta-large is fine-tuned with label smoothing, R-Drop and EMA,
on a stratified 80/10/10 split.

Cleaning confusing labels

Problem

The line between bias and insult is blurry, so the model often mixed up those two labels.

Solution

I collected misclassified test samples and built separate clean splits without the samples confused between those two labels.

Chatbot and RAG

Answer pipeline

A question passes the intent filter, a GPT double check for possible insults, per-user memory,
a country-first RAG search and a persona prompt, and then gpt-4o-mini answers.

Keeping the evaluation fair

Problem

The RAG source files also held the 200 evaluation questions with their answers,
so embedding them as is would let RAG see the answers in advance.

Solution

The vector DB build now skips the evaluation questions.
With 200 yes/no etiquette questions across 20 countries,
I compared Hybrid RAG and Non-RAG for OpenAI, Claude, Gemini and Clova.

Comments