RAG (Retrieval Augmented Generation) is the key technology that makes AI usable in the legal field. First described by Facebook AI Research in 2020, the principle is elegant: instead of relying solely on the LLM's internal memory (often a source of hallucinations), you add a document retrieval step before generation. The model first queries an external database (codes, case law, contracts), then generates its answer based on those documents.
In practice, a RAG system works in three stages: indexing legal documents as vector embeddings, retrieving the passages most relevant to the question asked, and generating an answer that cites and synthesizes those sources. This architecture dramatically reduces hallucinations, because the model is forced to ground its answers in factual data.
For legal professionals, RAG is the difference between a consumer chatbot and a reliable legal tool. The most serious legaltech solutions (Doctrine, Lexis+AI, GenIA-L) all use RAG architectures to ensure that every answer is traceable back to its source. This is the approach that reconciles the generative power of LLMs with the demand for accuracy and verifiability that the legal world requires.