0% found this document useful (0 votes)
11 views28 pages

Principles of Responsible AI Explained

it

Uploaded by

betojal623
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views28 pages

Principles of Responsible AI Explained

it

Uploaded by

betojal623
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Ch-1

1. Define Responsible AI and discuss the designing principles of Responsible AI


Definition:
Responsible AI is the practice of developing, deploying, and using artificial intelligence
systems in ways that are safe, ethical, fair, transparent, and accountable, ensuring that AI
benefits humanity without causing harm. It emphasizes aligning AI technologies with human
values, laws, and social norms.
Design Principles:
1. Fairness:
o AI should provide equal treatment to all individuals, regardless of race, gender, age, or
background.
o Example: In recruitment systems, algorithms should not favor men over women.
2. Transparency:
o The decision-making process of AI should be explainable and understandable.
o Example: A bank’s AI must explain why a loan application was rejected.
3. Accountability:
o There must be a clear assignment of responsibility for AI outcomes. Developers,
companies, and regulators must take ownership.
o Example: If a self-driving car causes an accident, responsibility should be traceable to
human actors.
4. Privacy & Security:
o User data must be protected from misuse, unauthorized access, and leaks.
o Example: AI in healthcare should anonymize patient data.
5. Human-Centric Approach:
o AI should support and augment human decision-making, not replace moral
responsibility.
o Example: AI in medicine should recommend treatments but the final decision should
rest with doctors.
6. Sustainability:
o AI systems should be environmentally sustainable and socially beneficial.
o Example: AI used for climate monitoring helps reduce long-term risks.
2. Differentiate between Responsible AI and Ethical AI

Aspect Responsible AI Ethical AI

Practical rules, governance, and


Focus Moral values, philosophy, and ethics.
implementation.

Nature Applied, policy-driven. Theoretical, value-driven.

Creating AI laws, audits, and accountability Debating if AI in surveillance violates


Example
frameworks. human rights.

Defining what is “right” and “wrong”


Goal Safe and regulated deployment of AI.
in AI use.

3. discuss the impact of ethical AI in the following real time scenarios.


1)hiring Process
2) Surveillance
3)warfares
AI isn’t just about technology* – it changes how we live, work, and interact as a society.
* AI can do simple, everyday tasks (like sorting, calculations, or basic automation), but
struggles with things humans find easy (like recognizing faces, understanding speech, or
interpreting language naturally).

* *In the economy, AI creates both **opportunities and problems*:


* It makes work faster and more efficient.
* But it also takes over jobs that people (especially in low-skill roles) used to do, which can
cause job loss.
* This means people may need to *learn new skills* (reskilling) to stay employed.
* There are also *ethical concerns* about inequality caused by job loss from automation.
1. *Hiring*
* Companies use AI to check resumes and conduct video interviews.
* Problem: AI can be biased (because it learns from past data) → may unfairly reject
women, minorities, or people from different backgrounds.
* These systems are often like a “black box” → hard to understand or challenge unfair
decisions.
2. *Surveillance*
* AI facial recognition is used in cities for crowd control, policing, or even emotion
detection.
* Risk: Can reduce personal freedom and privacy, especially in countries where free speech
or protests are punished.
3. *Warfare*
* AI is being used in autonomous drones and decision-making in wars.
* Big ethical question: *If a machine kills, who is responsible?*
* This challenges traditional rules of war and morality.

4. Philosophical Foundations of Ethics in AI


1. Consequentialism (Result-Based Ethics)
• Core Idea: Do the action that gives the most overall benefit.
• AI View: If an AI tool makes hiring faster and saves money, it looks like a good choice.
• Ethical View: If we fix the bias in the tool and it still works well, everyone benefits
(the company + diverse candidates).
• Challenge: What helps in the short-term (efficiency) may cause long-term harm (like
unfair bias).

2. Deontology (Rule-Based Ethics)


• Core Idea: Some actions are right or wrong no matter the results.
• AI View: The company has a duty to treat all applicants fairly, even if it loses some
efficiency.
• Ethical View: Using a biased AI is wrong because it disrespects equal rights and
dignity — it should not be used, even if it “works.”
• Challenge: Following moral rules can sometimes clash with business goals.
3. Virtue Ethics (Character-Based Ethics)
• Core Idea: Focus on values like fairness, honesty, and compassion.
• AI View: A good company should aim to act with integrity, be inclusive, and act
responsibly.
• Ethical View: The company should admit the problem, fix or pause the AI tool, and
build a fair hiring culture.
• Challenge: Needs a change in company attitude and values, not just a quick technical
fix.

5. explain FAT principle of ethical AI.

FAT Principles of Ethical AI (Simple Explanation)


1. Fairness
o AI should treat everyone equally and not discriminate.
o Example: A hiring AI must not reject someone just because of their gender,
caste, race, or background.
o Fairness means justice in distribution (who gets what) and fair process in
decision-making (how the decision is made).

2. Accountability
o Someone must be responsible for what AI does.
o If an AI makes a mistake (e.g., wrongly rejects a loan), the company or
developers must explain and fix it.
o There must be rules or systems to check, control, and correct AI decisions.
3. Transparency
o AI should not be a "black box." People should know how it works and why it
made a decision.
o This means AI systems must be explainable, their data and logic should be
documented, and users should understand results.
o Without transparency, it’s hard to trust or audit AI.

6. explain the following terms.


1. Trust
• It’s about how much people believe in and feel confident about AI systems.
• Trust is psychological → it depends on user experience, expectations, and perception,
not just technical performance.
• Example: People may trust a navigation app because it usually works well, even if
sometimes it makes mistakes. Ideally, trust should be earned through consistent
reliability and fairness.

2. Reliability
• Refers to how consistently AI performs correctly across different situations and
conditions.
• It is objective → based on measurable, repeatable performance, not just user
feelings.
• Example: A medical diagnosis AI that gives accurate results every time is reliable. If it
works well in one hospital but fails in another due to poor data, it’s unreliable.

3. Explainability
• AI should be able to explain the reasoning behind its decisions or predictions in a
way humans can understand.
• Improves transparency → when people know why AI decided something, they are
more likely to trust it.
• Example: A loan approval AI should explain whether income, credit score, or
repayment history influenced the decision, instead of just saying “approved” or
“denied.”
4. Algorithmic Bias
• Refers to systematic unfairness in AI outcomes caused by biased data, models, or
deployment.
• Types of Bias:
o Data Bias → comes from historical or societal imbalances in the training data
(e.g., if past hiring data favored men, the AI may also favor men).
o Model Bias → arises when algorithmic design choices (features, assumptions,
regularization methods) unintentionally reinforce inequities.
o Deployment Bias → occurs when even fair models behave unfairly in real-
world settings due to context (e.g., facial recognition working better for
lighter skin tones than darker ones).
• Example: A recruitment AI that prefers resumes from one gender or university
because of biased training data.

Trust vs. Reliability vs. Explainability

Aspect Trust Reliability Explainability

Objective measure —
Psychological state —
how consistently AI Ability of AI to explain the
how much users
Definition performs its tasks reasoning behind its
believe in and feel
correctly under different outputs and decisions.
confident about AI.
conditions.

Subjective, based on
Objective, based on
perception, past Informational, focuses on
Nature measurable performance
experience, and providing rationale/logic.
metrics.
expectations.

Can exist even if AI is


Independent of trust— Supports trust by making
unreliable or not
Dependency measured by repeatable AI decisions
explainable (though
correct outcomes. understandable.
ideally it shouldn’t).

Determines whether Helps users judge if AI’s


Impact on Ensures AI works
users will adopt and decisions are fair, logical,
Users correctly and predictably.
rely on AI. and acceptable.
Aspect Trust Reliability Explainability

People may hesitate to A loan approval AI that


A medical AI that gives
use self-driving cars shows which factors led
Example the right diagnosis every
despite good safety to approval/denial is
time is reliable.
stats (trust gap). explainable.

7. differentiate between traditional and AI based liability.

Traditional Liability
Aspect AI-Era Liability (Autonomy & Complexity)
(Human-Centric)

Blame is placed on people


Basis of AI is autonomous → acts on its own, making it
→ based on intention or
Responsibility hard to assign blame.
negligence.

Actions are usually clear AI decisions can be a “black box” → not easy to
Transparency
and explainable. understand.

Who is One clear person (e.g., Many possible actors → developers,


Responsible? driver, doctor, worker). companies, data providers, or users.

Laws are well-established Current laws are not ready for unpredictable AI
Legal Gaps and can assign blame behavior. New rules are needed for cases
clearly. where AI learns and changes over time.

If a self-driving car crashes, it’s unclear if fault


If a driver crashes, the
Example lies with the car maker, programmer, or
driver is responsible.
passenger.

[Link] the concept of ethical dilemma discuss the trolly problem.


From the ppt pg no. 52
9. list the types of business risk in AI discuss them in detail.

AI introduces a broad spectrum of business risks that organizations must systematically


address for sustainable and responsible adoption. The table in the image highlights five
major risk types, each with distinct drivers and real-world [Link]
1. Strategic Risk
• These risks come from top-level business decisions about AI.
• Market Overhype → Companies may overestimate what AI can do in the short
term, spend too much, and later face disappointment when results don’t match
expectations.
• Vendor Dependence → Relying too heavily on outside AI providers can cause lock-in,
reduce flexibility, and create problems if vendors change their technology, pricing, or
shut down services.

• To reduce risk: Companies should set realistic goals, diversify AI tools/vendors,


and build some in-house expertise.
2. Operational Risk
• These affect the daily operations of a business when AI is part of its workflow.
• System Failure → AI systems can crash or malfunction, stopping important business
processes.
• Data Bias → If the data used to train AI is biased or poor quality, the system may
make unfair or inaccurate decisions (e.g., biased loan approvals).
• Automation Error → Mistakes can spread very quickly when AI automates processes
at large scale.

• To reduce risk: Companies must test systems regularly, manage data quality, and
keep human oversight in automated decisions.
3. Legal & Regulatory Risk
• These risks come from laws and rules that govern AI usage.
• Data Privacy → Regulations like GDPR, CCPA require strict rules on how user data is
collected, stored, and used.
• Copyright Issues → Training AI on copyrighted material (images, text, music) without
permission can lead to legal disputes.
• Liability → If AI harms someone (e.g., self-driving car accident), it’s unclear who is
responsible—the developer, the company, or the user.
• To reduce risk: Organizations need legal compliance checks, monitoring of new
laws, and legal consultation in AI design and deployment.
4. Ethical & Social Risk
• These risks affect society and public trust in AI.
• Bias → If AI unintentionally discriminates against certain groups, it creates social
harm and distrust.
• Surveillance → Using AI to monitor people (e.g., facial recognition) may raise privacy
and civil liberty concerns.
• Labor Displacement → Automation may reduce or change jobs, leading to resistance
from employees, unions, and communities.

• To reduce risk: Companies should have transparent policies, consult


communities, and invest in employee reskilling/upskilling.
5. Reputational Risk
• These risks affect a company’s public image and trustworthiness.
• Public Backlash → Misuse of AI (e.g., biased hiring tools, intrusive surveillance) can
cause negative media coverage and loss of customers.
• Lack of Transparency → If AI decisions can’t be explained, people may see the
company as secretive or untrustworthy.
• Ethical Lapses → Scandals involving AI misuse can damage a brand’s reputation for
years.

• To reduce risk: Companies should ensure transparency, strong ethics oversight,


and quick response to controversies.

10. explain Various challenges related to Privacy in AI.


From the ppt pg no. 86
Ch-2

1. Difference between AI and XAI


Artificial Intelligence (AI) is a branch of computer science focused on the creation of
computer systems that can demonstrate characteristics we associate with intelligence in
human behavior. AI systems can perceive, reason, act, and learn. The primary aim is to
produce intelligent machines by replicating capabilities like decision-making, problem-
solving, and adapting to new circumstances [attached_file:1, p.13–16].
Explainable Artificial Intelligence (XAI), on the other hand, is a field within AI that
emphasizes transparency and the interpretability of AI predictions. Classic AI models are
often “black boxes,” making decisions without human-understandable reasoning. XAI is
designed to make model decisions clear, interpretable, and trustworthy for humans by
providing explanations for predictions and processes [attached_file:1, p.48–49].

2. Key Concepts of XAI and its Importance


Key Concepts:
• Transparency: Users should be able to see and understand how AI systems make
decisions―what data is used, how it’s processed, and the steps involved
[attached_file:1, p.56].
• Interpretability: Explanations should be understandable and meaningful; different
users (data scientists, end-users, regulators) may need different levels of detail
[attached_file:1, p.56].
• Faithfulness: The provided explanations must accurately reflect the AI model’s
internal logic, not oversimplify or mislead [attached_file:1, p.57].
• Trustworthiness and Accountability: When users know why a model made a
decision, they’re more likely to trust it, and organizations can validate fairness and
nondiscrimination [attached_file:1, p.56–57].
Importance:
• Critical in domains where decisions have high impact (healthcare, law, finance)
[attached_file:1, p.63–64].
• Required by regulations, e.g., “right to explanation” [attached_file:1, p.56].
• Enables debugging, finding biases, and understanding system failures
[attached_file:1, p.57].
• Improves collaboration between humans and AI—domain experts can interpret,
verify, or question predictions based on explanations [attached_file:1, p.57].
3. Explain the Working of XAI in Detail
XAI operates through several techniques:
• Feature-oriented Methods: Analyze the importance of different input features in the
model’s decision process, e.g., feature importance scores.
• Global Methods: Provide an overall understanding of the model’s behavior (how the
model generally makes decisions across all predictions).
• Local Methods: Focus on explaining individual predictions and the factors
responsible for those decisions.
• Concept-based Methods: Use human-understandable concepts to make AI logic
accessible.
• Surrogate Models: Build simpler, interpretable models (like linear models or decision
trees) which approximate complex “black box” behavior for explanation purposes
[attached_file:1, p.51].
Examples from the PDF:
• LIME uses locally weighted surrogate models to approximate complex AI model
decisions for particular samples [attached_file:1, p.113–115].
• SHAP assigns contributions to features using game theory, considered “local”
explanations but also useful for global insights after aggregation [attached_file:1,
p.164–173].

4. Main Goals of XAI (with Brief Explanation)


1. Transparency: To make the model’s decision logic, the features used, and the
reasoning pathways visible to users [attached_file:1, p.56].
2. Interpretability: To ensure that explanations are meaningful and comprehensible for
different stakeholder groups, from technical users to regulators [attached_file:1,
p.56].
3. Trust and Accountability: To help users accept the model’s predictions and ensure
fair, non-biased outcomes [attached_file:1, p.56–57].
4. Faithfulness: To make sure explanations represent actual model logic rather than
oversimplified versions [attached_file:1, p.57].
5. Debugging and Improvement: To help data scientists detect biases, fix errors, and
optimize the model based on which features influence decisions [attached_file:1,
p.57].
6. Compliance: To meet regulatory demands for explainability in automated decision
systems [attached_file:1, p.57].
7. Human-AI Collaboration: To help domain experts (like doctors) validate AI
predictions, and improve outcomes using clear rationales [attached_file:1, p.57].

5. Risks and Challenges Associated with XAI


• Oversimplification: Explanations may reduce complex logic, leaving out important
nuances and leading to misunderstanding [attached_file:1, p.62].
• Security Risks: Increased transparency can reveal vulnerabilities and become
exploitable [attached_file:1, p.62].
• Manipulation: Explanations might be misused to justify potentially unfair or
prejudiced decisions and outcomes [attached_file:1, p.62].
• Increased Complexity: Adding an explainability layer makes AI systems harder to
design, validate, and maintain [attached_file:1, p.62].
• Balancing Accuracy vs. Interpretability: More transparent models may be less
effective for complex tasks, while powerful models are less interpretable
[attached_file:1, p.65].
• Explanation Bias: Risk of generating biased, misleading, or inconsistent explanations
due to sample selection or modeling issues [attached_file:1, p.61].

6. Black Box vs White Box vs Gray Box Testing


Black Box:
• Models are opaque; humans cannot understand their internal logic or reasoning
(e.g., Deep Neural Networks, Random Forests) [attached_file:1, p.58, p.74].
Gray Box:
• Models have some interpretability, offering partial visibility through techniques like
post-hoc explanations or interpretable layers (e.g., ensembles with LIME or SHAP
explanations) [attached_file:1, p.58, p.74].
White Box:
• Fully interpretable models by design, such as Decision Trees, Rule-Based Systems,
and Linear Regression; all logic is transparent and visible [attached_file:1, p.58, p.74].
7. Interpretability vs Explainability in XAI

8. Interpretability with Respect to XAI (with Example)


Interpretability means how easily a human can understand why an AI/ML model made a
certain prediction or decision. In XAI, interpretability is crucial because:
• It builds trust in AI systems—users can follow and justify the model’s reasoning.
• It helps in debugging models—by identifying biases or errors, practitioners can
improve and refine the model’s performance.
• It ensures transparency in sensitive domains like healthcare, finance, and law—
stakeholders must see why decisions are made and verify fairness and accuracy
Example from PDF Pg no.80

9. XAI Model with Respect to Black Box Model


Diagram from PDF pg no. 89
• Classic Black Box Models: Outputs are produced without revealing reasoning, e.g.,
Deep Neural Networks [attached_file:1, p.91].
• XAI Approach: Uses explainability techniques (LIME, SHAP, surrogate models) to
make the black box’s output interpretable. Explanations clarify which features
contributed to each specific prediction, turning opaque decisions into transparent
rationales [attached_file:1, p.91–94].
10. Classification/Taxonomy of XAI Models
1. Function-Based Approach
- *Meta-Explanation:* Explaining the explanation itself for clarity and trustworthiness.
- *Local Perturbation:* Understanding local model behavior by perturbing input data and
observing output changes (e.g., LIME).
- *Leveraging Structure:* Exploiting model structure to provide explanations.
- *Architecture Modification:* Modifying model architectures to enhance interpretability or
include explanation capabilities [attached_file:1, p.99].
2. Result-Based Approach
- *Surrogates:* Simplified models (e.g., linear or decision trees) approximating complex
black-box models.
- *Feature Importance:* Methods evaluating and ranking input features based on their
influence on predictions.
3. Taxonomy by Key Dimensions
This taxonomy classifies XAI models based on multiple important criteria:
- *Stage:*
- Ante-hoc: Explanations generated inherently by interpretable models before or during
model training.
- Post-hoc: Explanations generated after model training on complex black-box models.
- *Scope:*
- Global: Explanation of the overall model behavior across all predictions.
- Local: Explanation focused on individual predictions or data points.
- *Problem Type:*
- Classification, Regression, Time Series, and other learning problem categories.
- *Data Type:*
- Numerical, Categorical, Textual, Image, Time Series, etc.
- *Output Format:*
- Visual explanations (graphs, heatmaps), Rules, Textual narratives, etc.
[attached_file:1, p.100]
11. XAI Models based on Agnosticity, Scope, Data Type, and Explanation Type
Agnosticity:
• Model-Agnostic: Explain AI models without needing knowledge of their inner
workings and can be applied to any model
• Examples:
• LIME (Local Interpretable Model-Agnostic Explanations)
• SHAP (SHapley Additive exPlanations)
• Partial Dependence Plots (PDP)

• Model-Specific: Designed for specific models, utilizing the model’s internal structure
for explanations.

Examples:
• Neural Networks (NN)
• Decision Trees (DT) and Random Forest (RF)
• Convolutional Neural Networks (CNN)
Scope:
• Global: Explains entire model logic (Partial Dependence Plot, SHAP summary)
[attached_file:1, p.104].
• Local: Focused on individual predictions (LIME, SHAP instance-level explanations)
[attached_file:1, p.105].
Data Type:
• Tabular: Most common for feature importance [attached_file:1, p.107].
• Text: For word importance in classification or sequence models [attached_file:1,
p.107].
• Image: For pixel-level or super-pixel explanations [attached_file:1, p.108].
• Graph: For node or edge contribution [attached_file:1, p.108].
Explanation Type:
• Visual explanations: Heatmaps, saliency maps.
• Feature importance: Which features affect predictions most.
• Data points: Showing similar or counterfactual examples
• Surrogate models: Simple models approximating complex ones.
12. Table Representing Different XAI Techniques with XAI Models

13. What is LIME? Local and Global Interpretability Example


LIME stands for Local Interpretable Model-Agnostic Explanations.
It is a method that explains why any complex machine learning model made a certain
prediction, by approximating the complex model locally around the specific instance (data
point) we want to understand.
How LIME Works:

• LIME takes the data point to be explained and creates many slightly changed
versions of it (called perturbed samples).
• These new versions are given to the original complex model to see how the
predictions change.
• Then LIME fits a simple and easy-to-understand model (like a linear regression) on
these new samples, giving more importance to samples that are closer to the
original example.
• The simple model shows which features (inputs) contributed most to the
prediction for that specific data point.

• Local Example: Explaining a diabetes diagnosis, LIME identifies which features (like
age, blood pressure) were most important for a particular patient’s prediction
[attached_file:1, p.115–116].
• Global Example: Aggregating many local explanations across samples gives a broad
view but is not LIME’s designed use; its focus is local [attached_file:1, p.130–131].

14. LIME for Text Data, Image Data, Tabular Data


Picture pg no. 135-….
Text Data:
• LIME randomly removes/replaces words in sentences and refits a local surrogate to
identify which words (or phrases) drive the prediction [attached_file:1, p.137].
Image Data:
• LIME segments images into “super-pixels”, creates perturbed samples with some
segments blanked or restored, and weighs which parts have greatest effect on
prediction [attached_file:1, p.138–142].
Tabular Data:
• Perturbs feature values near the case of interest and fits a local surrogate model to
find which features most influence the output (featured in diabetes prediction
example) [attached_file:1, p.135–137].
15. Mathematical Representation/Optimization Probl em in LIME
16. Limitations of LIME

17. Explain Working of SHAP with Example


SHAP (SHapley Additive exPlanations):
• SHAP is based on game theory and treats each feature like a “player” in a game.
• It calculates the Shapley value for each feature, which shows the average
contribution of that feature to the prediction.
• SHAP looks at all possible combinations of features to fairly decide how much each
feature influences the result.
• This method ensures a fair and consistent assignment of credit to features for the
prediction.
• For example, in a diabetes prediction, SHAP shows how features like age, exercise,
BMI, parents’ medical history, and calories affect the predicted risk.
• It helps doctors and practitioners clearly understand which factors increased or
decreased the diagnosis risk.
• SHAP provides detailed and trustworthy explanations for individual predictions,
making AI decisions more transparent and reliable.
18. Mathematical Representation of SHAP Model
From the ppt pg no. 171

Example :For diabetes prediction of a patient:

19. Types of Plots in SHAP (explaining any two):


1. Beeswarm Plot (Summary Plot):
• Combines feature importance with feature effects on predictions.
• Shows how each feature impacts the model output across many samples using dots
colored by feature value.
2. Dependence Plot:
• Displays the relationship between a single feature's value and its SHAP value (impact
on prediction).
• Helps identify patterns and interactions with other features.
3. Force Plot:
• Visualizes the contribution of each feature for a single prediction.
• Shows how features push the prediction higher or lower compared to the base value.
4. Decision Plot:
• Illustrates how model predictions build as features are added, showing cumulative
effects.
• Useful for visualizing decision paths for individual predictions.
5. Bar Plot:
• Displays mean absolute SHAP values for features, showing overall feature
importance.
• (Page references: 181–190)

20. Limitations of SHAP


1. Computational Complexity: Calculating SHAP values is computationally expensive
due to the need to evaluate all possible feature subsets.
2. Approximation Methods: Using approximations like KernelSHAP or TreeSHAP can
lead to inaccuracies in explanations.
3. Model Assumptions: SHAP methods like TreeSHAP assume specific model structures,
which might not apply to all models.
4. Independence Assumption: SHAP assumes features are independent, which is often
not the case in real-world data.
5. Global Interpretability: Aggregating local SHAP values to provide global model
insights is difficult.
Ch-3
1. Define generative AI. Discuss various applications of genAI.
Generative AI is a type of artificial intelligence that can create new content — such as text,
images, music, video, or even code — by learning patterns from existing data. Instead of just
analyzing or classifying information, generative AI models are trained to produce original
outputs that resemble the data they were trained on.
Applications – pg no. 13

2. Discuss language models, image models and code models of genAI.


3. Differentiate between traditional AI & genAI.

4. Explain large language models (LLM architectures) (for GM—encoders, decoders, GPT).

What is an LLM?
Large Language Model (LLM) is an advanced AI model trained on enormous amounts of text
data (books, articles, websites, code, etc.) to understand and generate human-like language.
It’s called “large” because:
• It has billions or trillions of parameters (these are the tunable parts of the model that
help it learn).
• It learns from huge datasets, enabling it to grasp grammar, facts, reasoning, and even
creativity.
LLMs use a deep learning framework called the Transformer, which helps them understand
the context between many words in a sentence or a document, all at once.

How does an LLM work?


How LLMs Work (Simplified)
[Link]
The model learns statistical patterns from a vast amount of text data.
[Link]
Text is broken down into smaller tokens (words or subwords).
[Link]
It predicts the next token given previous tokens. Example: Input "AI is changing the" →
Model predicts "world."
[Link]-Tuning (Optional)
Models can be further trained on specific domains (e.g., legal, medical, programming) to
specialize.

Applications of LLMs
1. *Text Generation*
* Writing articles, emails, blogs, or creative stories.
2. *Chatbots & Virtual Assistants*
* Customer support, personal AI assistants (like ChatGPT, Siri, Alexa upgrades).
3. *Translation & Multilingual Communication*
* Converting text between languages (Google Translate, DeepL).
4. *Summarization*
* Condensing long documents into short summaries.
5. *Code Generation*
* Assisting programmers (e.g., GitHub Copilot, ChatGPT for coding).
6. *Knowledge & Reasoning*
* Answering questions, providing explanations, tutoring.

LLM Architecture Components


• Encoder: Reads and understands input text, capturing meaning and context (used in
models like BERT).
• Decoder: Generates new text based on the input and previously generated tokens
(used in GPT).
• Multi-Head Attention: Several attention mechanisms running in parallel, helping the
model understand different aspects of the context at the same time.
• Feed-Forward Layers: Process information independently for each token to learn
complex patterns.
• Layer Normalization & Residual Connections: Help the model train better and retain
important information.
Types of LLM Architectures
• Encoder-only models: Great for understanding tasks like classification and search.
• Decoder-only models: Good at creating (generating) text, like GPT models.
• Encoder-decoder models: Combine both to understand and generate text (e.g., T5).

5. Explain transformer architecture of LLMs.

What is Transformer Architecture?


The transformer is a special kind of neural network designed to handle language and other
sequential data

Key Components of Transformer Architecture


1. Encoder and Decoder
• Encoder: Reads and understands the input text by transforming it into meaningful
representations.
• Decoder: Generates the output text using what the encoder understood and the text
produced so far.
(Some models use only encoder or decoder depending on the task.)
2. Self-Attention Mechanism
• Allows the model to focus on different parts of the input sentence simultaneously.
• Weighs the importance of each word relative to others.
• Helps understand context and meaning, which is vital for sentences with long-range
dependencies.
3. Multi-Head Attention
• Multiple self-attention processes run in parallel.
• Each “head” learns different types of relationships within the sentence (e.g.,
grammar, semantics).
• Makes the model’s understanding richer and more nuanced.
4. Positional Encoding
• Since transformers look at all words at once, this adds information about the
position/order of words.
• Helps the model know the sequence and structure of the sentence.
5. Feed-Forward Neural Networks
• Small neural networks applied to each word representation independently.
• Helps extract complex features from the attention outputs.
6. Layer Normalization and Residual Connections
• Techniques that stabilize and speed up training.
• Helps deeper networks learn better and avoid problems like vanishing gradients.

6. Explain the concept of static knowledge. How the RAG model resolves the challenges of
static knowledge.
Concept of Static Knowledge
Static knowledge refers to information that is fixed and unchanging once learned or
embedded in an AI model. In the context of language models or AI systems, this means the
knowledge the model has is limited to the data it was trained on at a particular point in time.
It does not update automatically with new information or events occurring after training.
• Static knowledge is predictable and stable but can become outdated or
incomplete over time.
Then from the PDF pg no. 58

7. List types of LLM. Explain each in detail.


8. Differentiate between zero-shot learning, few-shot learning and transfer learning.
9. Differentiate between the commercial and open source LLMs.
Commercial LLMs
• Developed by major companies for enterprise and developer use, often accessed via
cloud-based APIs for easy integration into various applications.
• Commercial LLMs offer powerful text generation, comprehension, and enterprise-
grade features (security, compliance, private networking, etc.).
• Examples:
• OpenAI: GPT-4, ChatGPT, DALL·E — market leader, tightly integrated with
Microsoft via Copilot and Azure.
• Azure OpenAI: Same models as OpenAI but accessed via Microsoft Azure with
enhanced enterprise features — attractive to large regulated organizations.
• Anthropic: Claude — focuses on safety and ethical outputs using
Constitutional AI, backed by Google and Amazon.
• Google: LaMDA and Bard — built on PaLM 2 architecture, focusing on dialog
understanding and integrated with Google’s ecosystem.
• Cohere AI: Offers LLMs and tools like Neural Search and Embedding APIs,
targeting business use cases.
• Meta: LLaMA 2 (7B, 13B, 70B) — open for commercial use and integrated into
cloud platforms (e.g., Azure AI).

• Access:
• Mostly accessible via cloud-based API endpoints (OpenAI API, Azure API,
Anthropic API, Bard limited access).
• No public model downloads; users interact via API calls.
• License: Proprietary and controlled by the provider.
• Fine-tuning:
• Limited or no fine-tuning options for users; often handled internally.
• Some limited fine-tuning (e.g., Google internal for PaLM 2).
• Parameters: Large and often undisclosed (e.g., GPT-4), Claude ~50B, PaLM ~540B.
• Strengths:
• Industry-leading performance, strong reasoning capabilities (GPT-4).
• Enterprise-grade security, compliance, and support (Azure).
• Alignment, safety, and ethical considerations (Claude with Constitutional AI).
• Strong multilingual and coding capabilities (PaLM).
• Use Cases: Enterprise applications, regulated industries, commercial software
integration, scalable cloud deployments.

Open Source LLMs


• Type & Access: Publicly downloadable, modifiable (Hugging Face, GitHub, etc.).
• Models/Providers:
• LLaMA 2 (Meta): 7B, 13B, 70B parameters; open commercial use; widely fine-
tuned by community.
• Falcon (UAE): 7B, 40B, 180B; strongest open performance, Apache 2.0
license.
• Mistral 7B: Competitive lightweight, Apache 2.0 license.
• Dolly v2 (Databricks): 12B, open license (Apache 2.0 or CC BY-SA 3.0),
moderate performance, simple licensing.
• Vicuna (UC Berkeley): 7B, 13B; research only, near GPT-3.5-like performance.
• ColossalChat, FreedomGPT, Alpaca: Various custom privacy-focused or
research licenses.
• Fine-tuning: Yes—users and researchers can retrain or adapt models for new tasks.
• License: Permissive (Apache 2.0, CC BY-SA, research only, etc.).
• Strengths:
• Community-driven innovation, easy fine-tuning.
• Transparent access, scalable deployment.
• Competitive performance; some (Falcon 180B) top leaderboards.
• Typical Use Cases: Research, experimentation, startups, privacy-first or offline use
cases, academic R&D.
10. Explain the concept of modalities in GPT framework. (4 m)
From PDF pg no. 147
11. Define generative pre-trained transformers and discuss few real-time applications
(6m).
Generative Pre-Trained Transformers (GPT) are advanced AI models made to understand and
generate human-like text.
• Generative: They create new content like articles, stories, or conversations.
• Pre-Trained: They learn from huge amounts of text data before being fine-tuned for
specific tasks.
• Transformer: They use a special architecture that helps understand the relationship
between words in sentences.
Key points:
• GPT predicts the next word in a sentence based on previous words, allowing it to
generate fluent text.
• The models understand language context deeply and can be fine-tuned for
applications like translation, summarization, chatbots, and code generation.
Applications from the PDF pg no. 167

12. Explain the architecture of generative adversarial network (GAN).


Add applications, advantages & disadvantages (6m).
13. Explain the concept of open AI apps. Describe the real-time use cases of open AI APIs.

You might also like