> Full-stack web application that leverages **GPT-4** to help Polish citizens resolve legal disputes through mediation instead of costly court proceedings. Built in **48 hours** at a legal-tech hackathon.
Navigating the Polish legal system is complex and expensive. **ARAI** simplifies the process by allowing users to describe their dispute in plain language, then automatically:
1.**Classifies the case** into 20+ legal categories (civil, labour, commercial, IP, family, etc.) using GPT-4
2.**Estimates court costs and duration** based on real statistical data from Polish district and regional courts
3.**Recommends and ranks mediators** best suited for the case using a custom AI scoring algorithm
4.**Enables direct contact** with chosen mediators through the platform
The goal is to reduce the burden on courts by directing eligible disputes toward mediation — a faster, cheaper, and less adversarial resolution path.
---
## Key Features
| Feature | Description |
|---|---|
| **Natural Language Case Input** | Users describe their legal problem in free-form Polish text — no legal knowledge required |
| **AI Case Categorization** | GPT-4 classifies the dispute across 20+ legal domains (IP, labour, family, real estate, etc.) |
| **Court Cost Estimation** | Calculates expected court fees, attorney costs, and expert witness expenses using official Polish fee schedules |
| **Trial Duration Prediction** | Estimates case length in months using real court statistics (district vs. regional courts) |
| **Mediator Matching** | Ranks mediators by specialization overlap, AI compatibility score, user ratings, and price |
The Angular frontend presents a form where the user provides:
- **Case description** in plain Polish (e.g., *"pracodawca nie wypłacił mi wynagrodzenia za ostatnie 2 miesiące i mnie zwolnił"*)
- **Dispute value** (PLN) — used to calculate court fees
- **Location** — for mediator proximity matching
- **Toggles** — whether expert witnesses or regular witnesses are involved
### 2. AI Categorizes the Dispute
The backend sends the case description to GPT-4, which classifies it across **20+ legal categories**:
> Copyright & IP, Banking, Child Custody, Inheritance, Property Division, Civil Contracts, Employment, Business, Tenancy, Real Estate, Personal Rights, Civil Law, Labour Law, Commercial Law, Health & Safety, Debt Collection, Damages, Consumer Protection, Mobbing, Traffic Accidents, and more.
Each category receives a binary relevance score (0 or 1), forming a **category vector** for the case.
### 3. Court Cost Estimation
Using official Polish fee schedules and real court statistics, the system calculates:
- **Court filing fees** — based on dispute value brackets (30 PLN – 20,000 PLN)
- **Attorney fees** — statutory rates based on dispute value
- **Expert witness costs** — average expert fee (~1,789 PLN) if applicable
- **Expected duration** — average case length in months from court statistical data
### 4. Mediator Ranking
Each mediator in the database has a profile with:
- Legal specializations (matching the 20+ category vector)
- Location and availability (in-person / online)
- User ratings and number of opinions
- Price per session
The scoring engine computes a **composite score** by comparing the case's category vector against each mediator's expertise vector, weighted by AI confidence and user ratings. The top matches are returned as ranked recommendations.
### 5. Results & Contact
The user sees the estimated cost/duration and a ranked list of mediator cards. Each card shows the mediator's specialization, rating, price, and location. A **"Schedule Appointment"** button opens a contact dialog.