Inspiration
Millions of migrant workers in the Gulf sign employment contracts in English or Arabic that they cannot fully read. Important clauses about passport retention, wage deductions, unpaid overtime and recruitment fees often go unnoticed until it is too late. Living in the UAE, I see how many people depend on these documents for their livelihood. I wanted to build a tool that gives workers clear information about their rights, in their own language, before they sign.
What it does
Hakk (حق, "your right") is an AI contract reader for migrant workers.
- The worker pastes their contract and chooses a language.
- Hakk explains the contract in simple words.
- It flags clauses that may be risky, showing the exact clause quoted from the contract and the related labour rule with its official source.
- It lists questions to ask the employer before signing and points to the official complaint channel.
Hakk provides information about rights, not legal advice.
How I built it
- Model: NVIDIA Nemotron, served through Nebius Token Factory.
- Rules: a curated list of labour rules taken from official sources, each with a source link.
- Evidence check: the model must return JSON containing a verbatim clause quote and a rule ID. The code then verifies that the quote exists in the contract and that the rule exists in the list. Any flag that fails this check is discarded.
- Safe wording: when the model is unsure, it phrases the issue as a question to ask the employer, not as an accusation.
- Interface: a Streamlit web app. The code is open source under the MIT license.
Challenges I faced
- Preventing invented claims. Language models can sound confident while citing text that is not there. Enforcing the quote check in code, not only in the prompt, solved this.
- Balancing caution and usefulness. Flagging too much frightens users and flagging too little misses real problems. I used confidence levels and question-style wording for uncertain cases.
- Simple language across languages. Legal text is hard to explain in plain words, so I tuned the prompt to use short, everyday vocabulary.
- Limited time. I built this within the hackathon deadline, so I focused on a reliable text-based version first.
What I learned
- Requiring verifiable evidence makes an AI tool far more trustworthy than asking it to "be accurate."
- For sensitive topics, how the tool phrases uncertainty matters as much as what it detects.
- Testing on sample contracts with planted bad clauses and clean contracts shows both what the tool catches and whether it raises false alarms. [On my [N] sample contracts, Hakk caught [X] of [Y] planted risky clauses and flagged [Z] clean ones.]
What's next
- Photo upload for contracts using a vision model
- More languages and dialects
- Rules for more Gulf countries, reviewed by labour-rights organisations
Log in or sign up for Devpost to join the conversation.