Ground the model
We built a retrieval-augmented (RAG) pipeline over the legal corpus so the model answers from retrieved law, not from memory — the difference between a useful tool and a liability.
An AI assistant that turns plain-language questions into clear, sourced legal guidance — built on a retrieval pipeline so answers stay anchored to actual statutes, not model hallucinations.

Legal help in Pakistan is expensive, slow, and intimidating for ordinary people. Most never speak to a lawyer until a problem has already become a crisis, and generic chatbots are worse than useless on law — they invent confident-sounding answers with no basis in statute.
The goal was a public-facing assistant people could actually trust: conversational enough for a non-lawyer, but anchored to the real legal corpus so every answer could be traced back to a source.
We built a retrieval-augmented (RAG) pipeline over the legal corpus so the model answers from retrieved law, not from memory — the difference between a useful tool and a liability.
Heavy prompt engineering and guardrails keep responses scoped, cite their basis, and decline gracefully when a question needs a human lawyer.
A fast Next.js front end made the assistant accessible to anyone with a browser — no app install, no signup wall between a person and a first answer.
Every line below is built and running — the features that make Lexa a real product, not a prototype.
Chosen for the job, not the résumé. The stack that Lexa actually runs on.
Lexa is live at lexa.lawyer as Pakistan's first AI legal chatbot — putting first-pass legal guidance in front of anyone with a browser, grounded in real law rather than guesswork.
A 30-minute call with the founder — no slide decks, no sales reps, just an engineer thinking through your problem with you.