LLM — Domain-Trained Legal AI
The reason XS Lawyer exists. Off-the-shelf chatbots hallucinate on the Egyptian Civil Code or Personal Status Law — we built an NLP pipeline trained on the Egyptian Constitution, Civil Code, Commercial Law, Evidence Law and case precedents, so every answer comes back grounded, in Arabic or English, with a "Legal Sources" (المصادر القانونية) list citing the exact articles it relied on. A document-analysis layer turns uploaded contracts and PDFs into plain-language explanations, and every message and upload is metered against the user's plan.
Every section, explained.
4 working sections inside LLM — Domain-Trained Legal AI — each one a screen we designed, built and tested in the live system.
Domain-Trained Legal Chat (EN / AR)
The conversational core. A user asks for an "Expert Opinion" and the model answers in fluent Arabic grounded in Egyptian law — here citing Article 102 and 107 of the Evidence Law and Article 231 of the Civil Code — then closes every answer with a "Legal Sources" list so the citation is always visible.
- Trained on the Egyptian legal corpus, not a generic model
- Answers in fluent Arabic or English
- Closes each answer with a cited "Legal Sources" list
- Threaded history with named conversations
Citation-Grounded Contract Review
Ask it to review a property lease and it explains what to check and why — grounding the answer in Article 12 of the State Council Law and pointing to the advisory body that vets such contracts — so guidance is anchored to a statute, never free-floating.
- Reviews leases, agreements and clauses on request
- Every point anchored to a specific statute / article
- Flags what to verify before signing
- Offers to go deeper on any clause
Document Analysis — Contracts & PDFs
Users drop documents straight into the chat. The uploader accepts images and documents up to 10 MB — PDF, DOC, DOCX, TXT, CSV, XLS, XLSX — meters each upload against the plan's file quota, and feeds the content to the model for clause-level analysis.
- Upload images + PDF / DOC / DOCX / TXT / CSV / XLS / XLSX
- Up to 10 MB per file, multiple files per chat
- Per-plan file quota enforced at upload
- Content fed to the model for clause analysis
Credit & Usage Metering
Every plan carries an allowance, surfaced live beside the chat — here a Basic Monthly plan showing 14 of 25 credits used and 0 of 10 files, with 11 credits, 10 files and 26 days left — so a user always knows where they stand, with a subscribe / upgrade gate when an allowance runs out.
- Live credits-used and files-uploaded meters
- Per-message credit decrement, per-upload file count
- Credits / files / days-left tiles with one-tap refresh
- Subscribe-to-continue gate when an allowance runs out
Jump to another chapter
Need a llm — domain-trained legal ai like this?
If your product is a model wrapped in a Notion doc, that's exactly the gap we close — billing, admin, multilingual, security, and all. Let's talk.