Skip to content
← cd ../work

Naija Law RAG

An assistant that answers questions on Nigerian law strictly from the official texts, cites every claim, and declines what the documents don't cover.

Naija Law RAG answering a Lagos tenancy notice question, with the cited passage from the Tenancy Law below the answer

Results

Citations verified against the source text
11/11
Out-of-scope questions correctly declined
5/5
Answerable questions answered correctly
8/9

cat problem.md

The problem

People ask legal questions online and get confident answers with no source. For law, a wrong answer that sounds right is worse than no answer. The assistant had to answer only from the official texts, show where each fact came from, and say "I don't know" when the texts don't cover the question.

What we built

An assistant over four Nigerian legal sources: the 1999 Constitution, the Nigeria Tax Administration Act 2025, the Lagos State Tenancy Law 2011, and a summary of current federal tax rates. The Acts were cleaned from official gazette PDFs so the assistant quotes the actual wording.

Every answer cites the exact passage it rests on. The citation is copied from the source by the system, not typed by the AI, so it cannot be made up. When no passage is a close enough match, the assistant declines before the AI is even called, which costs nothing and leaves no room to guess.

The one miss, and why it is the right one

The one answerable question it declined asks about the qualifications to be President. The Constitution states the same education requirement for four different offices, and the assistant declined rather than risk mixing them up. For law, being careful is the right default.

Reusable for any business

The same engine works for any set of documents: policies, product manuals, contracts, standard procedures. Swap the documents, rerun the tests, and it is ready.

cat project.json

industry:
Legal information
built:
July 2026
stack:
PythonFastAPIClaudeVoyage embeddingsBM25QdrantPostgres + pgvectorDockerRender

cat next-step.md

Want results like these?

Book a free 30-minute strategy call. You'll leave with at least one concrete idea, whether or not we work together.

Book a Free Strategy Call