Measuring AI ROI: The Metrics That Actually Matter
CEOs and CFOs want numbers. Here is how to build a measurement framework that honestly captures the value of your AI investment.
How we built a RAG-powered document intelligence system that reduced research time by 70% for a 40-attorney firm in Lagos.
A full-service commercial law firm in Victoria Island, Lagos — 40 attorneys, specialising in corporate transactions, infrastructure finance, and regulatory compliance. The firm handles a mix of Nigerian law matters and cross-border transactions governed by English law.
We are not naming the firm at their request, but the results in this case study are accurate.
Legal research is time-intensive and expensive. Associates at Nigerian law firms routinely spend 3–6 hours researching the precedents and regulations relevant to a single transaction opinion. Much of this research involves searching through:
The internal precedent files were the biggest pain point. They lived in a shared drive organised loosely by transaction type, with inconsistent naming conventions accumulated over 15 years. Experienced partners knew where to look. Junior associates did not.
We built a document intelligence system using a hybrid retrieval architecture — combining vector similarity search (for semantic relevance) with BM25 keyword search (for precise legal terminology). This hybrid approach outperforms either method alone on legal content, where both conceptual similarity and exact term matching matter.
We ingested approximately 12,000 documents from the precedent library and regulatory archive. The processing pipeline:
Chunking at clause boundaries was one of the most important decisions. Legal documents derive meaning from clause structure. A chunk that cuts across clause boundaries creates context-free fragments that retrieve poorly and confuse the model when used as context.
We built a chat interface where attorneys can ask questions in natural language — "what are typical representations and warranties in an LNG offtake agreement under Nigerian law?" — and receive an answer grounded in the firm's own precedents, with citations to the specific documents and clauses retrieved.
Every answer includes the sources used. Attorneys can click through to the original document. Trust in the system depends entirely on this transparency — if the answer is wrong, the attorney needs to know where the wrong information came from.
Not all documents are accessible to all staff. Partner memos and client-confidential opinions are restricted. We implemented role-based access controls at the retrieval layer, so the vector search query only scans documents the user is permitted to see. This was a non-negotiable requirement before the system could go live.
After a 60-day pilot with 12 associates:
The quality of the document collection matters more than the model. We ran the same queries against GPT-4o and Claude Sonnet and found minimal difference in answer quality. The dominant factor was retrieval quality — whether the right chunks made it into the context window.
Domain vocabulary is an unsolved problem in standard embeddings. Nigerian legal terminology (CAMA 2020 provisions, CBN prudential guidelines, specific regulatory frameworks) is underrepresented in general-purpose embedding models. We fine-tuned a custom embedding model on a corpus of Nigerian legal text to improve retrieval precision by about 18% on domain-specific queries.
Change management takes longer than the build. We spent roughly equal time on technical implementation and on embedding the system in attorney workflows. The partners who championed the tool internally were more important to adoption than any feature we built.
The firm is now expanding the system to include real-time monitoring of CBN and SEC regulatory circulars, with automatic summarisation of new circulars and relevance tagging against the firm's active practice areas. The groundwork for this was laid in the initial architecture — adding new document sources to an existing retrieval system is incremental work once the pipeline is running.