Medellín, Colombia · UTC−5 · Remote operation across Latin America and the United States hello@quarl.co EN · ES
quarl ES

AI for legal teams

The failure that sank the first lawyers to use AI was the invented citation. We build systems where every answer carries the document and clause it came from, and where a citation that does not resolve against a real document is never shown.

6–8 weeks to production · 3 years sustaining document retrieval in production · 48 hours to a proposal with fixed scope and price

  • Contract archive
  • Review against template
  • Obligation extraction
  • Due diligence
  • Verified citations
  • Zero invented citations
Contact us How we work Free, no pitch · the proposal lands in 48 hours

Built on

  • Anthropic
  • Claude
  • Google Gemini
  • Google Cloud
  • LangChain
  • LangGraph
  • PostgreSQL
  • Qdrant
  • Datadog

An engineering team that has already been on the other side.

Ninety seconds: who we are, how we work and what you get at the end.

From your company’s documents to a system that answers and acts

Contracts, price lists, email, the CRM: what you already have becomes sourced answers and agents that do the work. Pick a case and follow the path.

Example: someone needs to know which contracts expire soon. The system finds them and leaves the reminders ready.

01Your documents

Contracts_2024-2026310 PDF
Internal_opinions.pdf220 pp
Client_email5,600
Matter · files1,850

Connected by API or uploaded. Nothing leaves your infrastructure when the case demands it.

02Preparation

Normalise
Chunk
Tagcontract = commercial_lease
Make searchable

310 PDF → 4,120 clauses

03Search

94 of 100finds the right chunk
142 mstakes

Searches by meaning and by exact word, and filters by the tag before choosing.

04Sourced answer

Which contracts expire in the next 60 days without auto-renewal?
Seven. The first is North Warehouse, on 14 November. Source: contract 2024-118, clause 3.

answers with source · 91 of 100

05Agent that acts

  1. Queried · files
  2. Read · clause 3 in 7 contracts
  3. Drafted · expiry notice
  4. Asked for approval · lawyer
  5. Executed · created the tasks

Swipe to follow the flow →

The four cases that hold up

01

Search across the contract archive

"Which contracts have an exclusivity clause?", "which ones auto-renew?". It is the most frequent query in a legal team with several hundred live contracts, and today it gets answered by asking whoever has been there longest.

02

Review against a template

Comparing an incoming contract against the approved template and flagging which clauses changed, which are missing and which were added. It does not decide whether the change is acceptable: it marks where to look.

03

Extraction of dates and obligations

Expiry dates, notice periods, payment milestones, reporting duties. Extracted into a table with the source clause beside each row, and the alerts come off that.

04

A first pass on due diligence

Across a batch of documents, classifying and flagging what needs human reading. It reduces the volume that reaches the lawyer; it does not replace their reading.

01

The failure mode

The invented citation, and how you actually close it

The case that went around the world — lawyers sanctioned for filing non-existent case law — was not a faulty model: it was a system without verification. A language model produces a real reference and a plausible one with equal fluency, because the format of a citation is an easy pattern to imitate. Asking it in the prompt not to invent reduces the frequency and does not eliminate the problem, and in legal work a low rate is still unacceptable.

You close it in the architecture. Every passage in the index carries a stable identifier — document, version, clause or article — and the answer has to carry it through. After generation, each citation is checked against a real passage; one that does not resolve invalidates the answer, which is never shown. The system escalates instead of gambling. It is a cheap check and it is the difference between a tool a lawyer can use and one they cannot.

The second decision is not letting the model write about what it did not retrieve. If the question has no support in the archive, the correct answer is to say it is not there, not to produce a reasonable-sounding paragraph. That gets measured: the evaluation set includes questions whose correct answer is "this does not appear in the indexed documents".

How it is measured

The numbers behind a legal system

The evaluation set is built from real queries from the team, with the correct answer validated by a lawyer at the firm. Without that validation there is no measurement, only an impression.

01

Invalid citation rate

Zero. No answer carrying a reference that does not resolve against a document in the index.

How it gets fixed

Post-generation verification. An answer with a broken citation is discarded and escalated, never shown half-corrected.

02

Clause-level recall@k

Agreed with the team before building, measured at clause level rather than document level.

How it gets fixed

Hybrid search: legal language has exact terms that semantic similarity alone does not separate.

03

Date extraction precision

Against a hand-validated batch, how many expiry dates and notice periods come out correct.

How it gets fixed

Structured output with schema validation, and the source clause mandatory on every row.

04

Correct refusal

Questions whose correct answer is "this does not appear in the indexed documents".

How it gets fixed

A higher confidence threshold and escalation. In this domain, silence is a valid answer.

What we do not propose

We do not build systems that issue legal opinions, draft pleadings or recommend litigation strategy. That is not a technical limitation: it is that the output would be an opinion with nobody accountable for it, and in this profession accountability has a name on it.

We are also not the answer if the archive is fifty contracts in a shared folder. This pays from several hundred live documents upward, with versions, annexes and amendments coexisting — which is when finding the right clause already costs billable hours.

Related services

RAG systems

RAG that answers well — and knows when to stay quiet

Chunking, reranking and hybrid search, evaluated with recall@k and NDCG.

Project rescue

Your AI answers badly. It is almost never the model’s fault.

The system is already in production and answers badly. We measure it and determine what to fix.

Integrations and APIs

Connecting the systems that do not talk today

MCP servers against the systems already in operation.

AI consulting

AI consulting for enterprises

Architecture, evaluation criteria and cost per query before writing code.

Key takeaways

Four things before the call

  1. 01

    The failure mode specific to this sector is the invented citation: a perfectly formatted reference to a document that does not exist. You prevent it with post-generation verification, not with an instruction asking the model not to do it.

  2. 02

    The architectural rule is simple and not negotiable: a citation that does not resolve against a real document in the index is never shown. The answer is discarded and the query escalates.

  3. 03

    The cases that hold up are about document volume, not judgement: search across the contract archive, review against a template, extraction of dates and obligations, and a first pass on due diligence.

  4. 04

    It does not replace a lawyer’s judgement and we do not pitch it that way. It replaces the hours spent finding which contract a clause ended up in — work that today falls to the most junior lawyer in the firm.

This is where the data comes in

An AI system is worth what its sources are worth. These are the standard connectors; anything with an API or a database connects the same way, and what has no API is handled by file.

SAP

Enterprise ERP

ERP

Oracle

ERP and database

ERP

NetSuite

Cloud ERP

ERP

Salesforce

CRM and service

CRM

HubSpot

CRM and marketing

CRM

PostgreSQL

Database and pgvector

Databases

A RAG system in production: three years, two million users

We built and operated the assistant for a loyalty platform serving more than two million active users across ten countries.

We built the full pipeline: document ingestion and normalization, chunking, embedding generation, vector store on Azure AI Search and Pinecone, and retrieval with grounded generation on LangChain.

We held it above 99% availability for three years.

RAG systems →

Frequently asked questions

01

How do you guarantee it will not invent case law or clauses?

With post-generation verification, not with an instruction. Every passage in the index carries a stable identifier — document, version, clause — and the answer has to carry it through. After generation we check that each citation resolves against a real passage; if one does not, the answer is discarded and the system escalates rather than showing it. On top of that, the system can only answer from what is in the index: if the firm does not index case law, there is nothing to invent it from.

02

Does it replace a junior lawyer?

No, and anyone selling it that way is selling you a problem. It replaces one concrete task the junior does today: finding which document a clause ended up in, in minutes rather than hours. What it does not replace is the judgement of whether that clause serves you, how it gets negotiated or what risk it carries — which is where the lawyer’s value sits and where the system has nothing to say.

03

Do our clients’ contracts leave the firm?

Only if you accept that, and in this sector the answer is usually no. We deploy on Azure OpenAI or Amazon Bedrock inside the firm’s own subscription, so documents and queries never leave your infrastructure. In any configuration we use enterprise plans where data sent through the API is not used for training, and we can filter names and identifiable data before inference where the engagement requires it.

04

Does it work with scanned contracts?

It does, but the cost has to be stated. A scan needs optical recognition, and the quality of the extracted text caps everything downstream: if OCR swallows a negation, the system answers the opposite with complete confidence. So we measure extraction quality before indexing and report what share of the archive fell below the threshold. If much of the archive is poor scans, the right project starts with digitising properly, not with the assistant.

05

Can it compare a contract against our template?

Yes, and it is among the highest-return cases because the correct answer is verifiable. The system aligns the incoming document against the approved template and flags which clauses changed, which are missing and which were added, each with the text of both versions side by side. It does not rule on whether the change is acceptable: it marks where to look, and that decision stays with the lawyer.

06

How long does it take and how is it priced?

A first scope — search across the contract archive, for instance — usually takes six to eight weeks to production, with something running from week one. It is quoted with fixed scope, price and date in a proposal 48 hours after the first call. The price is driven by document volume, the state of the archive — scans cost more — and what integrations are needed.

07

What if we already bought a legal AI tool and nobody uses it?

It is a known pattern and it is almost never the model. The frequent causes are that the tool is not connected to the firm’s real archive but to a parallel repository nobody feeds, or that it gave a badly cited answer early on and lost the team’s trust, which is very hard to win back. The diagnostic takes a week, hands back the failures ranked by impact with each fix and its effort, and if it does not reach three actionable findings, it is not billed.

Fifteen minutes. A concrete answer.

It gets fixed, it gets built, or it is not worth it. And if the diagnostic does not reach three actionable findings, it is not charged.

Message on WhatsApp