Inspiration
Every business faces legal questions daily. An employee complaint lands in your HR queue. A customer dispute needs resolution. A compliance question blocks a project.
Your team creates a Jira ticket... then what? Google returns blog posts, not legislation. ChatGPT confidently cites laws that don't exist. Lawyers cost $300/hour and take days to respond.
We built Lexis because legal questions shouldn't require a law degree to answer.
What it does
Lexis Legal Intelligence brings New Zealand legislation directly into Atlassian:
🔍 Jira Issue Panel - Open any issue and instantly see relevant legislation sections. Employment dispute? Here's the Employment Relations Act sections that apply.
✅ Grounded Citations - Every claim cites a real section number. Click any citation to open the official legislation.govt.nz page. No hallucinations.
💬 Legal Chat - Click "Continue in Chat" for deeper analysis. Ask follow-up questions, get cited answers.
📄 Confluence Macro - Embed legal research in documentation with the /lexis macro.
How we built it
Backend Architecture:
- Flask API hosted on Railway
- Genesis holographic semantic search (sub-3 second retrieval)
- Structured extraction with GPT-4o-mini for grounded responses
- Domain discovery algorithm (detects legal domain from search results, not prediction)
Corpus:
- 4000 NZ legislation sections
- 19 legal domains (employment, consumer, tenancy, privacy, corporate, tax, and more)
- Every section linked to official legislation.govt.nz URL
Frontend:
- Forge UI Kit 2 with @forge/react
- DynamicTable for sortable citations
- ADF renderer for structured legal text
Key Innovation - Grounded AI: Unlike ChatGPT which generates plausible-sounding law, Lexis uses a two-stage approach:
- Retrieve real legislation using semantic search
- Extract facts as structured JSON (the AI copies, it doesn't create)
- Render with mandatory citations (code, not AI)
Result: 95%+ grounded responses where every claim traces to source.
Challenges we faced
Challenge 1: Relevance Early versions returned irrelevant legislation (H&S sections for employment queries). We solved this by implementing "domain discovery" - analyze search results to find the dominant legal domain, then filter.
Challenge 2: Speed Legal briefs took 40+ seconds. We optimized to sub-3 second search with async extraction, making it usable in real workflows.
Challenge 3: Grounding Preventing AI hallucination in legal context is critical. We switched from "write a brief" (freeform) to "extract facts as JSON" (constrained), dramatically improving accuracy.
What we learned
- Discovery beats prediction - Let results tell you the domain, don't guess beforehand
- Structured extraction > freeform generation - Constrain the AI to copy, not create
- Citations build trust - One verifiable link is worth more than paragraphs of explanation
What's next
- 🇦🇺 Australian legislation corpus
- ⚖️ Case law integration
- 🏢 Enterprise features for legal teams
- 🔄 Jira Automation triggers for compliance workflows ```
Log in or sign up for Devpost to join the conversation.