← All posts

How I'd Build a Chatbot for a Law Firm

7 min read

A practical walkthrough of building an AI chatbot for a UK law firm: intake triage, document retrieval, and the compliance guardrails that actually matter.

Law firm chatbot system managing compliant intake triage, SRA rules, GDPR, and human escalation.

I get asked about law firm chatbots more than almost any other project. Solicitors see the potential immediately: clients asking the same 30 questions, admin staff spending hours routing enquiries, intake forms that never capture enough detail. The problem is obvious. The implementation is where firms get stuck.

Here is exactly how I would build one, from the first conversation to production deployment.

Why law firms are a good fit for AI chatbots

Law firms have a few properties that make them ideal for chatbot automation. Their client enquiries are repetitive and predictable. A conveyancing firm fields the same questions about timelines, costs, and document requirements hundreds of times a month. Employment law firms get the same "can my employer do this?" pattern over and over.

The other factor is cost. A junior solicitor's time in the UK runs £150-£250 per hour. If a chatbot handles even 20 initial enquiries per week that would have taken 15 minutes each, that is 5 hours of billable time freed up. At £200/hour, that is £1,000/week or roughly £50,000/year. The maths works quickly.

What the chatbot actually does (and does not do)

This is the critical design decision. The chatbot does not give legal advice. Full stop. The Solicitors Regulation Authority is clear on this, and no amount of clever prompt engineering changes the regulatory reality.

What it does instead:

  • Intake triage: Collects the client's situation, categorises by practice area, and routes to the right solicitor with a structured summary.
  • FAQ handling: Answers questions about the firm's process, pricing structure, timelines, and what documents the client needs to prepare.
  • Document retrieval: Pulls relevant template documents, guidance notes, and checklists from the firm's knowledge base.
  • Appointment booking: Integrates with the firm's calendar for initial consultations.

Every response includes a clear disclaimer: "This is general information, not legal advice. For advice specific to your situation, speak with one of our solicitors."

How the architecture works

The system has three layers, and getting the middle one right is the whole game.

Layer 1: The conversation interface

A simple chat widget embedded on the firm's website. Nothing fancy. I use a lightweight React component that connects via WebSocket to the backend. The widget handles message rendering, typing indicators, and the disclaimer banner.

The interface needs to work on mobile (over 60% of initial client enquiries come from phones), handle file uploads (clients often want to share documents during intake), and degrade gracefully when the backend is slow.

Layer 2: The retrieval engine

This is where 70% of the engineering effort goes. The language model is the easy part. Getting it the right context is the hard part.

I build a retrieval-augmented generation (RAG) pipeline:

  1. Index the firm's knowledge base. Practice area guides, fee schedules, template letters, FAQs, and procedure documents. Each document gets chunked into 500-token segments with metadata tags (practice area, document type, date).
  2. Embed and store. Each chunk gets converted to a vector embedding using a model like text-embedding-3-small and stored in a vector database (I typically use Qdrant or pgvector depending on scale).
  3. Query and retrieve. When a client asks a question, the system embeds the query, finds the 5-8 most relevant chunks, and passes them as context to the language model.
  4. Generate and cite. The model answers using only the retrieved context. Every claim in the response includes a reference to the source document so a solicitor can verify it later.

The retrieval quality determines everything. If the system retrieves the wrong chunks, the model will confidently give wrong answers. I spend more time on chunking strategy, metadata tagging, and retrieval testing than on any other part of the build.

Layer 3: The compliance and routing layer

This layer handles the rules that make law firm chatbots different from generic customer support bots:

  • Topic boundaries. The system refuses to answer questions outside the firm's practice areas. An employment law firm's bot should not attempt to answer conveyancing questions.
  • Escalation triggers. Certain keywords and patterns (mentions of court dates, urgent deadlines, emotional distress, children's welfare) trigger immediate routing to a human.
  • Audit logging. Every conversation is logged with timestamps, retrieved documents, and model responses. This is essential for SRA compliance and professional indemnity insurance requirements.
  • Data handling. Client data is processed under GDPR. The chatbot's privacy notice explains what data is collected, how it is stored, who can access it, and how long it is retained. Nothing leaves the UK unless the firm specifically consents to it.

What does it cost to build?

For a production-ready law firm chatbot with proper compliance guardrails:

| Component | Cost range | Notes | |-----------|-----------|-------| | Knowledge base indexing | £1,500-£3,000 | Depends on document volume | | RAG pipeline + API | £3,000-£5,000 | Core retrieval and generation | | Chat widget + UX | £1,000-£2,000 | Mobile-responsive, accessible | | Compliance layer | £2,000-£4,000 | Audit logs, escalation, boundaries | | Testing + deployment | £500-£1,000 | Load testing, edge cases, monitoring | | Total | £8,000-£15,000 | 4-6 week delivery |

Running costs sit around £200-£500/month depending on conversation volume, mostly API calls to the language model and vector database hosting.

How long does the build take?

A realistic timeline for a mid-size UK law firm:

  • Week 1: Discovery. Audit existing FAQs, document the intake process, map practice areas and routing rules.
  • Week 2-3: Build the RAG pipeline. Index documents, tune chunking and retrieval, test accuracy against real client questions.
  • Week 4: Build the conversation interface and compliance layer. Wire up escalation rules, audit logging, and the appointment booking integration.
  • Week 5: Internal testing with solicitors. They review responses for accuracy, tone, and compliance. This step always catches things.
  • Week 6: Soft launch with real clients. Monitor conversations, tune retrieval, and fix edge cases.

The compliance review with solicitors in week 5 is non-negotiable. I have seen firms skip this and end up with a chatbot that misrepresents their fee structure or gives outdated procedural information.

What can go wrong?

Three things I watch for on every law firm chatbot project:

Bad document quality. If the firm's internal guides are outdated or contradictory, the chatbot will inherit those problems. I always audit the knowledge base before indexing and flag documents that need updating.

Over-ambitious scope. Some firms want the chatbot to handle everything from intake to case updates. Start with intake triage and FAQs. Prove the value, then expand. A chatbot that does two things well beats one that does ten things badly.

Ignoring the human handoff. The chatbot needs a clear, graceful path to a real person. If a client is frustrated or confused, the worst thing is to loop them through more automated responses. Every conversation should be at most two messages away from a human.

Key Takeaways

  • Law firm chatbots handle intake and FAQs, not legal advice. The SRA distinction shapes the entire build.
  • Invest 70% of the budget in the retrieval pipeline. The language model is the easy part.
  • Compliance (audit logs, topic boundaries, data handling) adds cost but protects the firm.
  • Start with intake triage. Prove the value before expanding scope.
  • Budget £8,000-£15,000 for a production system with a 4-6 week delivery timeline.

If you run a law firm and you are fielding the same client questions every week, this is the kind of project where AI pays for itself within months. Get in touch and I will walk you through what it would look like for your practice.