The Hidden Dangers of AI in Legal Research: What You Need to Know About AI Hallucination
Artificial Intelligence (AI) with the latest large language models such as OpenAI’s ChatGPT, Google’s Gemini and Anthropic’s Claude has revolutionized many fields recently. However, one of the challenges that comes with the territory is AI hallucination, which refers to the generation of incorrect or misleading information by AI systems, which can be particularly problematic in the legal field where accuracy is paramount.
The most famous recent case involving AI hallucination is where 2 attorneys faced disciplinary action for submitting a lawsuit filing against an airline that cited non-existent past court cases. They mistakenly believed these references were legitimate, but they were actually fabricated by ChatGPT. Several of those cases were not real or involved airlines that did not exist.(see https://www.abc.net.au/news/2023-06-09/lawyers-blame-chatgpt-for-tricking-them-into-citing-fake-cases/102462028).
There are a few reasons for AI hallucination. Firstly, large language models have been trained over massive amounts of data (not just in the legal area but also including unreliable, nonfactual data such as fiction, forum posts and other internet data) in order to create a general-purpose model. Furthermore, general-purpose large language models do not have many case law and legislation examples embedded in their training data. The concept of GIGO (garbage in, garbage out) still applies even in AI models.
One of the best ways to ensure that hallucination does not happen, is to include the source texts (for e.g. all the relevant parts of the case law or legislation text) in the prompt. For example, one possible prompt would be:
Based on the context from the provided case law, provide an answer to the question:
CONTEXT: “”” (paste context from relevant case law)”””
QUESTION: “”” (what you want the model to do with the context)”””
The provision of a context anchors the large language model into providing responses that are based on factual data and greatly reduces hallucination, especially in the latest models like GPT-4o.
However, there is now a problem: How would you even know which cases or legislations to put into the prompt in the first place, among the millions of cases and legislation clauses?
At LRAI (https://lrai.com.au), this is precisely the problem that we aimed to solve. We developed a custom search engine by combining the latest advances in AI and search engine technology to analyze your case descriptions/questions/issues to find the most relevant case law and legislation directly, so you can save huge amounts of time compared with trying to find them using traditional methods (which are all keyword based).
We will be covering this in our next post.