File size: 1,928 Bytes
39b7117
83bf9a2
1c1151d
83bf9a2
 
9f788c1
1c1151d
83bf9a2
6aa99b6
1c1151d
 
 
 
 
83bf9a2
6aa99b6
 
 
39b7117
 
1c1151d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83bf9a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: loopbreakers
emoji: 🧠
colorFrom: purple
colorTo: purple
sdk: docker
pinned: true
tags:
  - flask
  - claude
  - math
  - education
  - tutoring
  - ai
  - deepsite
  - frontend
  - anthropic

---

# LoopBreakers – Reward-Hacking Resistant AI Math Tutor

LoopBreakers is an AI-powered web app designed to provide **clear, step-by-step math solutions** for Year 5–10 students. It features **reward-hacking resistance logic**, powered by **Anthropic's Claude-3**, and demonstrates how feedback-driven alignment strategies can improve answer quality in real-time.

## 🔍 What it does
- Solves K–12 math word problems via Claude-3 API
- Extracts and verifies final numeric answers
- Automatically retries with improved prompting if initial output is unclear or wrong
- Displays detailed, alignment-aware explanations for educational transparency

## 🛠️ Technologies
- Claude-3 Opus API (`claude-3-opus-20240229`)
- Python + Gradio frontend
- Hosted on Hugging Face Spaces
- UI generated with [DeepSite](https://enzostvs-deepsite.hf.space/)

## ✅ Why it matters
Unlike traditional LLM math apps, **LoopBreakers is built to avoid shortcut exploitation**. The retry logic allows users to see **how aligned prompting improves reasoning**, highlighting real-time effects of AI reward optimization in education.

## 📥 Usage
1. Type any math word problem into the input box.
2. Click **"Get Solution"**.
3. View the **step-by-step explanation** and the **final answer**.
4. If the answer was incorrect, the AI will **automatically retry with better alignment logic.**

> Example:  
> _"Maya has 5 boxes. Each box contains 3 red balls and 2 blue balls. She gives 2 boxes to her friend. How many red balls does Maya have left?"_

---

**Made with 💡 using Claude + DeepSite by the LoopBreakers capstone team.**

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference