DS101 – Fundamentals of Data Science
01 Dec 2025
Purpose of this deck:
This deck provides commentary, context, and deeper analysis of the cases we discussed in class. It is intended as:
What this covers:
Note: This is not a replacement for the readings, but a supplement to aid your understanding.
What are LLMs?
Large Language Models (like GPT-4, Claude, Gemini) are:
How they generate text:
Critical limitation:
LLMs have no mechanism to verify truth. They generate what sounds plausible based on patterns, not what is factually correct.
Definition:
Hallucinations occur when LLMs generate outputs that are not grounded in their training data or factual reality - essentially, making things up while sounding confident.
Why they happen:
Why this is fundamental, not fixable:
Recent research demonstrated that hallucinations are mathematically inevitable in current LLM architectures. You cannot train a model to never hallucinate without:
Video explanation: Why large language models hallucinate
Characteristics of legal hallucinations:
See examples of the above here
Example from UK Ayinde case:
Barrister cited several cases including R (on the application of Ibrahim) v Waltham Forest LBC [2019] EWHC 1873 (Admin). The case:
Why lawyers missed this:
Key lesson: The better the hallucination fits your needs, the more suspicious you should be.
To understand the cases, it helps to distinguish different uses:
1. Legal research (HIGH RISK) - Finding relevant cases and statutes - Summarizing case law - Identifying legal principles - Problem: Hallucinated cases are hardest to detect
2. Document drafting (MEDIUM RISK) - Writing first drafts of arguments, pleadings - Generating standard clauses - Formatting documents - Problem: May include fake citations or incorrect legal standards
3. Administrative tasks (LOWER RISK - but privacy concerns) - Summarizing documents - Organizing information - Drafting emails - Problem: Confidentiality breaches if sensitive data uploaded
4. Client communication (MEDIUM RISK) - Explaining legal concepts - Drafting client letters - Problem: Oversimplification or incorrect advice
Most problematic cases we discussed involved legal research - lawyers asking ChatGPT to find cases and not verifying the output.
See a narration of the case here and here
What happened:
Court’s response:
Mitigating factors:
Key quote from Tribunal’s reasoning:
The panel stated that Rahman had:
“directly attempted to mislead the Tribunal through reliance on Y (China)… and only made a full admission in his third explanation,” concluding that he had not “acted with integrity and honesty.”
Lesson: AI may cause the initial error, but the advocate remains responsible for checking authorities and for giving clear, truthful explanations to the court. Candour is essential — and its absence, rather than the AI itself, is what leads to regulatory consequences.
Background:
Judicial review in the High Court (Administrative Court). The issue arose when counsel for the claimant (Ms Sarah Forey) and the claimant’s solicitors submitted five entirely fictitious cases in the claimant’s Statement of Facts and Grounds. These authorities were later shown to be AI-generated.
What happened:
The fabricated cases included:
(from paras 18, 20, 55–63)
All were completely invented, complete with fabricated facts and fabricated legal principles.
What made this worse:
The judge described the conduct as:
“wholly improper… unreasonable… and negligent” and “a substantial difficulty with members of the Bar who put fake cases in statements of facts and grounds.” (para 64, 63)
Court’s findings:
Sanctions:
1. Wasted Costs Order
The High Court imposed a wasted-costs order of £4,000 (para 71)
Liability shared equally:
2. Reduction of recoverable costs
3. Regulatory referral
The judge ordered (para 78):
This mirrors the strongest possible judicial condemnation short of contempt.
Mitigating / contextual factors:
However, the mitigating factors did not prevent sanctions.
Key quote from judgment:
“It is wholly improper to put fake cases in a pleading… providing a fake description of five fake cases… qualifies quite clearly as professional misconduct.” (para 64)
Lesson:
Submitting AI-generated authorities without verification is serious misconduct, but the real professional failure was:
This case stands as the clearest and most serious UK example of AI-fabricated case law leading to real financial sanctions and regulatory referral.
You can see the whole judgement in this case here
David Allen Green wrote an extensive analysis of the case in his blog.
And Khaleed Moyed (Partner at Gunnercooke LLP) also wrote another blog post to analyse this case (which is pretty much jurisprudence at this point!)
Context:
After multiple cases of AI-generated fake citations, the High Court issued a formal warning to the legal profession.
The warning:
Dame Victoria Sharp (President of the King’s Bench Division) and Justice Jeremy Johnson issued a statement:
“Freely available generative artificial intelligence tools, trained on a large language model such as ChatGPT are not capable of conducting reliable legal research. Such tools can produce apparently coherent and plausible responses to prompts, but those coherent and plausible responses may turn out to be entirely incorrect. The responses may make confident assertions that are simply untrue. They may cite sources that do not exist. They may purport to quote passages from a genuine source that do not appear in that source.”
Key points:
Significance:
Link: The Guardian coverage
You can find the original text of the warning here
Background:
In Noland v. Land of the Free, L.P. (Cal. Ct. App., 2nd Dist., Sept. 12, 2025, B331918), California attorney Amir Mostafavi filed appellate briefs containing numerous AI-generated fabricated quotations and citations.
What happened:
Difference from UK cases:
Mixed pattern of error:
So the problem was broader than just “fake quotations from real cases”
Like the UK cases, the real issue was complete failure to verify AI output
California 2nd District Court of Appeal’s ruling:
Imposed a $10,000 sanction payable to the court for:
Issued a published opinion as a warning, including the line (widely quoted in commentary):
“No brief, pleading, motion, or any other paper filed in any court should contain any citations — whether provided by generative AI or any other source — that the attorney responsible for submitting the pleading has not personally read and verified.”
Referred Mostafavi to the State Bar for potential discipline
Mostafavi’s response (publicly reported):
“In the meantime we’re going to have some victims, we’re going to have some damages, we’re going to have some wreckages. I hope this example will help others not fall into the hole. I’m paying the price.”
(Reported in CalMatters.)
Key difference from UK:
Link: CalMatters coverage
Background:
Attorneys from Morgan & Morgan (one of America’s largest personal injury firms) filed motions in Wadsworth v. Walmart Inc. citing nine cases they could not verify existed.
Significance:
What happened:
Outcome:
Why this matters:
Analysis: David Lat’s detailed coverage
Lesson: Technology without professional culture of verification fails regardless of resources.
The growing phenomenon:
NBC News documented a trend: Americans increasingly using ChatGPT instead of lawyers to represent themselves in court.
Example: Lynn White
The double-edged sword:
Positive aspects:
Serious risks:
Scale of the problem:
Ethical dilemma:
Should we restrict AI use by self-represented litigants even though they can’t afford lawyers? Or accept higher error rates as price of access?
Link: NBC News article
Background:
Child protection worker in Victoria used ChatGPT to help write court documents, uploading sensitive information about at-risk children.
What happened:
OVIC Investigation findings:
Victoria’s Office of the Victorian Information Commissioner found:
Why this is uniquely serious:
OVIC’s order:
Link: The Guardian coverage
Background:
Australian Medical Association raised alarm after doctors began using ChatGPT to write medical notes and patient communications.
What happened:
AMA concerns:
Why healthcare is different from legal:
Legal contexts:
Healthcare contexts:
Common thread:
Both involve professionals delegating critical judgment to systems that:
AMA call to action:
Stronger AI regulations needed before widespread adoption in healthcare settings.
Link: The Guardian article
Characteristics:
Bar Council guidance (2024):
Advantages:
Risks:
Characteristics:
Federal courts’ position:
Many courts now require:
Advantages:
Risks:
Despite different approaches, these principles are universal:
1. Personal responsibility
2. Verification requirement
3. Seriousness of offense
4. Professional ethics
5. Insufficient excuse
Key insight: Regardless of cultural differences, all legal systems agree professionals cannot delegate judgment to unaccountable systems.
The problem:
A surprisingly large number of competent, experienced lawyers failed to verify AI-generated citations. Why?
Factors identified:
Solutions discussed:
The dilemma:
Self-represented litigants using ChatGPT because they can’t afford lawyers. Is this:
Democratization of legal access (positive view):
Dangerous pseudo-representation (critical view):
Class discussion points:
Unresolved tension:
We want to expand access to justice, but not at the cost of creating new forms of injustice. No easy answer.
Core question:
What does professional responsibility mean when AI can do much of the work?
Traditional professional duties:
How AI challenges these:
Emerging consensus:
Professional responsibility increases with AI, not decreases. Technology adds new obligations rather than reducing existing ones.
The challenge:
LLMs are “black boxes” - we can’t see how they reach conclusions. Why does this matter?
Implications for legal contexts:
This connects to broader AI ethics concerns:
Why legal profession struggles:
Possible solutions:
The recognition:
Not all AI uses carry equal risk. Some contexts demand higher standards or outright prohibition.
What makes a context “sensitive”:
Graduated approach discussed:
Level 1: Complete prohibition
Level 2: Highly restricted use
Level 3: Permitted with caution
Level 4: Generally appropriate
Victorian child protection ban is example of Level 1: absolute prohibition until technology demonstrably safe.
Key principle: Higher stakes = higher standards = more restrictions.
As (potential) data scientists, you will:
Lessons from legal cases:
Parallels with legal ethics:
Lawyers have centuries-old professional duties; data science is still defining its equivalent. But the pressures, risks, and responsibilities are increasingly similar.
Emerging duties for data scientists:
Competence
Honesty
Diligence
Confidentiality
Public interest
Key idea: Professional ethics evolve as the power of our tools increases. The introduction of LLMs raises the stakes of poor judgment, poor documentation, and poor verification.
Lessons from the case studies applied to system design:
Human-in-the-Loop (HITL) is essential
Verification pipelines matter
Automatic detection of hallucinations is unsolved
However, workflow-based controls can help:
Context-specific restrictions
Auditability and traceability
Design for failure
1. Development of “safe-by-design” legal models Narrow, citation-grounded models trained only on validated corpora (e.g., Westlaw-embedded tools) will likely replace general-purpose chatbots for legal contexts.
2. Mandatory AI literacy for professionals Courts and regulators are already signaling that ignorance is not a defence. Expect:
3. Increasing regulatory intervention We may see:
4. Hybrid workflows AI will remain useful:
5. Move toward “evidence-linked outputs” Future models may be required to:
1. LLM hallucinations are inevitable Not a bug — a structural property of how models work.
2. High-risk contexts amplify consequences Small errors → massive real-world harm (legal, medical, welfare).
3. Verification is the core skill of the AI era Professionals must assume AI is wrong until proven otherwise.
4. Tools do not remove responsibility Users remain accountable for all outputs they rely on.
5. Data scientists play a central role You will shape the safeguards, workflows, and cultural norms that enable safe AI use.
Technical background:
Legal cases & commentary:
Regulatory guidance:
General AI practice:

LSE DS101 2025/26 Autumn Term - Post-Class Review