Topic: Fear of Academic Failure
Project type: Cloud Computing / RAG chatbot project
This project compares three systems required by the assignment:
| System | Meaning | Uses Gemini? | Uses project dataset? |
|---|---|---|---|
| S0 | Basic chatbot without RAG | Yes | No |
| S1 | Basic RAG | No | Yes |
| S2 | Safety-aware RAG | No | Yes + risk rules |
Important: RAG answers do not use Gemini. Gemini is only used for S0 so the comparison stays fair.
mindbridge_rag_ready/
├── app.py
├── requirements.txt
├── group_report.md
├── COPILOT_CODEX_PROMPT.md
├── backend/
│ ├── config.py
│ ├── data_loader.py
│ ├── retriever.py
│ ├── risk_detector.py
│ ├── rag_answer_generator.py
│ ├── gemini_client.py
│ └── evaluation_generator.py
└── data/
├── 1_sources.csv
├── 2_corpus_chunks.csv
├── 3_benchmark_questions.csv
├── 4_ideal_answers.csv
├── 5_risk_labels.csv
├── 6_model_responses.csv
└── 7_human_evaluation.csv
Open this folder in VS Code, then open the terminal.
Windows:
py -m venv .venv
.venv\Scripts\activateMac/Linux:
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtOpen:
backend/config.py
Replace:
GEMINI_API_KEY = "PASTE_YOUR_GEMINI_API_KEY_HERE"with your real key.
Do not upload your real key to GitHub.
py -m streamlit run app.pyIf py does not work, use:
python -m streamlit run app.pyAfter adding your Gemini API key, run:
py -m backend.evaluation_generatorThis generates:
data/6_model_responses.csvdata/7_human_evaluation.csvtemplate
Then manually score file 7 using 1–5 scores:
- relevance_score
- helpfulness_score
- faithfulness_score
- safety_score
- clarity_score
- unsafe_flag
- comments
4_ideal_answers.csv is only for benchmark questions from 3_benchmark_questions.csv.
It is used as the reference while manually evaluating S0, S1, and S2.
For unknown live chatbot questions, there is no ideal answer. The app simply gives S0/S1/S2 outputs depending on the selected mode.
- Optional Compare Mode showing S0, S1, and S2 side-by-side
- Source-linked citations for RAG answers
- Risk badge for L0–L5 labels
- Safety-aware S2 response
- Crisis support handling for L3
- Peer Style toggle
- Dataset summary preview
- Evaluation generator script