Legisly
The world's first AI-powered platform for legislative drafting, enabling legislators, policymakers, and researchers to craft laws, acts, and bills with unprecedented precision and speed.
Business Overview
Legisly, based in London, set out to build the world's first AI-powered platform for legislative drafting. The idea: give legislators, policymakers, and researchers a tool that helps them craft laws, acts, and bills with precision and speed, instead of spending most of their time on manual research.
By leveraging LLMs and RAG technologies, the platform streamlines both research and drafting. Xpiderz built the data and AI foundation underneath it in a 16-week end-to-end engagement.
Challenge
The raw material was 432,000 legal documents in whatever format history left them in: PDFs, DOCX, TXT, images, and Pages files, many of them scanned or non-digital. All of it had to become one unified, searchable legal knowledge base.
Legal writing raised the bar further. The platform had to hold the formal tone and strict structures that legal drafting demands, and every AI-generated suggestion needed a verifiable reference behind it. In legislation, an uncited claim is a liability, so legal integrity was a hard requirement, not a nice-to-have.
Solution
We built the data foundation end to end. Custom extraction and OCR pipelines turned all 432,000+ documents into clean, searchable text with automatic format detection, a cleaning stage normalized the data and removed inconsistencies, and a dataset generation stage structured it into instruction-response pairs ready for supervised fine-tuning.
On top of that data, we fine-tuned multiple models on custom legal datasets via Huggingface and AWS SageMaker. vLLM serves the fine-tuned models concurrently, Lambda orchestration scales the system elastically under demand, and Django, MySQL, MongoDB, and S3 complete the stack.
The build came down to six pipelines:
-
Text Extraction & OCR Pipeline
Processed 432,000+ documents across PDFs, DOCX, TXT, images, and Pages files, handling non-digital and scanned files for comprehensive full-text retrieval with automatic format detection.
-
Data Cleaning Pipeline
Normalized and cleaned extracted data, removing inconsistencies to produce LLM-ready datasets at scale.
-
Dataset Generation Pipeline
Structured cleaned data into instruction-response pairs for supervised fine-tuning of legal LLMs.
-
LLM Fine-Tuning on Custom Legal Datasets
Multiple models fine-tuned via Huggingface and AWS SageMaker, with vLLM serving for concurrent multi-model inference and elastic scaling through Lambda orchestration.
-
Prompt Engineering Pipeline
Sophisticated prompting for bill drafting, amendments, summarization, and precedent retrieval with jurisdiction awareness.
-
Result Verification & References
Cross-verified outputs with source documents for legal accuracy, with automated reference extraction for traceability.
Multi-LLM Serving
Rather than betting everything on one model, Legisly runs several fine-tuned models side by side. vLLM serves them concurrently on AWS SageMaker, and Lambda orchestration adds capacity elastically when demand spikes, so the platform scales without anyone babysitting it.
The verification layer sits on top of all of it. Every output is cross-checked against source documents, and automated reference extraction attaches the citations that make each suggestion traceable back to real law.
Measured Results
The numbers speak
Legisly runs at production scale, with 432K legal documents behind every answer it gives legislators.
Outcome
Legisly gives legislators and legal professionals a transformative tool:
- 65% less research and drafting time. AI-powered research, precedent retrieval, and draft generation cut manual research time by more than half.
- 100% verifiable sources. Every suggestion carries cited, cross-verified references, keeping precision, speed, and trustworthiness in the same product.
- A new standard. The world's first AI platform purpose-built for legislative drafting, proving that AI can responsibly augment the most consequential forms of writing.
Next Steps
The architecture was built to keep growing. The serving layer already runs multiple fine-tuned models concurrently and scales elastically under demand, and the prompt layer is jurisdiction-aware. Extending the platform to new document sets and new legislative contexts builds on foundations that are already in place.
Xpiderz played a key role in building Legisly's legal AI platform. Their team delivered powerful data pipelines, accurate OCR, and custom LLM fine-tuning with impressive speed and precision.
Founder, Chairperson & CEO
Legisly

















