Coding For ALL
Artificial Intelligence & Machine Learning
Week 3, Lecture 5
1
What we will cover in this lecture.
● Popular AI systems
● What is AI and different types of AI
● Present, Future, and Limitations of AI
2
Some Popular AI System
● Search Engines (e.g., Google, Bing)
● Voice Assistants (e.g., Google Assistant, Siri, Alexa)
● Conversational AI (ChatBots) (e.g., ChatGPT, Bard, Bing Chat)
● Self-Driving Cars
3
Search Engine
4
Search Engines
● Understand natural language queries
● Provide relevant results
● Learn from user behavior
5
Voice Assistants
6
Voice Assistant
● Answer questions ● Play music and podcasts
● Set reminders and alarms ● Get directions and traffic updates
● Make calls and send messages ● Translate languages
● Control smart home devices ● Play games and tell jokes
7
Conversational AI (ChatBots)
ChatGPT, Bard, Bing Chat
These are all large language models (LLMs) that can generate text, translate
languages, write different kinds of creative content, and answer your questions in
an informative way.
How? It looked at lots of text and “learned” to “imitate” human writing. GPT3 on
which the ChatGPT was built using 45TB of text data collected from the internet.
● Just how much information is 45 TB of text?
● One TB equals approximately 6.5 million pages of documents stored in
common formats like word processing documents or .pdfs.
8
Conversational AI (ChatBots)
9
Conversational AI (ChatBots)
10
Bard by Google AI
● Utilizes Google Search for real-world information and maintains
consistent conversations.
● Generates diverse text formats: poems, code, scripts, music, emails, and
letters.
11
Bing Chat by Microsoft
● Formats search results as AI chat conversations.
● Utilizes Bing Search, powered by GPT-4, for accessing real-world
information.
12
Idea of these models.
● The task these models are performing is usually simple -- an
autocomplete task.
● It predicts the next plausible word in a given sequence of words. This is
called “next word prediction”.
13
Idea of these models.
“Dhaka is the capital of”
With this phrase as an input, these models should come up with the next
word “Bangladesh”.
14
Reason behind such plausible answer.
● These models are trained on text data scrapped (collected
automatically) from the internet. And much such information is
available there.
● They don't actively search for information but rather predict the next
word or sequence based on learned patterns from the training data.
15
Reason behind such plausible answer.
With the extensive availability of English text online, especially in
comparison to the amount of Bangla text –
● These models will be good at writing poems in the style of Shakespeare.
● Whereas writing a poem in Bangla in the style of Fakir Lalon Shah the
results might not be that impressive.
16
Reasoning Ability - though not trained for it!12
17
Surprises, Capabilities, and Challenges
● These models are still under development, but they surprise us by
tackling tasks beyond their training.
● Researchers explore models' unexpected capabilities and their
potential in tasks like reasoning, problem-solving and coding.
● They aim to integrate world knowledge into models for consistently
generating factually accurate texts.
18
Surprises, Capabilities, and Challenges
● These models can make errors by generating plausible but potentially
incorrect text, and prompting responses like "I am not aware of the
fact."
● These models are in a continual learning phase, and researchers aim to
minimize these issues.
19
Image generation - “Coding for all” and “IUB” is provide as prompt - logoai.com
20
Image generation - prompt - “winter in Bangladesh with fog over a paddy field” -
deepai.org
21
Self Driving Cars
Imagine you're sitting in the passenger seat of a car, but there's no driver
behind the wheel. The car is moving, changing lanes, and avoiding obstacles
all on its own. That's the magic of self-driving cars, powered by artificial
intelligence (AI).
22
Self Driving Cars
23
Self Driving Cars
● Sensors: cameras, radar, lidar
● Car's computers create a real-time model of the surroundings
● Self-driving cars are still under development but have the potential to:
○ Make roads safer by reducing accidents
○ Improve traffic flow
○ Make transportation more accessible
24
So, what is AI?
Colloquially, AI refers to the machines (or software) that perform tasks requiring human-like intelligence.
These tasks encompass a broad range, including
● Learning
● Reasoning
● Problem-solving
● Perception
● Language understanding etc
25
A slightly different definition
John McCarthy, in his 2004 paper “WHAT IS ARTIFICIAL INTELLIGENCE?”
It is the science and engineering of making intelligent machines, especially intelligent
computer programs. It is related to the similar task of using computers to understand
human intelligence, but AI does not have to confine itself to methods that are
biologically observable.
But what is intelligence?
*John McCarthy – Computer scientist and one of the founder of the discipline of Artificial Intelligence.
26
Definition From A Popular AI Book
Stuart Russell and Peter Norvig authors of Artificial Intelligence A Modern Approach attempts to define
the term by distinguishing between the following four “schools of thought”:
27
Turing Test
Turing test: two participants (one machine and one human), and a human
evaluator. Human evaluator has to decide which participant is the machine,
and which participant is the computer.
28
Turing Test
29
Turing Test
The Turing Test, proposed by Alan Turing (1950), was designed to provide a
satisfactory operational definition of intelligence.
A computer passes the test if a human interrogator, after posing some written
questions, cannot tell whether the written responses come from a person or from
a computer.
Alan Turing’s definition would have fallen under the category of “systems that act
like humans.”
30
Acting Rationally
● The Acting Rationally approach to AI focuses on developing AI systems
that can act in a way that maximizes their expected utility.
● This method is frequent in reinforcement learning, enabling AI to learn
from experiences and optimize long-term rewards.
31
Utility and Expected Utility
● Utility refers to a measure of an agent's satisfaction with potential
outcomes.
● Uncertainty arises from incomplete knowledge about future
consequences.
● In uncertainty, the agent pursues expected utility by averaging
outcome values weighted by their probabilities.
32
Intelligent Agent
● an independent program or
entity that
● interacts with its
environment by perceiving
its surroundings via sensors,
● then acting through
actuators or effectors.
33
Rational Agent
Rationality depends on
● the performance measure that defines criterion for success.
● Agent’s prior knowledge of the environment.
● Actions the agent can perform.
● Agent’s percept sequence to date
It is the “intelligent” algorithm / software perceives the environment and
tries to maximize the performance measure(s) through the actions
34
Performance criteria, sensors and actuators of a smart
self-driving car?
Performance criteria will include: time to reach the destination (the agent will
try to minimize it), the amount of fuel/charge consumed (the agent will try to
minimize it), the comfort of the passenger (agent will try to maximize it)
Its environment will then be: road, traffic, pedestrians, passengers, weather
conditions etc.
Sensors: cameras, microphone, GPS, RADAR, LiDAR, engine indicators etc
Actuators: steering wheel, break, accelerator etc.
35
Question
What should be the performance measure, sensors and actuators of an
Intelligent Programming tutor?
36
Question
Do you think it is always possible to list all possible performance criteria so
that nothing untoward happens?
Can you identify what can go wrong with the two agents with the
performance criteria we have listed?
37
Types Of Artificial Intelligence
● Weak AI – also called Narrow AI or Artificial Narrow Intelligence (ANI)
● Strong AI – Artificial General Intelligence (AGI)
38
Weak AI – Artificial Narrow Intelligence (ANI)
● Focus: Performs specific tasks very well, but lacks general intelligence.
● Examples: Facial recognition software, chess-playing programs,
self-driving car systems, virtual assistants.
● Strengths: Highly efficient and accurate within their domain, improves
with more data.
● Weaknesses: Limited to predefined tasks, struggles with adapting to
new situations or reasoning beyond their training data.
39
Strong AI – Artificial General Intelligence (AGI)
● Focus: Possesses human-level intelligence and can perform any
intellectual task a human can.
● Examples: Currently non-existent, remains a theoretical concept.
● Strengths: Ability to learn, reason, and adapt in any situation,
surpassing human capabilities in specific domains.
● Weaknesses: Technological limitations, ethical concerns about
autonomy and potential misuse.
40
Present and Future Of AI
In 2023 the word "AI” was one of the most popular words.
AI is rapidly growing, showing big progress in many areas, yet it faces challenges and
pitfalls too.
Here’s and overview, beginning with current status:
● Technological Advancements
● Applications Across Industries.
● Ethical Considerations
41
Technological Advancements:
AI has leaped forward, especially in:
● Deep Learning: Neural networks mimicking the human brain for
pattern recognition and problem-solving. Imagine a complex web of
interconnected neurons, processing information like a supercharged
mind.
● Natural Language Processing: Machines understanding and generating
human language like never before. Think of a conversation with a witty
and articulate robot companion.
42
Technological Advancements:
● Computer Vision: AI "seeing" the world like us, using cameras and
algorithms to extract meaning from images and videos. Picture a
self-driving car navigating busy streets with superhuman eyesight.
● Reinforcement Learning: AI mastering tasks through trial and error,
mimicking how we learn new skills. Imagine a robot chef perfecting its
culinary skills through countless virtual kitchens.
43
Applications Across Industries.
AI is transforming every sector:
● Healthcare: Diagnosing diseases, predicting patient outcomes, and
developing personalized treatments. Imagine a doctor using AI to
analyze scans and suggest the best course of action for a patient.
● Finance: Detecting fraud, managing risk, and making smarter
investment decisions. Picture an AI analyst sifting through massive
datasets to predict market trends with uncanny accuracy.
44
Applications Across Industries.
● Transportation: Self-driving cars, drones delivering packages, and
optimizing traffic flow. Imagine a world where you seamlessly glide
through city streets in an autonomous vehicle.
45
Ethical Considerations.
As AI blossoms, so do concerns about it:
● Bias: Algorithms reflecting human prejudices, leading to unfair
decisions. Imagine a loan application system biased against certain
demographics, perpetuating existing inequalities.
● Privacy: Our data used in ways we don't understand or consent to.
Picture a shadowy figure lurking in the background, collecting and
analyzing your digital footprint.
46
Ethical Considerations.
● Job Displacement: Automation replacing human jobs, raising concerns
about unemployment and inequality. Imagine a factory floor devoid of
human workers, replaced by rows of efficient robots. And it’s already
happening.
47
Limitations of AI
Current Al systems has many limitations.
While language models like ChatGPT and image generators like Stable
Diffusion often work well, they still have limitations, such as:
● Repetition and Incoherence
● Factual Errors
● Lack of Contextual Understanding
● Unintended Biases
48
Repetition and Incoherence
Generated text or images might contain repetitive patterns or lack
coherence, making them less natural or realistic.
Popular image generator Dall-E struggles to generate hands 49
Factual Errors
Text generated by language models can sometimes contain factual
inaccuracies, incorrect information, or nonsensical phrases.
"Elephants are known for their ability to fly gracefully through the skies,
flapping their wings with precision and elegance."
50
Lack of Contextual Understanding
Generative models might struggle to understand and maintain context,
leading to responses or creations that don't appropriately align with the
given context or topic.
51
Unintended Biases
Like other AI systems, generative models can inherit biases present in the
training data, potentially leading to biased or inappropriate outputs.
52
AI’s Future, Impact and Advancement.
53
The Future Of AI
Ethical AI Development:
● Emphasis on transparency, fairness, and accountability.
● Challenges in ensuring powerful AI remains helpful, honest, and safe.
AI Regulation and Governance:
● Establishing frameworks to guide AI development and deployment.
● Balancing innovation with societal well-being through regulations.
54
The Future Of AI
AI-Assisted Human Capabilities:
● Collaborating with AI to amplify human skills in creativity and
problem-solving.
55
AI's Impact and Advancements
AI for Social Good:
● Addressing societal challenges like healthcare, climate change, and
poverty using AI.
Advancements in AI Research:
● Expecting breakthroughs in explainable AI, AI-driven drug discovery,
and human-AI interaction.
56
Few Discussion Points
● What are the societal implications of strong AI?
● How can we ensure the ethical development and use of AI?
● What does the future hold for the relationship between humans and
AI?
● Can we ever build AGI? Why or why not?
57