In the dynamic realm of legal technology, AI has become an indispensable tool for South African lawyers, streamlining research, case analysis, and drafting. However, the rise of AI has also brought challenges, notably “hallucinations”, instances where AI generates fabricated facts, citations, or interpretations with misleading confidence. Recent incidents, such as attorneys facing disciplinary action for submitting AI-invented case law, underscore the risks in high-stakes fields like law. At Legal Genius, we have now turned these hurdles into opportunities, evolving from a development phase marred by errors to a reliable platform with Legal Genius 3.0. This article explores our trial-and-error journey to eradicate hallucinations and highlights what the tool can now achieve for SA legal professionals. The journey began with high hopes but quickly encountered reality. In the early stages, we integrated Claude Sonnet as the core AI engine, attracted by its advanced reasoning and natural language prowess, which appeared perfect for navigating South Africa’s unique jurisprudence. Initial prototypes handled basic queries well, but rigorous testing exposed a major flaw: hallucinations.
The model would invent non-existent judgments or distort real ones, such as misrepresenting holdings from landmark cases like National Media Ltd v Bogoshi. For example, a query on defamation might produce fake Supreme Court of Appeal (SCA) rulings, complete with plausible but false citations, potentially leading users astray in court preparations. These issues were not isolated; they stemmed from generative AI’s design, which prioritises coherent narratives over factual accuracy, especially in niche areas where training data is sparse or outdated. We conducted extensive iterations, logging thousands of queries, analysing patterns in errors, and tweaking prompts to enforce verification. Despite efforts, hallucinations persisted, mirroring industry-wide problems seen in global cases like Mata v Avianca in the US, where lawyers were sanctioned for unverified AI outputs as well as in cases in South Africa. This phase taught us a crucial lesson: off-the-shelf AI models, without deep customisation, fall short in the precision demanded by legal work. It was a period of trial and error, filled with setbacks, but it fuelled our determination.
Pivoting from these lessons, we overhauled the system with advanced Retrieval-Augmented Generation (RAG) technology in Legal Genius 3.0. RAG addresses hallucinations by anchoring AI responses in real-time data retrieval from trusted sources, rather than relying solely on pre-trained knowledge. We customised our RAG pipeline specifically for SA law, integrating search optimisation into databases like SAFLII and LAWLIBRARY to ensure every output is verifiable. The process works in two steps: first, the system retrieves relevant documents matching the query; second, it generates responses based only on those facts, eliminating the risk of fabrication. This optimisation eradicated hallucinations entirely, transforming Legal Genius now into a dependable tool. Now, users receive structured, accurate insights with direct hyperlinks to sources, reducing research time from hours to minutes while maintaining ethical standards.
For instance, querying “dolus eventualis” now yields a comprehensive breakdown:
Short Answer:
Dolus eventualis is a form of criminal intent in South African law where the accused (1) subjectively foresaw the possibility that his or her conduct might bring about a particular unlawful consequence (for example, death), and (2) reconciled himself or herself with that possibility (i.e., “took it into the bargain” or nevertheless persisted in the conduct). If both elements are proved beyond reasonable doubt, the accused can be convicted of an offence requiring intent (for example, murder) on the basis of dolus eventualis.
SAFLII Leading Cases
- S v Sigwahla 1967 (4) SA 566 (A): Classic exposition of dolus eventualis in murder contexts. (Cited in Francis v S)
- S v Ngubane (30/83) [1985] ZASCA 41: Explained the volitional element distinguishing it from negligence. SAFLII
- S v De Oliveira (668/91) [1993] ZASCA 62: Authority for the two-part test in upholding dolus eventualis. SAFLII
- Humphreys v S (424/2012) [2013] ZASCA 20: Reaffirmed the test in vehicle-related deaths. SAFLII
- Ndlanzi v S (318/2013) [2014] ZASCA 31: Cautioned against conflating “ought to have foreseen” with actual foresight. SAFLII
- Van Schalkwyk v S [2016] ZASCA 49: Discussed the value judgment in the volitional element. SAFLII
- S v Mashimbye (1995): Overturned dolus eventualis where alternative inferences existed. LawLibrary
- S v Van Wyk: Explored the degree of possibility required. (SAFLII – cited in related cases)
This output includes practical tips for prosecutors and defenders, controversy areas, and a disclaimer urging consultation with professionals—ensuring compliance with the Legal Practice Council’s guidelines.
Beyond individual queries, Legal Genius 3.0 excels in broader applications: generating annotated case lists, drafting notes, letters and even pleadings or analysing scenarios like road accidents under dolus eventualis. It supports litigators by providing evidence-based inferences, helping rebut or prove intent without the guesswork.
Aligned with POPIA for data privacy, it is a secure tool for firms, students, and NGOs, fostering efficiency while mitigating risks. Notably, it assists students from rural areas and small firms who cannot afford expensive subscriptions to premium legal databases, democratising access to high-quality SA case law and insights that were previously out of reach.
To maximise AI’s benefits in SA law, adopt best practices: always verify outputs against primaries like SAFLII and maintain human oversight for nuanced judgments. By doing so, professionals can avoid the “hallucination complications” in recent referrals and leverage tech responsibly.
Legal Genius 3.0 represents reliability forged from adversity, a testament to how trial and error can yield transformative results. As AI reshapes legal practice, we are proud to lead now with a hallucination-free solution.
Visit www.legalgenius.co.za for a free trial and experience the difference.









