Case Studies / WhatsApp AI Legal Assistant with RAG and...

WhatsApp AI Legal Assistant with RAG and Voice Notes

How we built a WhatsApp-based AI assistant for a public-interest law firm — document ingestion, indexing and knowledge building, retrieval-augmented answers with legal guardrails, and support for voice notes.

At a glance

ClientA law firm with an NGO-oriented, public-interest practice (name withheld)
ChannelWhatsApp — text messages and voice notes
What we builtAn AI assistant that answers questions from the firm’s own knowledge, using retrieval-augmented generation (RAG)
Key componentsDocument ingestion, indexing, knowledge building, retrieval and answer generation, guardrails, WhatsApp delivery, voice-note handling
ServicesAgentic AI, AI automation, custom software development

The challenge

The firm wanted people to get reliable, consistent answers to common legal questions on the channel they already use every day — WhatsApp — without its lawyers answering the same questions again and again.

Because the firm serves a public-interest and NGO audience, the assistant had to be easy to reach, work for people who prefer speaking to typing, and stay strictly within what the firm is comfortable communicating. A general-purpose chatbot that improvises answers was not acceptable: every response needed to be grounded in the firm’s own material.

What we built

We designed and delivered a retrieval-augmented generation (RAG) assistant, accessed entirely through WhatsApp.

1. Ingestion

A pipeline that takes in the firm’s documents and reference material, extracts the text and splits it into well-structured passages ready for search.

2. Indexing

Each passage is converted into a searchable representation and stored in an index, so the assistant can find the most relevant material for any question in moments — by meaning, not just matching keywords.

3. Knowledge building

Beyond raw documents, we worked with the firm to shape a curated knowledge base: organising topics, filling gaps found while testing real questions, and structuring the content so answers come out clear and complete.

4. Retrieval-augmented answers

When a question arrives, the system retrieves the most relevant passages and the language model writes an answer based on that material — rather than on general knowledge alone — which keeps responses accurate and consistent with the firm’s position.

5. Guardrails

Legal topics demand care. Guardrails keep the assistant within its intended scope, control how it responds when the knowledge base does not cover a question, and guide people towards the firm when a matter needs a lawyer’s attention rather than a general answer.

6. WhatsApp delivery, including voice notes

The assistant lives on WhatsApp, so there is no app to install or website to find. People can type their question or simply send a voice note; voice notes are transcribed and answered through the same retrieval and guardrail pipeline.

How a question flows through the system

  1. A person sends a WhatsApp message or voice note.
  2. Voice notes are converted to text.
  3. The question is matched against the indexed knowledge base.
  4. The most relevant passages are passed to the language model with the guardrail rules.
  5. The assistant replies on WhatsApp with an answer grounded in the firm’s material — or directs the person to the firm when the question is out of scope.

Why RAG instead of a plain chatbot?

Plain AI chatbotRAG assistant (what we built)
Source of answersThe model’s general trainingThe firm’s own documents and knowledge base
Accuracy and consistencyCan improvise or contradict the firmGrounded in approved material
Keeping it currentNeeds retrainingUpdate the documents and re-index
ControlLimitedGuardrails define scope and responses

What the firm now has

  • An always-available first point of contact on WhatsApp, reachable by text or voice.
  • Consistent answers drawn from the firm’s own material rather than improvised.
  • A knowledge base it can keep updating — new documents are ingested and indexed without rebuilding the assistant.
  • Clear boundaries, with guardrails that keep conversations within scope and route people to the firm when needed.
  • More time for lawyers to focus on matters that genuinely need them.

Building something similar?

We build AI assistants and agents that work from your own knowledge — on WhatsApp, your website or internal tools — with the guardrails regulated and sensitive sectors need. Explore our agentic AI services and AI automation services, or talk to us about your use case.