💡 Inspiration
Every year, thousands of consumers in Singapore are cheated — defective goods, withheld security deposits, broken service contracts. Most victims never seek redress, not because they lack a case, but because the legal process feels impossibly complex and expensive.
We asked: What if AI could be the great equaliser?
The Singapore Small Claims Tribunals (SCT) was designed exactly for this — a low-cost, lawyer-free court for everyday people. But navigating it still requires knowing the right laws, drafting a formal Letter of Demand, filling out CJTS e-filing forms, and preparing a hearing script. That's four separate legal tasks most people have never done before.
LexGuard was born to do all four, automatically.
🔨 How We Built It
LexGuard is a multi-stage AI legal pipeline built on a local-first architecture:
- Perception Layer — A vision-language model (
Qwen3-VL) performs OCR on uploaded receipts, contracts, and screenshots, extracting structured facts: merchant name, UEN, GST, amounts, and transaction dates. - Rules Engine — A deterministic jurisdiction module enforces Singapore SCT hard limits:
- Monetary cap: $20,000 (or $30,000 with Memorandum of Consent)
- Statute of limitations: 1 year from the Date of Cause of Action
- Non-SCT routes: TADM (employment), CDRT (community disputes)
- Legal Brain — An LLM (
gpt-5.4) drafts a Singapore-compliant Letter of Demand (LOD) following the Lions Chambers LOD standard, with dynamic date calculation:
$$\text{Deadline} = T_{\text{today}} + 14 \text{ days}$$
- Document Assembly —
python-docxauto-populates the official SCT Form 101 (Evidence Checklist & Witness Statement) with case-specific data. - CJTS Filing Sheet — A structured copy-paste cheat sheet that maps case facts to the exact fields in the CJTS web portal, including Date of Transaction and Date of Cause of Action as separate fields.
- Hearing Coach — The AI generates a 2-minute opening statement, anticipated defence rebuttals, evidence presentation script, and a day-of checklist.
📚 What We Learned
- Singapore SCT is stricter than we thought. The statute of limitations is 1 year, not 2 — a critical correction that protects users from filing time-barred claims.
- LLMs hallucinate legal citations. Without explicit prompt guardrails, the model would invent plausible-sounding but wrong statutes (e.g., citing the Conveyancing and Law of Property Act for a rental deposit dispute). We solved this by injecting case-type-aware citation rules directly into the prompt.
- E-filing cheat sheets beat form automation. Singapore's CJTS portal is a dynamic Angular SPA that resists programmatic form-filling. A structured human-readable cheat sheet is more reliable and maintainable than brittle browser automation.
⚔️ Challenges
Legal accuracy vs. LLM creativity Balancing the model's tendency to over-engineer legal arguments with the need for concise, factually grounded SCT filings required multiple rounds of prompt engineering and constraint injection.
Built With
- gpt-5.4
- guidance-only)-package-management-uv-?-python-dependency-and-virtual-environment-management-version-control-git-+-github-apis-ollama-rest-api-(/api/chat
- ollama
- python
- qwen3-vl
Log in or sign up for Devpost to join the conversation.