AI agent · Legal

A legal assistant that cites the law, or says it doesn't know

Real-estate advisors needed fast answers on property law, without a lawyer on every call. We built an assistant that answers from retrieved law articles only, verifies each citation, and hands hard questions to a partner lawyer.

Book a free callBuilt for SAAFKA

Illustration
Legal assistant
AdvisorCan a co-owner block the sale of a shared property?
Retrieving from official texts
AssistantArticle cited · verified in sourceArticle cited · verified in source
Confidence gateAnswerHedgeEscalate

The situation

Advisors get legal questions every day: a co-ownership rule, a notary step, a tenant's right. A generic chatbot answers all of them with the same confidence, including the ones it makes up. In property law, one invented article is enough to lose a client.

What changed

Every answer is built from passages retrieved from official texts. A confidence gate decides between three outcomes: a definitive answer, a hedged one, or an escalation to a partner lawyer. The assistant never claims more certainty than its sources allow.

How it works

5 steps, end to end

  1. 01

    The advisor asks

    A question in plain words, from the advisor's own platform.

  2. 02

    Retrieve the law

    The relevant passages are pulled from a corpus built from official public texts.

  3. 03

    Draft from sources only

    The model writes the answer from the retrieved passages, citing the articles it used.

  4. 04

    Check every citation

    Code verifies that each cited article really exists in the retrieved text.

  5. 05

    Decide the outcome

    A confidence gate returns a definitive answer, a hedged one, or an escalation.

Where the AI stops

The model writes. The code decides.

The model

  • Reads the retrieved passages
  • Writes the answer in plain language
  • Judges how well the sources support it

The code

  • Checks each cited article against the retrieved text
  • Fuses judge, citation check and retrieval strength into one confidence
  • Caps confidence at 95, never 100
  • Routes the hard cases to a partner lawyer

By the numbers

Counts read in the code we shipped. No invented results.

3,337
passages in the retrieval corpus
2,700+
law articles kept word for word
3
outcomes: answer, hedge, escalate
95
maximum confidence, by design

Built with

  • Retrieval (dense + keyword, rank-fused)
  • Grounded judge
  • Citation checker
  • Stateless API
  • Multiple LLM providers

Built for

The client behind it

Real estateSaafkaA network of real-estate advisors: buy, sell, rent and appraise anywhere in Morocco.Read the client story

More use cases

All use cases

All use cases

Contact

let's talk about your project

  • Where we areMorocco, working worldwide
  • Writehello@kaishift.com
  • LanguagesFrench, Arabic, English
Prefer a call? Book 30 minutes

Write to usWe answer the same working day.