0% found this document useful (0 votes)
37 views128 pages

AI&ML (Unit - 1)

The document provides an introduction to Artificial Intelligence (AI) and prompt engineering, covering its foundations, history, risks, benefits, and applications across various fields. It discusses the importance of AI in automating tasks, enhancing efficiency, and providing insights from large data sets, while also highlighting the potential consequences of a world without AI. Additionally, it explores the core components of AI, including algorithms, data types, and the role of rational agents in decision-making.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views128 pages

AI&ML (Unit - 1)

The document provides an introduction to Artificial Intelligence (AI) and prompt engineering, covering its foundations, history, risks, benefits, and applications across various fields. It discusses the importance of AI in automating tasks, enhancing efficiency, and providing insights from large data sets, while also highlighting the potential consequences of a world without AI. Additionally, it explores the core components of AI, including algorithms, data types, and the role of rational agents in decision-making.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 128

Module – 1

INTRODUCTION TO AI AND PROMPT ENGINEERING

Introduction to AI – Foundations of Artificial Intelligence- The History of


Artificial Intelligence- Risks and Benefits of AI- Intelligent Agents - Concept
of Rationality- The nature of Environment- The Structure of Agents-
Introduction to Prompt Engineering.
Introduction to AI
• A field of science concerned with building computers and machines

• Reason, learn, and act in such a way that would normally require human
intelligence
• Involves data whose scale exceeds what humans can analyze.

• AI is a broad field that encompasses many different disciplines, including

• computer science,

• data analytics and statistics,

• hardware and software engineering,

• Linguistics, Neuroscience,
Contd.
• On an operational level for business use,

• AI is a set of technologies that are based primarily on

• machine learning and deep learning,

• Data analytics,

• predictions and forecasting,

• object categorization,

• Natural Language Processing,

• Recommendations,

• Intelligent data retrieval


Contd.
• It is especially useful for

• Repetitive tasks=> to be automated

• detail-oriented tasks such as analyzing large numbers of legal documents to


ensure relevant fields are properly filled in.

• AI's ability to process massive data sets gives enterprises insights into their
operations they might not otherwise have noticed.
A World Without AI: What Would
Happen if We Lost All Our Tech?
• Prior to the current wave of AI, for example, it would have been hard to imagine
using computer software to connect riders to taxis on demand, yet Uber has become
a Fortune 500 company by doing just that.

• With AI, Your smart home systems, controlled by AI, seamlessly adjust the
thermostat, brew your coffee just the way you like it, and even remind you of your
appointments for the day
• Without AI, these conveniences evaporate, leaving you fumbling in the dark,
quite literally.
Contd.
• Think about our daily commute => our roads would turn into chaotic parking lots.

• Emergency services would struggle to respond to accidents without AI predicting


where they're needed most.

• In a hospital without AI-powered medical tools

• Doctors and nurses would be back to square one, relying on old-school methods
to diagnose and treat patients.

• It'd slow things down and put lives at risk.


Contd.
• The economy would tank without AI-driven businesses. Think about it:

• Banks couldn't spot fraudulent transactions,

• Factories couldn't automate production,

• and companies couldn't analyze data to make smart decisions.

• It'd be like going back to the Stone Age!!!!

• In the workplace, AI-powered algorithms analyze data to drive decision-making and


innovation.
• Without AI, businesses struggle to interpret data manually, hindering growth and
optimization.
• Flying cars guided by AI alleviate traffic congestion and transform travel.

• But without AI, these futuristic vehicles are grounded, contributing to urban
gridlock.

• Remember those self-checkout kiosks and automated customer service? They'd be


gone too.
• We'd be back to waiting in long lines and dealing with human errors. Talk about a
step backward!

• Even leisure activities are shaped by AI, from personalized movie recommendations
to curated playlists.
• Without AI, we're overwhelmed by choices and long for the convenience of AI-
driven curation.
Contd.
• We might have already lost the ability to think for ourselves because we're so
dependent on AI.

• With AI handling everything from scheduling appointments to recommending


movies, we've become a bit too reliant.

• It's like we've outsourced our brains to machines!


AI vs. Machine Learning
Advantages of AI
• Excellence in detail-oriented jobs

• AI is a good fit for tasks that involve identifying subtle patterns and relationships
in data that might be overlooked by humans.
• For example, in Oncology,

• AI systems have demonstrated high accuracy in detecting early-stage cancers


by highlighting areas of concern for further evaluation by healthcare
professionals.
Contd.
• Efficiency in data-heavy tasks =>

• AI systems and automation tools dramatically reduce the time required for data
processing.
• This is particularly useful in sectors like finance, insurance and healthcare that
involve a great deal of routine data entry and analysis, as well as data-driven
decision-making.
• For example, in banking and finance, predictive AI models can process vast
volumes of data to forecast market trends and analyze investment risk.
Contd.
• Time savings and productivity gains =>

• AI and robotics can not only automate operations but also improve safety and
efficiency.
• In manufacturing, for example, AI-powered robots are increasingly used to
perform hazardous or repetitive tasks
• Thus reducing the risk to human workers and increasing overall productivity.
Contd.
• Customization and personalization =>

• AI systems can enhance user experience by personalizing interactions and


content delivery on digital platforms.
• On e-commerce platforms, for example, AI models analyze user behavior to
recommend products suited to an individual's preferences, increasing customer
satisfaction and engagement.
Contd.
• Round-the-clock availability =>

• AI programs do not need to sleep or take breaks.

• For example, AI-powered virtual assistants can provide uninterrupted, 24/7


customer service even under high interaction volumes, improving response
times and reducing costs.
Contd.
• Scalability =>

• AI systems can scale to handle growing amounts of work and data.

• This makes AI well suited for scenarios where data volumes and workloads can
grow exponentially, such as internet search and business analytics.
Foundations of Artificial Intelligence
• Data and Knowledge Representation

• An AI system needs huge amounts of data to find patterns and acquire insights to
"learn" and make decisions.
• The goal of knowledge representation, on the other hand,

• To organize this material such that computers can understand, store, and
retrieve it.
• The core of Artificial Intelligence is knowledge and data,

• which work together to allow it to understand unprocessed data.


Contd.
• Algorithms

• An AI system can assess data and draw conclusions from it because of


algorithms, which are detailed instructions or sets of rules.
• These algorithms have become more and more advanced, enabling AI to perform
incredibly difficult jobs like language translation and image identification.
• These algorithms provide the basis of artificial intelligence, allowing it to learn
from data and make predictions.
Contd.
• Statistics and Mathematics

• The foundation for understanding and evaluating data patterns is mathematics,


especially statistics and calculus.
• Statistical techniques help in the development of models that show connections
in data, enabling AI to make sensible choices.
• AI would have very little predictive capacity without mathematics.
Contd.
• Neuroscience and Cognitive Science

• Researchers have learned how to reproduce specific cognitive processes in AI


systems by examining the human brain.
• By providing a blueprint of human learning, memory, and decision-making,
cognitive science and neuroscience help build more "human-like" robots, which
form the basis of artificial intelligence.
Contd.
• Philosophy and Ethics

• In AI, ethical issues are becoming more and more important. By establishing
guidelines for
• how AI should function and be used in society,

• Concerns about privacy, biases,

• Responsibility help to build the field's foundation.

• Ethical standards ensure that advancements in AI protect individual rights and


are consistent with the values of society.
Core Components of AI
1. Algorithms
• Step-by-step procedures or formulas for solving problems.

• In AI, algorithms process data, make decisions, and learn from patterns.

• Types of Algorithms

• Supervised Learning Algorithms => the machine is trained on a set of labeled data

• Unsupervised Learning Algorithms => find hidden patterns or intrinsic structures


in input data that are not labeled
• Reinforcement Learning Algorithms => These algorithms learn by interacting with
an environment and receiving rewards or penalties.
2. Data
• AI systems require large amounts of data to learn and make accurate predictions.

• The quality and quantity of data significantly impact the performance of AI models.

• Types of Data

• Structured Data

• Unstructured Data

• Semi Structured Data

• Time Series Data

• Textual Data, Image Data, Audio Data


• Structured data is neatly organized in a specific format, like tables, spreadsheets, or
databases.

• It’s often used in machine learning for tasks such as sorting, predicting, and
grouping.

• Unstructured data doesn’t follow a specific format or organization.

• This includes texts, images, audio, and videos.

• Techniques in natural language processing (NLP) and computer vision are


applied to handle this type of data.
• Time-series data records observations over regular time intervals.

• This type of data is crucial in fields like finance, the IoT, healthcare, and manufacturing
for forecasting and detecting trends or anomalies.

• Textual data includes all forms of written words.

• It’s essential for NLP tasks like analyzing sentiments, classifying texts, recognizing
entities, translating languages, operating chatbots, and summarizing documents.

• Image data captures visual information through cameras or imaging devices.

• It supports computer vision tasks such as identifying objects, classifying images,


recognizing faces, analyzing medical images, driving autonomous vehicles, and assessing
satellite images.
• Sensory data comes from physical sensors like temperature sensors,
accelerometers, and gyroscopes.
• This data is vital for IoT, wearables, industrial automation, smart buildings,
health monitoring, and environmental surveillance.
Sources of data for AI development
1. ​Public datasets
• Freely available data collections that are openly shared for research, analysis, and
educational use.

2. Internal data is what organizations generate or gather through their operations,


transactions, or interactions with customers, employees, or partners.
• Examples include customer databases, sales records, financial statements, and
operational metrics.
3. Web scraping automatically extracts data from websites and web pages, capturing
text, images, links, metadata, and structured web content.

4. APIs and online services provide easy access to a variety of data sources, such as
social media platforms (e.g., Twitter API) and financial information (e.g.,
Bloomberg API), enabling developers to incorporate external data into AI
applications effortlessly.

5. Crowdsourcing enlists a large group of people to perform tasks or gather data,


often via online platforms.
6. Transactional data includes records of transactions or interactions between
entities, like purchases and reservations.
• It is pivotal for customer analytics, recommendation systems, fraud detection,
and personalized marketing.

7. Multimedia content comprises digital media forms like images, videos, audio, and
animations.

• It is used in content recommendations, surveillance, image recognition,


augmented reality, and entertainment.

8. Social media and forums offer sources of user-generated content.

• They facilitate analysis of sentiments, trends, marketing strategies, brand


monitoring, crisis management, and social networking studies.
Structured Data
• Structured data concerns all data which can be stored in database SQL in table with
rows and columns.

• They have relational key and can be easily mapped into pre-designed fields.

• Structured data is highly organized information that uploads neatly into a relational
database

• Structured data is relatively simple to enter, store, query, and analyze, but it must be
strictly defined in terms of field name and type
Unstructured Data
• Unstructured data may have its own internal structure, but does not conform neatly
into a spreadsheet or database.

• Most business interactions, in fact, are unstructured in nature.

• Today more than 80% of the data generated is unstructured.

• The fundamental challenge of unstructured data sources is that they are difficult for
nontechnical business users and data analysts alike to unbox, understand, and
prepare for analytic use.
Foundations of AI
Philosophy
• Intelligence and Consciousness

• What does it mean to be intelligent?

• Turing Test to determine a machine's ability to exhibit intelligent behavior


indistinguishable from a human.
• They push AI researchers to refine their definitions and approaches, ensuring that
advancements in AI are not just about increased computational power
• But also about deeper comprehension of what it means to think and understand.

• Help develop ethical guidelines that inform the design, implementation, and
deployment of AI systems,
• Ensuring that these technologies respect human rights and promote fairness.
Mathematics

• Developing algorithms, models, and procedures

• Empower machines to acquire knowledge, engage in logical thinking, and make

well-informed choices.

• Master mathematical concepts like linear algebra, calculus and probability.

• Linear algebra allows data to be depicted and manipulated, facilitating tasks

• Image recognition, natural language processing, and recommendation systems.


Support vector machines
• Classification and regression tasks in AI applications

• Addressed difficulties associated with high-dimensional data in computer vision


by devising methods like dimensionality reduction
• to manage the curse of dimensionality.
• Calculus
• Essential for optimizing AI models.

• Methods like gradient descent and backpropagation employ


mathematics to minimize mistakes and maximize the parameters of
machine learning models.
• These mathematical methodologies empower AI systems to acquire
knowledge from data and consistently enhance their performance.
• Probability theory and statistics
• Probability distributions, Bayesian inference, and hypothesis testing offer
a mathematical framework for quantifying uncertainty, analyzing data,
and making predictions based on probabilities.
• Economics =>

• Its effects on productivity, job markets, income inequality, and overall economic
growth, allowing for informed decision-making
• Regarding AI adoption and policy development across industries and societies.

• Neuroscience =>

• Train these neural networks to perform in computers the same tasks done by
parts of the brain, which means their computational traits can lead to hypotheses
about how brains compute.
• AI also is providing new methods for analyzing brain and behavioral data,
helping us decode the meaning of brain activity
Agents in Artificial Intelligence
• An AI system can be defined as the study of the rational agent and its environment.

• Sensors=> The agents sense the environment through sensors


• Actuators => Agent act on their environment through actuators.
• An AI agent can have mental properties such as knowledge, belief, intention, etc.
What is an Agent?
• An agent can be anything that perceive its environment through sensors

• and act upon that environment through actuators.

• An Agent runs in the cycle of perceiving, thinking, and acting.

• Types=>

1. Human Agent =>


• A human agent has eyes, ears, and other organs which work for sensors and

• Hand, legs, vocal tract work for actuators


2. Robotic Agent =>
• A robotic agent can have cameras, infrared range finder, NLP for sensors
• and various motors for actuators.

3. Software Agent =>


• Software agent can have keystrokes, file contents as sensory input and

• Act on those inputs and display output on the screen.


• Sensor:
• Detects the change in the environment and sends the information to other
electronic devices.
• An agent observes its environment through sensors.
• Actuators:
• Component of machines that converts energy into motion.
• The actuators are only responsible for moving and controlling a system.
• An actuator can be an electric motor, gears, rails, etc.
• Effectors:
• Devices which affect the environment.
• Effectors can be legs, wheels, arms, fingers, wings, fins, and display screen.
Intelligent Agent
• An Intelligent Agent is an autonomous entity which act upon an environment using
sensors and actuators for achieving goals.

• Learn from the environment to achieve their goals.

• A thermostat is an example of an intelligent agent

• Rules =>

• Rule 1: An AI agent must have the ability to perceive the environment.

• Rule 2: The observation must be used to make decisions.

• Rule 3: Decision should result in an action.

• Rule 4: The action taken by an AI agent must be a rational action.


Characteristics of an Agent
Rational Agent
• A rational agent is a type of intelligent agent that makes decisions based on logic and
past experience.

• Both types of agents are autonomous and can adapt to their environment.

• Has clear preference, models uncertainty, and acts in a way to maximize its
performance measure

• AI is about creating rational agents to use for game theory and decision theory
for various real-world scenarios.
• For an AI agent, the rational action is most important because in AI reinforcement
learning algorithm,
• for each best possible action, agent gets the positive reward

• for each wrong action, an agent gets a negative reward.


Structure of an AI Agent
• The task of AI is to design an agent program which implements the agent function.

• The structure of an intelligent agent is a combination of architecture and agent


program.
PEAS Representation
• A type of model on which an AI agent works upon.

• When we define an AI agent or rational agent, then we can group its properties
under PEAS representation model.
PEAS for self-driving cars
PEAS for Chess Playing AI
• Performance =>
• Winning game
• Environment =>
• Chessboard
• Opponent
• Actuators =>
• Move chess pieces
• Sensors =>
• Board recognition
• Opponent moves
PEAS for Healthcare Diagnosis
• Performance =>
• Accurate disease identification
• Environment =>
• Patient data
• medical facilities
• Actuators =>
• Prescription
• Treatment planning
• Tests
• Sensors =>
• Medical records
• Diagnostic tests
• Patient data
What are AI agents?
• A software program that performs tasks autonomously by observing and
interacting with its environment.

• Designed to simulate human behavior, handling tasks with minimal human input by
processing data and making decisions.

• Use predefined rules, learning algorithms, or both to handle complex tasks.

• Advantages => Increase efficiency, reduce human error, and enhance decision-
making processes.

• Percept sequence is the complete history of everything the agent has ever perceived.
Agent interaction through Sensors and
Actuators
Vacuum-Cleaner world
Contd.
• Configuration with just two squares, A and B.

• The vacuum agent perceives which square it is in and whether there is dirt in the
square.

• The agent starts in square A.

• The available actions are to move to the right, move to the left, suck up the dirt, or do
nothing.

• One very simple agent function is the following:

• if the current square is dirty, then suck;

• otherwise, move to the other square. A


Good Behavior: The Concept of
Rationality
• A rational agent is one that does the right thing.

• Consequentialism => Agent’s behavior evaluated by its consequences.

• When an agent is plunked down in an environment, it generates a sequence of


actions according to the percepts it receives.

• This sequence of actions causes the environment to go through a sequence of states.


• If the sequence is desirable, then the agent has performed well.

• This notion of desirability is captured by a performance measure that evaluates any


given sequence of environment states
• Rationality depends on four things,

• The performance measure that defines the criterion of success.

• The agent’s prior knowledge of the environment.

• The actions that the agent can perform.

• The agent’s percept sequence to date.

• For each possible percept sequence, a rational agent should select an action that is
expected to maximize its performance measure
Omniscience, Learning and Autonomy
• An omniscient agent knows the actual outcome of its actions and can act accordingly;

• but omniscience is impossible in reality

• Rationality is not the same as perfection, omniscience is perfection.

• Rationality maximizes expected performance, while perfection maximizes actual


performance.

• Our definition of rationality does not require omniscience, then, because the rational
choice depends only on the percept sequence to date (what is known to date)
Omniscient
• An omniscient AI agent would have perfect and complete knowledge of everything relevant
to its environment, including:
• All current and future states of the world.

• The true consequences of every possible action.

• The hidden variables and unobservable factors in a system.

• True omniscience is impossible for any AI due to several limitations,

• Computing every possible future state and consequence would be infeasible.

• Small changes can lead to vastly different outcomes

• If an AI were truly omniscient, it could perfectly manipulate humans, predict every action, and
potentially control the future.
Learning
• Our definition requires a rational agent not only to gather information but also to
learn as much as possible from what it perceives.

• The agent’s initial configuration could reflect some prior knowledge of the
environment
• But as the agent gains experience this may be modified and augmented.

• There are extreme cases in which the environment is completely known a priori.

• In such cases, the agent need not perceive or learn; it simply acts correctly.

• An agent needs to learn if its plan is failing


Autonomous
• Lacks autonomy => agent relies only on its prior knowledge rather than its own
percepts

• An agent should learn what it can to compensate for partial or incorrect prior
knowledge

• A rational agent must select the best possible action based on available information.

• If it relies on external input for every decision, it becomes slower and less effective.

• Example: A self-driving car cannot wait for human approval for every turn—it
must act autonomously.
• Environments are often unpredictable, and a rational agent must adjust its strategy
without external intervention.
• Example: A robotic vacuum (like Roomba) encounters obstacles and must autonomously replan
its path.

• In many real-world applications, human oversight is impractical or costly.

• Autonomous agents can operate continuously and efficiently without human fatigue.
• Example: AI trading bots execute millions of stock trades per second without human supervision.

• Survivability & Independence => If an agent is deployed in remote or dangerous


environments, it must operate without external input.
• Example: A Mars rover cannot rely on Earth-based operators due to communication delays—it
must act autonomously.
Properties of Task Environment
• Environment => surrounding of the agent.
• The agent takes input from the environment through sensors
• Delivers the output to the environment through actuators.
• Types =>
Fully Observable Environment
• Information received by your agent at any point of time is sufficient to make the
optimal decision.

• For example in a Tic-Tac-Toe game, seeing the position of the elements on the
board is enough to make an optimal decision on the next move.
• When an agent sensor is capable to sense or access the complete state of an agent at each
point in time, it is said to be a fully observable environment else it is partially observable.

• Maintaining a fully observable environment is easy as there is no need to keep track of the
history of the surrounding.

• An environment is called unobservable when the agent has no sensors in all environments.

• Examples:

• Chess – the board is fully observable, and so are the opponent’s moves.

• Driving – the environment is partially observable because what’s around the corner is
not known.
Deterministic vs Stochastic
Episodic vs Sequential
• Episodic =>

• Consider an example of Pick and Place robot, which is used to detect defective
parts from the conveyor belts.
• Here, every time robot(agent) will make the decision on the current part i.e.
there is no dependency between current and previous decisions.

• Sequential =>

• the previous decisions can affect all future decisions.

• The next action of the agent depends on what action he has taken previously and
what action he is supposed to take in the future.
• Example => Chess
Static vs Dynamic
Discrete vs Continuous
Single vs Multiple
Structure of Agents
• The task of AI => Design an agent program which implements the agent function.

• The structure of an intelligent agent is a combination of architecture and agent


program.
1. Architecture: Architecture is machinery that an AI agent executes on.

2. Agent Function: Agent function is used to map a percept to an action.

f:P* → A

3. Agent program: Agent program is an implementation of agent function.

• An agent program executes on the physical architecture to produce


function f.
Types of Agents in AI
Simple Reflex Agent
•Only uses current data and it ignores any past data.

• It uses a set of condition-action rules coded into the system to make its decision or
take any action.

• For example => Snacks vending machine


1. You input money
(condition) and
2. select a snack
(action), and
3. The machine
dispenses your choice
based solely on that
immediate input,
without considering
past or future
transactions.
Pros and Cons

• Pros=>
• Easy to implement

• Quick Responses to any stimuli

• Cons=>
• Has limited intelligence

• Don’t have knowledge of non perceptual part of current state

• Non adaptive to changes in the environment


2. Model-Based Agents
• Model-based reflex agents use the current state of the world & the internal model of
that world, to decide on the best action.

• It partially observes the external environment by maintaining an internal


environment.

• Example => Thermostat

• Maintaining a comfortable room temperature

• Handy little device controls the heating and air-conditioning

systems in your house


• It compares the inner house temperature (environment) with the temperature set by
the user (internal environment) to identify whether it should turn heating/cooling
on or off (action).

• Model-based reflex agents are useful in environments where complete information


isn’t available,
• and some form of history or state needs to be considered.

• They're effective in applications like autocorrect where it adjusts based on the user's
typing habits.
• The model-based reflex agent operates in four stages:

1. Sense: It perceives the current state of the world with its sensors.

2. Model: It constructs an internal model of the world from what it sees.

3. Reason: It uses its model of the world to decide how to act based on a set of
predefined rules or heuristics.

4. Act: The agent carries out the action that it has chosen.
Pros and Cons
• Pros:

• You can adjust actions based on changes in the environment.

• It uses an internal model to make informed decisions, even with incomplete


information.

• Cons:

• Complex to design and implement than simple reflex agents.

• The internal model may need regular updates.


Goal-based Agents
• Goal-based agents act to achieve specific goals,

• using the model of the world to consider the future consequences of their
actions.

• They choose actions that lead them closer to their predefined goals.

• Example => pacman game


• Goal-based agents are ideal for complex planning and decision-making tasks

• where achieving a specific outcome is the priority.

• They're used in

• Strategic game playing,

• Automated planning in logistics,

• Resource allocation in project management, where considering future steps


towards a goal is essential.
Breakout Game

1. In this game, the goal-based agent


aims to destroy all the bricks in order
to gain maximum reward.
2. To achieve this goal, the agent must
use its paddle to hit the ball and
destroy all the bricks.
3. Additionally, the agent needs to
continuously evaluate its environment
and take actions likely to lead it closer
to its goal.
4. Here, the agent learns by exploring the
environment and setting rules for
maximizing the reward.
Pros and Cons
• Pros:

• It is capable of adapting to achieve goals under changing conditions.

• It considers future consequences of actions, leading to more strategic decision-


making.

• Cons:

• It requires more processing power for planning and evaluating potential actions.

• It is focused on goal achievement, which may not always align with the best
overall outcome.
Utility-based Agent
• Aim not just to achieve goals

• but to maximize a measure of satisfaction or happiness, known as utility.

• They evaluate the potential utility of different states and choose actions that
maximize this utility.

Pacman is a game where a


player controls a character
that can move around a maze
and eat pellets.
GPS Navigation System
• Given a destination (goal), it evaluates various routes (actions) using its world model
(maps and traffic conditions) to recommend the fastest or shortest path, adjusting as
conditions change.
Learning Agent
• Learning agents improve their performance and adapt to new circumstances over
time.

• They can modify their behavior based on past experiences and feedback, learning
from the environment to make better decisions.

• Example => Consider a learning agent as a student mastering a subject. With each
lesson, homework, and test (experiences and feedback), the student (agent) learns
and adjusts study habits (behavior) to improve grades (performance) over time.
• AI => Aim to give machines the ability to “think” and “learn from experience”

• It comes to repetitive and detail-oriented tasks, AI can actually perform much


better than humans

• ML => Building models that can learn and improve themselves over time with
minimal human input
• To train the algorithms to identify data patterns and relationships so that the
models can later use this knowledge to make predictions or execute tasks
themselves based on historical data.
Implemented machine learning-
based predictive maintenance
system to monitor their fleet of
60,000 vehicles. As a result, the
company has reported a 10%
reduction in maintenance costs and
a 15% reduction in vehicle
downtime.
• DHL has implemented an AI-based predictive maintenance system across its fleet of
over 60,000 vehicles.

• The system uses machine learning algorithms to analyze data on vehicle


performance, such as
• Fuel consumption,

• Engine temperature, and

• Tire pressure.

• By analyzing this data, the system can predict when a vehicle will likely require
maintenance, allowing DHL to schedule repairs before a breakdown occurs.

• By catching potential issues before they become critical, DHL has been able to keep
its fleet running smoothly, improving efficiency and reducing costs.
• DL => A sub field of ML, neural networks modelled after the human brain.

• Made of several structured network layers

• Learn key information or features from raw data or recognize inaccurate information,

• Can process and understand intricate patterns and relationships in unstructured data.

• Anomaly detection => Quickly spot unusual or suspicious financial activities. Plus, since
the models are self learning, they can quickly adapt to any new fraudulent patterns that
appear.

• Image and video recognition for quality control

• Speech processing for customer service automation

• Speaker recognition for secure authentication


Natural Language Processing
• Subset of artificial intelligence that allows machines to

• understand and respond to written or spoken words in almost the same way as we
do

• Takes raw, written, or spoken text and interprets it into a form that a computer can
understand and analyze.

• Then translates the answer back into natural language.

• Automatic translation to any language

• Customer sentiment analysis

• Speech-to-text transcription
Large Language Models (LLM)
• Designed to understand and generate human-like text in various forms,
depending on the prompts they receive.

• Why large?

• Because they are trained on massive datasets from various sources,

• All to teach the models to understand grammar, context, and sentence


structure.
• Building smart virtual assistants

• Understand the prompt and respond in natural language

• Personalized and context-aware responses to customer inquiries, elevating customer


satisfaction and saving support agents time.

• Document summary and content generation

• Faster translations

• ChatGPT can understand and answer questions in around 95 different languages,


which makes it a great help for businesses who need to quickly translate their
materials into other languages.

• Enhancing creativity => generate ideas, slogans, or content for marketing purposes.
Prompt Engineering
• Guide Generative Artificial Intelligence (generative AI) solutions to generate desired
outputs.

• Even though generative AI attempts to mimic humans, it requires detailed


instructions to create high-quality and relevant output.

• Prompt Engineering => you choose the most appropriate formats, phrases, words,
and symbols that guide the AI to interact with your users more meaningfully.
• A prompt can contain information like the instruction or question you are passing to
the model and include other details such as context, inputs, or examples.

• instruct the model more effectively to improve the quality of results.

• Example:
OpenAI Playground or any other LLM
playground
• Lets improve it a bit,

This approach of designing


effective prompts to instruct
the model to perform a
desired task is what's referred
to as prompt engineering
Prompt Formatting
• A standard prompt has the following format:

Or

• question answering (QA) format

• zero-shot prompting => Directly prompting the model for a response without any
examples or demonstrations about the task you want it to achieve.
Zero Shot Prompting
• No examples are provided, and the model must rely entirely on its pre-trained
knowledge.

• Uses LLMs' generalization capabilities to attempt new tasks without prior specific
training or examples.

• Prompt: Classify the animal based on its characteristics. Animal: This creature has
eight legs, spins webs, and often eats insects.

• Output: Spider.

• Zero-shot prompting eliminates the need for task-specific fine-tuning,


One-shot Prompting

• Providing a single example before the new task, which helps clarify
expectations and improves model performance.
Few Shot Prompting
• you provide exemplars (i.e., demonstrations)
• Prompt engineering is the process of enhancing the output of large language models
(LLMs), such as OpenAI’s GPT-4

• Involves carefully crafting input prompts to help the language model understand the
context and produce desired results.

• This process requires creativity, understanding of the language model, and precision
in formulating prompts for a specific task.

• Your choice of words and their sequence can change the quality and relevance of the
generated content.
• For example, if a chatbot provides customer support, prompt engineers can update it
with the latest information about products and services.

• This helps make sure customers get the help they need.

• Or if a virtual assistant provides information about the weather, prompt engineers


can update it with the latest forecasts to help people plan their day accordingly.
Risks of AI
• Job Displacement and Economic Inequality

• Those who own the technologies reap the benefits while others may lose their
livelihoods.

• Security Risks

• the manipulation of AI systems through biased data,

• the risk that AI could be used to develop advanced hacking techniques.

• Loss of Privacy

• Control and Autonomy

• Lack of creativity

You might also like