Introduction to Generative AI
&
Large Language Models
Karthik Suresh* & Cristiano Fanelli
Department of Data Science




1st April 2026

Scan to open
Early Computational Era 1930 - 1960

Alan Turing
The Evolution of AI*
1936
Turing machines
form the basis for mordern computing
*Selected events
The rise of AI and the cold AI winter
The Evolution of AI*
*Selected events
1997
IBM's Deep Blue beats world chess champion
AI beats human
AI can now understand sentiments Natural Language Processing
1990
The dark age

1960
1980
AI Boom
Theoretical foundations set
DARPA gets interested
Artificial Neural Net born
The modern era of AI and Generative AI
The Evolution of AI*
*Selected events
2013
Method to convert words to meaningful numerical set of values from large corpus of data
Word Embeddings
2017
First idea of an LLM presented by Google. Attention is all you need. BERT
The Transformer
2018
GPT1
2020
GPT3
2016
AI beats Go Champion
AlphaGo algorithm beats the world champion in the game Go. A game with nearly infinite possibilities for each step. Real application of Reinforcement Learning
😕 Models became complex to explain
The era of Reasoning Models &
Path to Agentic AI
Feb 2025
First Agentic Code agent that can idependently code
Claude Code
2024
December 2024 - Training LLM for stronger reasoning with limited supervised feedback
Deep Seek
2022
Models trained with Human feedback for improved instruction following capabilities
InstructGPT
Nov 2025
AI agent framework designed to automate computer tasks by acting as a personal digital assistant
OpenClaw
July 2025
Gemini wins gold in math Olympiad
An advanced version of Gemini Deep Think solved five out of the six IMO problems perfectly, earning 35 total points, and achieving gold-medal level performance.

The Evolution of AI*
Creating new data based on patterns from existing data, often used in creating art, music, and text.
Pattern Recognition
- Generative AI models are trained to recognize patterns and structures within existing data
- This process involves analyzing the data to understand its underlying patterns.
- Once pattern recognized, then start generating Synthetic data
A Guessing Game
Imagine you are new to a social gathering
You need to guess a name of the person next to you.
You are given the telephone directory of the city.
What would you guess?
What is Generative AI
Creating new data based on patterns from existing data, often used in creating art, music, and text.
A Guessing Game
Imagine you are new to a social gathering
You need to guess a name of the person next to you.
You are given the telephone directory of the city.
What would you guess?
Find out patterns in the directory
More thorough and large the directory the better
Use this prompt (without ChatGPT login)
I am playing a guessing game. I need to guess the name of the male friend sitting next to me. Simply guess the name, do not say anything else. Simply output me the name.

What is Generative AI
What are Large Language Models?
Generative Natural Language Processing AI that can understand and generate human semantic language and mimic underlying sentiments, with applications in text generation and analysis.
Pre training a LLM
Data Collection
Tokenization and embedding of words
Predict the next word in a sequence given the preceding context
Fine tune performance
- Analyzing millions of sentences, to recognize patterns within words. Learn it word by word predicting the next word
- Larger the training text corpus. Much better can be the prediction. Self supervised Learning
How exactly does an LLM predicts
GPT3 was trained on ~45TB of data. Thats the entire internet. Has 175B parameters
Predict the next word that most probable for the current position (positional encoding) and most meaningful word (alignment scores)


How Reasoning models work ?
RLHF teaches the model to prefer clear, step-by-step reasoning, not just correct answers.



-
Predicting next word is easy -- Solving a Problem is hard -- Multiple steps to solve -- Extends to Reasoning
-
Reinforcement Learning with Human Feedback (RLHF) -- bridges gap
Solve 2x + 3 = 7 step by step
You have two job offers: one pays more, one has better work-life balance. Which should you choose?
Plan a 3-day trip to New York with a limited budget
But this requires a high quality dataset and Human experts to guide the Model step by step -- Very costly and tedious
We bake in Guard rails here -- Human experts could control every step of reasoning
Self Reasoning models : Rogue?

-
Dec 2024 -- DeepSeek R1 -- Newer Strategy -- model learns to reason on its own
-
The model generates many possible reasoning paths -- Episodes
-
A verifier checks if the final answer is correct -- instead of a human -- automatic checker -- Is the equation solved correctly?
-
The model gets rewarded -- correct answer -- with fewer steps
-
The model learns reasoning by trying, failing, and improving.
Models can learn reasoning through self-improvement, guided by a verifier.
Limited human oversight
Optimal answers may hide flawed logical or moral reasoning
Correct decision, but based on biased or invalid reasoning -- Gets x = 2, but uses incorrect steps to get there
Risks, Limitations, & Governance Challenges of LLMs
Training Data & IP
-
Training AI uses copyrighted works
-
Books, images, articles, music
-
Copying and processing content may trigger copyright law
-
-
Defense -- Fair use -- Purpose, Nature, Amount of original content used for training as whole & Market impact
-
Conclusions:
-
Transformative is not guaranteed: Just because AI learns, doesn't mean its fair use
-
Output Matters: Similar or competing content weakens fair use
-
Training on pirated content is against fair use
-
Voluntary licensing: Pay for training data, creators compensated
-
Training Data & IP
Bartz vs Anthropic ( June 2025)
- Anthropic used copyrighted books. Bought books, Scanned and then used -- Ruling: Fair use for training AI
- Also, evidence for using pirated content -- Books scrapped from pirate websites -- Ruling: This part of case was allowed to proceed
IP infringement on Models
- Distillation attacks: Copying an AI model (to a smaller cheaper model) by repeatedly querying it
- Anthropic in Feb 2026 reported 3 Chinese AI companies distilling from their models. Check here
- ~16 Million queries
- 24000 fake accounts

These types of infringements are a whole new subject for discussion
Lack of Transparency*
*only closed source models
Much of the technology is owned by the Private companies, Making it hard to study further
Who owns the "data" injected to the model during inference?
GOOD NEWS: OpenLLM research is getting popular. Lamma, Mistral, Gemma,
But: The data used of training is still not open source.
Transparency & Explainabilty
Lack of Explainable AI
LLMs may produce coherent text without actually understanding the meaning behind it. This lack of genuine comprehension can lead to misleading or inappropriate responses in certain contexts.
Check out the cool explanation here
Transparency & Explainabilty
Hallucinations and Frozen Knowledge
There is a risk of LLMs generating incorrect or undesired content, known as hallucinations, which can compromise the quality and reliability of generated text. Issues like Context Rot, Lost in the middle and unintentional Bias make it worse
Check out how I made gemini really write me a speech on nukes: Check here
This is purely to show the risk of manipulating LLMs and potential risks.
Ethical Use and Mis-use

*RAG could be Copyright infringement
Accountabilty & Liability
Responsibility:
- Users
- Developers
- Deployers
Increased Risk due to Agents (Reasoning Models)

Environmental Impact
-
Energy usage growing exponential in the next decade. For context, a Full HD image (1024 x 1024) generation can take upto ~3kWh -- power required to charge a typical smart phone
-
Energy bill across USA has significantly increased in the last few years. An average increase of 11.5% in 2025 and nearly 250% in Virginia since 2021.
Environmental Impact
-
Data centers uses fresh water for cooling servers.
-
Medium scale consumes ~110 Million gallons a year, Large scale consumes ~1.8 Billion gallons a year. Equivalent to a town of population between 10,000 - 50,000

Set your chat context: refer to the predefined messages or cues provided by the system to guide the user in the conversation. LangChain prompts
Try out Prompt engineering: refers to the process of designing, refining, and optimizing prompts or instructions given to ChatGPT
Fine tuning: process in enhancing Large Language Models (LLMs) through transfer learning. It involves adjusting the parameters of an LLM to adapt it to specific tasks or datasets, thereby improving its performance and accuracy in generating text.
Chain of Thought: break down complex thoughts or responses into a sequence of intermediate steps, fostering a more logical and coherent output.
A few tips on how to better use ChatGPT
Automatically condensing long texts into shorter summaries
! useful for legal documents and case briefs.
Applications of LLM in Law
Assisting lawyers in researching case law, statutes, and legal documents, improving efficiency and accuracy.
AI as assistants to better improve performance
LLM is being used to improve Coding (GitHub CoPilot)
LLM is being used to automate workflows (MetaGPT)
LLM is being used to assist in Tech support (IBM Watson)
A scenario where, AI reads through a case file and automatically retrieves similar cases from a external database to assist lawyers and shorten the time for gathering information
Applications of LLM in Law
Analyzing the emotions and opinions expressed in text, helpful for understanding public perception and legal arguments.
Applications of LLM in Law
Conclusion
Generative AI and Large Language Models offer powerful tools for legal professionals, enhancing research, analysis, and decision-making processes.
There is more than LLM in Generative AI. It is indeed a powerful tool.....
With Greater Powers comes Greater Responsibility
- Current LLMs are powerful at mimicking human language
- They are not sentient and we attribute sentiment to patterns they predict
Q&A
Open the floor for any questions or discussions about Generative AI, Large Language Models, and their applications in the legal domain.
Backups (very few)
-
Tokenization
- Word2Vec Embedding

How exactly does an LLM predicts
Consider L1: I poured water from the bottle into the cup until it was full
L2: I poured water from the bottle into the cup until it was empty
The Positional encoding
Carefully consider the order in which words appear. This should be similar to the next sentence when "grouping"
L1': I poured milk from the bottle into the cup until it was full
The Self Attention
Carefully predict the "connections" between words within a sentence, underlying meaning. This is called alignment scores (matrix). Very different alignment metrics for the sentence below.
Introduction to Generative AI and Large Language Models
By Karthik suresh
Introduction to Generative AI and Large Language Models
- 351














