VeraCivic
An AI civic assistant for Nigerians that answers questions about your rights, grounded in real law, with sources you can open yourself.

For most people, the law is unreadable. Knowing your rights in Nigeria means either wading through statutes written for lawyers or trusting a stranger online who might be wrong. VeraCivic answers a plain-language question, like "can the police search my phone?" with a grounded answer drawn from the actual Constitution and Acts and a citation you can open and check yourself.
It's built as a LangGraph ReAct agent with six retrieval tools over a Qdrant vector store: an authoritative law corpus (Constitution and Acts) alongside a rolling news index refreshed every 15 minutes. The model's own memory is never treated as a source; every claim is grounded in retrieved evidence. Before an answer reaches a user it passes a faithfulness gate (claim extraction plus verification, with a ≥0.7 grounded-score threshold), backed by eval suites covering in-scope civic questions, out-of-corpus negatives, and adversarial red-team prompts, plus prompt-injection hardening that fences all untrusted web and news content as data.
The design has a spine: the safety and danger path, covering emergencies, abuse, and life-safety resources, is always free, unmetered, and never behind a login. I built and shipped the whole thing solo, with a freemium model in flight.
highlights
- LangGraph ReAct agent with 6 retrieval tools over a Qdrant vector store (FastEmbed/BGE embeddings); multi-provider by design, with Gemini 2.5 as default and Anthropic Claude swappable via config.
- Citation-grounded answer generation behind a faithfulness eval harness (claim extraction plus verification, ≥0.7 grounded-score gate); the model's memory is never a source.
- Prompt-injection hardening that fences all untrusted web and news content as data, with eval suites for in-scope questions, out-of-corpus negatives, and adversarial red-team prompts.
- Safety and danger path always free, unmetered, and never behind login; freemium billing (Paystack) in flight.
The problem
Most Nigerians can't easily find out what the law actually says about their own lives. The primary sources exist, but they're written for lawyers; the accessible sources are strangers online who are often confidently wrong. The gap isn't information, it's trustworthy, readable, grounded answers. VeraCivic exists to close that gap: ask a plain question, get an answer you can trace back to the statute it came from.
The approach
VeraCivic is a retrieval-first system, not a chatbot with opinions. At its core is a LangGraph ReAct agent with six retrieval tools sitting over a Qdrant vector store. The store holds two very different kinds of knowledge, deliberately kept separate:
- an authoritative, slow-changing law corpus (the Constitution and Acts) that can be cited as fact
- a fast-moving news index, refreshed every 15 minutes, that is always attributed and never treated as settled law
Choosing the right source for each kind of question, authority versus freshness, is a design rule the routing and retrieval are held to, not an afterthought.
Grounding and trust
The hard part of a system like this is not generating text, it's refusing to make things up. Every factual claim is grounded in retrieved evidence, and the model's own memory is never allowed to be a source.
Before an answer reaches a user it passes a faithfulness gate:
- the answer is broken into atomic claims
- each claim is verified against the retrieved evidence
- the answer only ships if it clears a
≥ 0.7grounded-score threshold
That gate is backed by substantial eval suites:
- in-scope civic questions
- out-of-corpus negatives (questions it should decline)
- adversarial red-team prompts
so quality regressions surface as failing checks instead of reaching users. Because the system reads live web and news content, it treats all of that untrusted text as data, never as instructions, which fences off prompt-injection attempts hidden in the sources.
Safety as architecture
VeraCivic dispenses information to vulnerable people, so safety isn't a feature bolted on top, it's encoded in the product. The safety and danger path, covering emergencies, abuse, and life-safety resources, is always free, unmetered, and never behind a login. Verified helplines and emergency resources are only ever surfaced when confirmed, never guessed.
Shipping it solo
I designed and built the whole platform end to end, roughly 11k lines of code across three services:
- a Python agent on
FastAPIandGunicorn - a retrieval and ingestion API with
QdrantonDocker - a web app on
Next.js
It's deployed through GitHub Actions CI/CD across staging and production, and it's multi-provider by design: Gemini 2.5 as the default with Anthropic Claude swappable via config. A freemium model (Paystack) is in flight, with a genuinely generous free tier and a paid tier that deepens rather than gates access.
What it demonstrates
VeraCivic is the clearest example of how I work: I think in systems, how they integrate, how they fail, and how they get reused, and I ship fast, putting working software in front of real users. It brings together production LLM integration, RAG, agent evaluation, prompt-injection defence, and full-stack delivery in a single product that has to be correct because people rely on it.
Live at veracivic.com.